I'm trying to filter out Choice Types that are Optional and Not Optional. I am using a Task List on 2019 on prem. I've used different formulas but they end up with syntax errors and I cannot save it.
-
What are the options of this "Choice Type" column? And where have you defined if which option is either optional or not-optional?Dikesh Gandhi– Dikesh Gandhi2024-10-28 08:37:00 +00:00Commented Oct 28, 2024 at 8:37
-
Hi @DikeshGandhi "Choice Type 1, Choice Type 2, Choice Type 3, Choice Type 4" It's my first time using filtered views like this, I'm doing this at the request of a semi technical user so where should I have the "Optional" "Not Optional" defined. Thanksuser79745– user797452024-10-28 09:00:12 +00:00Commented Oct 28, 2024 at 9:00
-
It seems there is no OOTB options available. You can customize list forms using Power Apps and in that you can write logic to make few options are required and display validation message if user has not selected those options. Reference: learn.microsoft.com/en-us/sharepoint/dev/business-apps/…Dikesh Gandhi– Dikesh Gandhi2024-10-28 09:33:04 +00:00Commented Oct 28, 2024 at 9:33
-
1@user79745 Are you just trying to show "Optional" and "Not Optional" as text results in your calculated column OR are you trying to make entries in any column/field optional/mandatory based on choice column?Ganesh Sanap - MVP– Ganesh Sanap - MVP2024-10-28 10:46:59 +00:00Commented Oct 28, 2024 at 10:46
-
@GaneshSanap-MVP wants to show Optional/Not Optional. I figured out that it's the OR function that causing problems, just trying to figure out a way around an OR statement.user79745– user797452024-10-28 11:16:33 +00:00Commented Oct 28, 2024 at 11:16
|
Show 3 more comments
1 Answer
If you want to show "Optional" as a result when "Choice Type" is either "Choice Type 1" OR "Choice Type 2" OR "Choice Type 3",
Try using calculated column formula like this:
=IF(OR([Choice Type]="Choice Type 1",[Choice Type]="Choice Type 2",[Choice Type]="Choice Type 3"),"Optional","Not Optional")
Note:
- Sometimes comma(
,) does not work in formula (it is based on language or regional settings on your site). So in that case use semicolon(;) instead of comma(,). - Use correct display name of your SharePoint columns in above formula.
- Wrap column names inside
[]if your column name has space in it. For example:[My Column Name].
-
1You are awesome! Finally got it to work. Thanks!user79745– user797452024-10-28 11:29:21 +00:00Commented Oct 28, 2024 at 11:29
-
You are welcome, glad it worked for you!Ganesh Sanap - MVP– Ganesh Sanap - MVP2024-10-28 11:33:39 +00:00Commented Oct 28, 2024 at 11:33
