Forum Discussion
cmaly
Jul 01, 2020Brass Contributor
Conditional formula to hide/show columns in Sharepoint List Edit Form
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')
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.
- Hi,
Try this, it should work like a charm
=if([$Category] == 'Product' || [$Category] == 'Service','true','false')
- Sudharsan KSteel ContributorHi,
Try this, it should work like a charm
=if([$Category] == 'Product' || [$Category] == 'Service','true','false')- cmalyBrass Contributor
Sudharsan K Thank you!! This worked perfectly
- Sudharsan KSteel ContributorHi, have you tried using like the below
=if([$Category]=='Product',=if([$Category]=='Service','true', 'false'), 'false')- LCarroll5554Copper ContributorHey is there a way to do this but for if you want both conditions to be true for it to show instead of just one, E.g. for when you are referencing 2 different columns and one is a number as seen below.
=if([$Category]=='Product',=if([$Inventory]>='2','true', 'false'), 'false')
If Category is ‘Product’ and Inventory is 2 or less- cmalyBrass Contributor