postal_location retuning inconsistent values

Kevin-C
Recognized Expert

Hey all!

 

I'm having issue getting the postal_location function to return consistent value when inside a loop.

What I mean by that is:

 

{{postal_location(33431)}}

 

Returns:

 

LatLon{latitude=26.3799, longitude=-80.0975}

 

as expected.

 

But when in a loop:

 

{% for comp in companys %}{# companys is an iterable dict w/ zip code #}
  {{postal_location(comp.zip)}}
  {{postal_location(comp.zip, 'us')}}
{% endfor %}

 

Returns:

 

LatLon{latitude=0.0, longitude=0.0}
LatLon{latitude=0.0, longitude=0.0}

 

 

See the output below:

Screen Shot 2021-07-21 at 3.40.29 PM.png

Top value is outside the loop

Highlighted value is inside the loop.

0 Upvotes
4 Replies 4
Kevin-C
Recognized Expert

As you can see in the screen shot sometimes the expected value is return, and sometimes not.

0 Upvotes
dennisedson
Community Manager

@Kevin-C , looks like you have a support ticket in as well that is being looked at by the product team.  Mind adding the solution here when they respond 😀

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
Kevin-C
Recognized Expert

@dennisedson  Absoluetly!

Also i was going to post up on the slack but wasn't sure what channel to use! Any suggestions?

 

Its starting to feel like a bug but not quite ready to jump on that train just yet!

dennisedson
Community Manager

@Kevin-C , the hubl channel seems like a good place to start.

Yell at me if you need some assistance with support 😉

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content