Sharepoint : Show or hide columns in a list or library form with or operater

Dora Yeh葉逸文 176 Reputation points
2022-01-13T08:23:57.52+00:00

Hi, there

I want to do conditional formula , in my case, Category has five option: Apple, Banana , Orange , Mango, Peach.
When select Apple, Banana, Orange , another input is shown.

How to do that ,please tell me, thanks.

Best regards,
Dora.

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
{count} votes

Answer accepted by question author
  1. Echo Du_MSFT 17,341 Reputation points
    2022-01-14T02:30:28.32+00:00

    Hi @Anonymous ,

    Please follow the steps:

    1.In my test, I have a Choice column named [Category] and a Single line of text column named [Format]

    164907-f1.jpg

    2.You can choose to hide [Format] on view

    164928-f2.jpg

    3.On the "Edit columns in the form" panel, select [Format] (the field that you want to hide) and click Edit conditional formula

    164973-f3.jpg

    4.Use the below formula:

    =if([$Category] == 'Apple' || [$Category] == 'Banana' || [$Category] == 'Orange', 'true', 'false')  
    

    164929-f4.jpg

    5.The [Format] only appears on the Edit Form when you select "Apple" or "Banana" or "Orange"

    164974-hide-column.gif

    Thanks,
    Echo Du

    ==================================

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.