How to extract a state from a address

I have created a field called address with data type Geographic address.
I have added the GeoAPIs to my app.
I need to figure out how to determine is if an address entered is in California. How do do I do that from Geographic address field? What condition do I invoke?

Hi there, @accts… when you use the :extract operator on a geographic address field, state is one of the many components you can extract and subsequently evaluate (for example, is the state extracted from the address “California”).

Hope this helps.


1 Like

I entered an address and then using a button saved it to the data base,
geoaddress - input address
However, it wont save to database. The database entry is blank.
The address field is a geographic address.
I am unable to save the geographic address to the data base. I see other people have had this issue. What am I doing wrong?
I just save with workflow the input to a data field of type Geographic address but nothing gets saved. I am able to type it in but not save via workflow.

You asked how to extract the state from an address… not being able to save the address to the database is entirely different, of course. Share screenshots of your setup and your workflow, and check the debugger to see if it can provide any clues. You could also consider contacting support to see if they can help.

I was not able to use the solution you suggested for extracting the state, because as I found that the workflow does not save my data (input address) to a geo address data type. Hence it cannot extract anything.

The way to extract the state from an address is what I gave you because that was the question in your post. You not being able to use that solution because you can’t save the address is, as I said, a different issue, and if you don’t want to share more details about that issue, then it won’t be possible for anyone to try to help you figure out why it’s not working.

Edit: I see you made a new post, and I will refrain from attempting to help over there since I was apparently unable to help you in this thread. Best of luck.

It seems I have upset you some how. :worried:
Unintentional for sure, as I always appreciate your excellent and most helpful answers. In fact I look forward to your response as I know it will be the one that is on point and will work.

But since, you said, this was a new problem, I thought I needed to post it as a new question.
But, yes please do help me! :heart_eyes:

Nah, definitely not upset… just a bit confused by the back and forth after I answered your initial question, but that’s probably on me. Anyway, making a new post was a good way to go, and I’m sure someone will be able to help you out there (I will also take a closer look at it in a bit).

1 Like

I have to say that nearly every time you answered a question, you were always correct. I really do appreciate your being here.

A question: are you independent or do you work for Bubble?

Thanks… always happy to try to help, and I don’t actually work for Bubble… I’m just some random dude who, as I like to say, spends more time in the forum than should reasonably be allowed by law, and even I don’t really know how I got here.

You are an amazingly knowledgeable guy and what a lot of people you have helped. Best to you. Hope you are doing well on your own.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.