Use Javescript to do a Zip Code LookUp and return county
I have the following Apps
Leads
Counties
The Leads app has a Zip Code field.
The Counties app has two fields (Zip and County). I pre-populated this app with zip code and the county it belongs too. This is sort of like a lookup table...
07981 - Morris County
07649 - Bergen County
etc...
What I'd like to do is use a calculated field in the Leads App that takes the Zip Code and does a lookup in the Counties App to find the County it belongs to. Then Output that County Value to the calculated field.
Is this possible?
-
Hi Scott,
I assume in your Counties app each county is an own item with the 2 fields zip code and county name. A calculation field can get data only from those items which are connected to the item where the calculation field is in. To get the wished county into your Leads app via a calculation field you would have to connect the Lead to the County.
I see 2 possible ways:
First:
Create a relationship field in Leads to Counties. Than you have to set the relationship for every Lead to the County manually. To find the county with the right Zip code just type the Lead's zip code into the relation field and it gets the county. The advantage of this solution is, that you can filter on counties in the Lead app and you don't need a calculation field cause you see the county in the relationship ship field. If you want to have the county name in a calculation field too, use :@all of NameOfTheFieldWithCounty.join()
Second:
Use the Podio extension GlobiFlow https://podio.com/extensions/2 . There you can create a flow like: When a new lead is created (or updated), search in app County for the Zip Code of the Lead and set a relation to the County item with this zip code.Rainer
Please sign in to leave a comment.
Comments
1 comment