SOLVED

Visibility Rule for State based on multiple Country entries

Go to solution
Amanda_Thomas6
Level 9

I am looking to hide the state field if country does not contain US, United States, or America. I noticed there is no plus button to add options for the If not contains field. So, I listed them "If [countryt] [not contains] [US, United States, America]". Picture 1. That didn't work, as in when I typed America in the Country field the State field didn't show up.

Then I tried to add more rule options (multiple "If" statements). Picture 2. That didn't work either. Again, I typed America in the Country field the State field didn't show up. Any advice?

Picture 1

pastedImage_2.png

Picture 2

pastedImage_1.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I highly recommend using a picklist for Country standardization. Just put your most common countries at the top of the list for easy access. You should be able to get a list of country values from your CRM admin.

View solution in original post

16 REPLIES 16
Anonymous
Not applicable

Have you tried just showing the State field when Country is United States:

pastedImage_0.png

This way State/Province only shows on your form when that Country is selected.

Anonymous
Not applicable

Hi Emily,

I have my form/visibility rules setup just like your image, yet when I preview/input on an LP, none of my values show for State; the only thing that shows is Select..    Have you run into this issue before? MKTO Support is kinda dragging on a response

Thanks

Tom

SanfordWhiteman
Level 10 - Community Moderator

Got a sample URL?

Anonymous
Not applicable

Sanford here is a URL for the Form in question http://iot.aylanetworks.com/T6.html

When United States is selected, the State field should appear with States as choices. If China is selected, Province should appear with Provinces as choices.

You can see below how the Visibility Rule has been setup.

Screen Shot 2016-11-16 at 8.19.59 AM.png

Anonymous
Not applicable

Can you show an image of the field values as well? I've run into this when I hadn't put the values here first:pastedImage_0.png

Anonymous
Not applicable

Hi Emily,

I added them there as well and it did not fix the issue. Fortunately I was able to get it to work by removing spaces from the values so instead of "USA I USA" it is now "USAIUSA" and seems to work fine.

Anonymous
Not applicable

Excellent, good to hear you got this resolved

Amanda_Thomas6
Level 9

Hi Emily,

Thanks for your reply! I have done that and it works. It's just that this field is an open field as to not have to list every country in a drop down. So, people could input US and United States of America, instead of just United States. So, the is option just won't work.

Anonymous
Not applicable

I highly recommend using a picklist for Country standardization. Just put your most common countries at the top of the list for easy access. You should be able to get a list of country values from your CRM admin.

Amanda_Thomas6
Level 9

Hi Emily,

Good idea. So, do you know if you can or can not list options for the "not contains" or "contains" filters in the visibility rules?

Anonymous
Not applicable

You absolutely can. But if you want State to only show up on the form when Country contains US, United States you need to use "Show" instead of "Hide"

pastedImage_0.png

Amanda_Thomas6
Level 9

I think it's listing different values with a comma that is the problem. For some reason it's only recognizing the first option.   I have it listed exactly "US, United States". When I enter United States in the form, the State field does not show, but when I enter "US", the state field does show.

pastedImage_0.png

Anonymous
Not applicable

Yeah, it looks like that'll be a downside of the "contains" operator.

Josh_Hill13
Level 10 - Champion Alumni

You need to use a semi-colon

But also, you should use IS, not CONTAINS here. And you will need to list all the State options in the State field first.

As Emily said, use a picklist instead. There is a list on docs.marketo.com and on my site if you look for ISO Country List.


DO NOT let people type whatever, because they will and it will break your Ux and database workflows.

Anonymous
Not applicable

where do you find the standardized list of provinces for Canada?  How do I determine if these are being pulled from our Salesforce values?

Anonymous
Not applicable

Nancy Rosenthal​ check with your SFDC admin to see what the standardization format is in SFDC. They should also be able to provide you the list.