In SharePoint Online, creating form in List using Content Type, making other column invisible based on previous columns choice selection (Yes or no )

Anonymous
2024-03-18T22:00:51+00:00

how can we format first column ( say employee ) to only be visible if other column ( say internal ) choice type selection is "no" and if selection is "yes" then first column invisible.

Can we use JSON formatting in this case, since JSON formatting which I am using is not working. Its as below:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",

"elmType": "div",

"children": [

{ "elmType": "div", "txtContent": "@employee",

"style": {

"display": "=if([$internal] == 'Yes', 'block', 'none')",

"pointer-events": "=if([$internal] == 'Yes', 'auto', 'none')",

"opacity": "=if([$internal] == 'Yes', '1', '0.5')"

}

}

]

}

Help would be greatly appreciated

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Anonymous
    2024-03-21T05:34:50+00:00

    Dear Kaur Albertan,

    Thanks for writing back with us.

    As per the first screenshot attached, I have noticed there is source field in your column and it looks like you opened the column from the Content type and clicked on the Edit column.

    In this situation, I would like to you provide us the URL of the Column Settings via below steps:

    Step 1: Open the SharePoint Online List> Settings> List Settings.

    Step 2: Scroll down to columns in the List Settings and click on the column name:

    Step 3: Copy the URL and paste it here.

    Moreover, can you please try the below formula and see whether there is any success?

    =if([$Is_x0020_Facility_x0020_Manager_x0020_making_x0020_this_x0020_request_x003F_] == ‘Yes’, ‘true’, ‘false’)

    Appreciate your patience and understanding with us. Have a great day!!

    Best Regards,

    Sophia

    0 comments No comments