How do I setup conditional logic based on geolocation?

  • Profile Image
    endrinita
    Asked on February 20, 2021 at 09:52 AM

    I have an address field that uses the geolocation widget. I would like to use the state to perform conditional logic (i.e. if the state is FL, show this dropdown menu).

    However, when I use the logic, IF ADDRESS CONTAINS "FL, USA", the condition is triggered even for other states (i.e. if the address is 34 Fletcher Court, Breckenridge, CO, USA, 80424). How do I ensure that it is only triggered if the address contains the exact match "FL, USA"?

  • Profile Image
    Katherine_W
    Answered on February 20, 2021 at 05:46 PM

    Hi there,

    Happy to help!

    I made a clone of your form 210433961572050. For the following conditions, what fields are you wanting to hide here?

    1613860722_60318f72c2118_

    If you can elaborate a bit more on your process and what you're wanting to accomplish, I can certainly put together an example here.

    I noticed that, in the first condition, you've put "ends with": this will act as a "contains"-type condition, so if the "fl" characters are contained in the address field, this is where the issue will present itself.

    You could insert another condition with the "equal to" condition and select that if ANY of the rules are met, the condition is fulfilled.

    1613861064_603190c85f0c6_

    We await your response.

  • Profile Image
    endrinita
    Answered on February 23, 2021 at 08:02 AM

    Hello,  

    Thanks, If you look at my latest form, I tried setting up the conditional statement the way you described:

    1614085360_6034fcf071cf3_

    However, the Test text does not appear for addresses in Florida.

    Any other thoughts?


  • Profile Image
    Gaetan_B
    Answered on February 23, 2021 at 09:11 AM

    Hello,

    Thank you for the additional information.


    Could you change the condition from is equal to, to contains and let us know how it goes?


    Hope this helps.

    Do not hesitate to reach out if you need further assistance.

  • Profile Image
    endrinita
    Answered on February 23, 2021 at 10:44 AM

    Ok, I tried this but still no luck getting the trigger to work. Any other suggestions?

    1614095038_603522bee7c02_

    1614095012_603522a4e22ca_

  • Profile Image
    endrinita
    Answered on February 23, 2021 at 10:47 AM

    I still get the same issue that when I remove the wildcard character from the condition, it is triggered for addresses not in Florida.

    1614095162_6035233ad52a9_

    1614095209_603523691ab8b_

  • Profile Image
    Katherine_W
    Answered on February 23, 2021 at 01:26 PM

    Hi again,

    Thank you for clarifying with us a bit more!

    Please allow me a little more time to test, and I will update you via this thread as soon as possible.

    Thank you in advance for your patience and understanding as I investigate a solution for you!

  • Profile Image
    Katherine_W
    Answered on February 25, 2021 at 02:38 PM

    Hi again,

    Thank you for your patience as I worked towards a resolution with this.

    Currently, I am able to replicate the issue: this is due to the "FL" characters being detected within the entire address, the widget is likely unable to differentiate between the state and the characters within the address.

    To this end, I have opened up a ticket with our back-end team to look into to see if we can enable the geolocation widget to differentiate when these conditions are set.

    I sincerely appreciate your patience and understanding as we look into this!