Forum Discussion
sm8224
Sep 14, 2021Copper Contributor
Sharepoint List Help
Hello, I am trying to create a sharepoint list, where one of the option is to enter a two digit state. I currently have an =OR statement that works just fine:
=OR(State="AR",State="AZ",State="CA",State="IL",State="IN",State="KS",State="MI",State="MO",State="NV",State="OH",State="OK",State="TX",State="WI")
if a user does not enter one of the above state abbreviations in the sharepoint form, they get an error.
however, I now need to add additional states. where I will have a total of 35:
=OR(State="AR",State="AZ",State="CA",State="CO",State="CT",State="DE",State="HI",State="IA",State="ID",State="IL",State="IN",State="KS",State="MA",State="MD",State="ME",State="MN",State="MI",State="MO",State="MT",State="NE",State="NM",State="NJ",State="NV",State="NY",State="OH",State="OK",State="OR",State="PA",State="RI",State="TX",State="UT",State="VA",State="WA",State="WI",State="WV")
I get an error on this, and from what i read, only 30 OR statements are allowed. is there a better way to go about doing this? while keeping it simple? I have read where you can nest AND statements, but can you nest OR statements somehow? thanks in advance.
- jefmeyerIron Contributor
sm8224 - What is your field type? Couldn't you use a Choice field and just have the two code options in the data for the Choice? Are you setting this up in the column validation? If you don't want a choice column, have you considered creating a customized form for the list in Power Apps?
- sm8224Copper ContributorI am using single line of text. i tried the choice type, but i dont like it. its not very clean, and opens up a large window, with the option far to the left of the screen. if it worked like a normal drop down list, that would be great. I have not tried a customized form in power apps. i'm new to using lists in general for now. Beyond that, so there does not seem to be a clean way to validate one of the state abbreviations? thanks