0

I have a list where I have a column I formatted in JSON to show an approval button.

The button only needs to display for 5 fixed persons.

How can I set this up?

I already tried with the mailadres == @me but it's not working.

 "display": "=if([$Status] == 'Aangevraagd' && '[email protected]' == @me , 'inherit','none')"
2
  • Is it working fine for 1 user? If yes, try using below given solution. Let me know if it works for you. Commented Sep 5 at 13:29
  • You can use toLowerCase() operator for email case sensitive issue, I have updated my answer below. Commented Sep 16 at 9:53

1 Answer 1

0

Try using expressions for display property like this:

"display": "=if([$Status] == 'Aangevraagd' && ('[email protected]' == @me || '[email protected]' == @me || '[email protected]' == @me || '[email protected]' == @me || '[email protected]' == @me), 'inherit', 'none')"

Documentation:

  1. Use column formatting to customize SharePoint
  2. SharePoint JSON formatting syntax reference

Update from comments:

You can use toLowerCase() operator for email case sensitive issue, use JSON like:

"display": "=if([$Status] == 'Aangevraagd' && (toLowerCase('[email protected]') == toLowerCase(@me) || toLowerCase('[email protected]') == toLowerCase(@me) || toLowerCase('[email protected]') == toLowerCase(@me) || toLowerCase('[email protected]') == toLowerCase(@me) || toLowerCase('[email protected]') == toLowerCase(@me)), 'inherit', 'none')"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.