SOLVED

Conditional formula to hide/show columns in Sharepoint List Edit Form

%3CLINGO-SUB%20id%3D%22lingo-sub-1502240%22%20slang%3D%22en-US%22%3EConditional%20formula%20to%20hide%2Fshow%20columns%20in%20Sharepoint%20List%20Edit%20Form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1502240%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20was%20able%20to%20create%20a%20formula%20based%20on%20this%20posting%20from%20Microsoft%20(link%20below)%20and%20it%20works%20great.%26nbsp%3B%20However%2C%20I%20want%20to%20be%20able%20to%20write%20it%20so%20it%20looks%20at%202%20different%20values%20in%20a%20field%20to%20show%20the%20column%20or%20not%20in%20the%20Edit%20Form.%26nbsp%3B%20Can%20someone%20help%20me%20write%20the%20formula%20so%20that%20I%20can%20have%20an%20OR.....like%20in%20the%20example%20below%20I%20would%20like%20to%20have%20it%20work%20if%20%22Category%22%20equals%20Product%20OR%20Service.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3Dif(%5B%24Category%5D%3D%3D'Product'%2C'true'%2C%20'false')%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Flist-form-conditional-show-hide%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Flist-form-conditional-show-hide%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20did%20see%20someone%20say%20that%20this%20could%20be%20used%20as%20the%20indicator%20for%20or%20%7C%7C%20but%20I%20wrote%20the%20formula%20lots%20of%20ways%20and%20never%20could%20get%20it%20to%20work.%26nbsp%3B%20Thank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1502240%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1503481%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20formula%20to%20hide%2Fshow%20columns%20in%20Sharepoint%20List%20Edit%20Form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1503481%22%20slang%3D%22en-US%22%3EHi%2C%20have%20you%20tried%20using%20like%20the%20below%3CBR%20%2F%3E%3CBR%20%2F%3E%3Dif(%5B%24Category%5D%3D%3D'Product'%2C%3Dif(%5B%24Category%5D%3D%3D'Service'%2C'true'%2C%20'false')%2C%20'false')%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1503482%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20formula%20to%20hide%2Fshow%20columns%20in%20Sharepoint%20List%20Edit%20Form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1503482%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3ETry%20this%2C%20it%20should%20work%20like%20a%20charm%3CBR%20%2F%3E%3CBR%20%2F%3E%3Dif(%5B%24Category%5D%20%3D%3D%20'Product'%20%7C%7C%20%5B%24Category%5D%20%3D%3D%20'Service'%2C'true'%2C'false')%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1508553%22%20slang%3D%22en-US%22%3ERe%3A%20Conditional%20formula%20to%20hide%2Fshow%20columns%20in%20Sharepoint%20List%20Edit%20Form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1508553%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F144422%22%20target%3D%22_blank%22%3E%40Sudharsan%20K%3C%2FA%3E%26nbsp%3B%20%26nbsp%3BThank%20you!!%26nbsp%3B%20This%20worked%20perfectly%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi,

I was able to create a formula based on this posting from Microsoft (link below) and it works great.  However, I want to be able to write it so it looks at 2 different values in a field to show the column or not in the Edit Form.  Can someone help me write the formula so that I can have an OR.....like in the example below I would like to have it work if "Category" equals Product OR Service.  

 

=if([$Category]=='Product','true', 'false')

 

https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/list-form-conditional-show...

 

I did see someone say that this could be used as the indicator for or || but I wrote the formula lots of ways and never could get it to work.  Thank you.

3 Replies
Highlighted
Hi, have you tried using like the below

=if([$Category]=='Product',=if([$Category]=='Service','true', 'false'), 'false')
Highlighted
Best Response confirmed by cmaly (Occasional Contributor)
Solution
Hi,
Try this, it should work like a charm

=if([$Category] == 'Product' || [$Category] == 'Service','true','false')
Highlighted

@Sudharsan K   Thank you!!  This worked perfectly