Sharepoint List Help

%3CLINGO-SUB%20id%3D%22lingo-sub-2750177%22%20slang%3D%22en-US%22%3ESharepoint%20List%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2750177%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20I%20am%20trying%20to%20create%20a%20sharepoint%20list%2C%20where%20one%20of%20the%20option%20is%20to%20enter%20a%20two%20digit%20state.%26nbsp%3B%26nbsp%3B%20I%20currently%20have%20an%20%3DOR%20statement%20that%20works%20just%20fine%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DOR(State%3D%22AR%22%2CState%3D%22AZ%22%2CState%3D%22CA%22%2CState%3D%22IL%22%2CState%3D%22IN%22%2CState%3D%22KS%22%2CState%3D%22MI%22%2CState%3D%22MO%22%2CState%3D%22NV%22%2CState%3D%22OH%22%2CState%3D%22OK%22%2CState%3D%22TX%22%2CState%3D%22WI%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eif%20a%20user%20does%20not%20enter%20one%20of%20the%20above%20state%20abbreviations%20in%20the%20sharepoint%20form%2C%20they%20get%20an%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehowever%2C%20I%20now%20need%20to%20add%20additional%20states.%26nbsp%3B%26nbsp%3B%20where%20I%20will%20have%20a%20total%20of%2035%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DOR(State%3D%22AR%22%2CState%3D%22AZ%22%2CState%3D%22CA%22%2CState%3D%22CO%22%2CState%3D%22CT%22%2CState%3D%22DE%22%2CState%3D%22HI%22%2CState%3D%22IA%22%2CState%3D%22ID%22%2CState%3D%22IL%22%2CState%3D%22IN%22%2CState%3D%22KS%22%2CState%3D%22MA%22%2CState%3D%22MD%22%2CState%3D%22ME%22%2CState%3D%22MN%22%2CState%3D%22MI%22%2CState%3D%22MO%22%2CState%3D%22MT%22%2CState%3D%22NE%22%2CState%3D%22NM%22%2CState%3D%22NJ%22%2CState%3D%22NV%22%2CState%3D%22NY%22%2CState%3D%22OH%22%2CState%3D%22OK%22%2CState%3D%22OR%22%2CState%3D%22PA%22%2CState%3D%22RI%22%2CState%3D%22TX%22%2CState%3D%22UT%22%2CState%3D%22VA%22%2CState%3D%22WA%22%2CState%3D%22WI%22%2CState%3D%22WV%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20get%20an%20error%20on%20this%2C%20and%20from%20what%20i%20read%2C%20only%2030%20OR%20statements%20are%20allowed.%26nbsp%3B%26nbsp%3B%20is%20there%20a%20better%20way%20to%20go%20about%20doing%20this%3F%26nbsp%3B%26nbsp%3B%20while%20keeping%20it%20simple%3F%26nbsp%3B%26nbsp%3B%26nbsp%3B%20I%20have%20read%20where%20you%20can%20nest%20AND%20statements%2C%20but%20can%20you%20nest%20OR%20statements%20somehow%3F%26nbsp%3B%26nbsp%3B%20thanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2750177%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Lists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2750407%22%20slang%3D%22en-US%22%3ERe%3A%20Sharepoint%20List%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2750407%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1155813%22%20target%3D%22_blank%22%3E%40sm8224%3C%2FA%3E%26nbsp%3B-%20What%20is%20your%20field%20type%3F%26nbsp%3B%20Couldn't%20you%20use%20a%20Choice%20field%20and%20just%20have%20the%20two%20code%20options%20in%20the%20data%20for%20the%20Choice%3F%26nbsp%3B%20Are%20you%20setting%20this%20up%20in%20the%20column%20validation%3F%26nbsp%3B%20If%20you%20don't%20want%20a%20choice%20column%2C%20have%20you%20considered%20creating%20a%20customized%20form%20for%20the%20list%20in%20Power%20Apps%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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.

2 Replies

@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?  

I 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