Aug 23 2022 03:18 AM
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!!
Aug 23 2022 03:30 AM
@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)
Aug 23 2022 03:38 AM
Aug 23 2022 03:44 AM
@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)
Aug 23 2022 09:16 AM
@RobElliott Thanks a lot, I've this but unfortunately it looks like the date column always has a value, I tried finding what default value that may be but couldn't find anything. Here's a visual representation of the issue I've got:
Here's the code too:
Aug 24 2022 12:48 AM
SolutionAug 24 2022 01:34 AM
@Stanislawo There are couple of ways to check if date column is empty or not.
One way suggested by @RobElliott using Number() function works well (+1).
Other ways are to use the toString() function OR directly refer to column name like ![$Deadline].
Check: SharePoint JSON formatting: Check if date & time column is blank/empty
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Aug 24 2022 03:02 AM
Aug 24 2022 12:48 AM
Solution