Forum Discussion
SharePoint Json If statement for visibility based on Other Colums being empty/ filled
I've been trying to create a SharePoint list in which a button is visible when two of the columns of that row have a value entered. I've tried looking for answers but can't find anything that has worked.
I'm trying to check that the column name Approvers for that item is not empty (for which I'm trying to check that it is not equal to null). Ideally I would like to check that Sender is not null but any help would be appreciated. Here's what my JSON file looks like:
As you can see the approvers field doesn't change the visibility. Any help would be much appreciated!!
- "visibility": "=if([$Approver] == '' && [$Sender]=='' && Number([$Deadline]) == 0 ,'hidden','visible')"Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)
- RobElliottSilver Contributor
Stanislawo "visibility": "=if([$Approvers] == '' ,'hidden','visible')" where the =='' uses single quotes.
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)- StanislawoCopper ContributorThank you so much!! I'm a bit gutted that I didn't try that, do you know how I could incoroporate an and statement into the if statement? Exact same thing but for another column called senders.
- RobElliottSilver Contributor
Stanislawo just add && [$Senders]=='' for and or use pipes || for or
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)