Forum Discussion
SharePoint form "Edit Columns" with "Conditional Formula" and available field properties
I am trying to find out where I can find a complete list of the available "properties" of a column, so I don't have to continually ask in a forum.
For example, I am trying to set a "conditional formula" to show a column on the default New Experience forms when the current user a specific person (people column-single input).
eg
=if([$CurrentUser.email] == 'name @ domain dot com', 'true', 'false')
What are the right properties and where can I find the list for this or any column for that matter, so can learn to solve these questions on my own.
AND
Similarly the correct syntax/properties to use for say a people column, MS help shows this,
=if([$Owner.email] == 'name @ domain dot com', 'true', 'false')
I assume "Owner.email" is the created by person's email but that is not working when I change it to local user/email.
Thanks for any direction, suggestions.
2 Replies
SA-KRP15 You have to use the internal name of SharePoint list columns in conditional formulas and JSON formatting. Example: Internal name of "Created By" column is "Author".
You can get the internal name of your SharePoint list columns by following this article: How to find the Internal name of columns in SharePoint Online?
Person or Group (people) column supports these properties (with example values):
{ "id": "122", "title": "Kalya Tucker", "email": "email address removed for privacy reasons", "sip": "email address removed for privacy reasons", "picture": "https://contoso.sharepoint.com/kaylat_contoso_com_MThumb.jpg?t=63576928822", "department":"Human Resources", "jobTitle":"HR Manager" }Similarly, other column types support different properties.
You can find those at: SharePoint JSON formatting syntax reference - special string values
Related documentation: Conditionally show or hide columns in a list or library form
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.
- SA-KRPCopper Contributor
Thanks ganeshsanap , the syntax link is helpful and what I was looking for.
I used the @Me to compare against another column from the same list (as a test) and that is working,
=if([$Partner.email] == @me, 'true', 'false')The issue is, currently the user I want the column visible for is not listed in a people column on this list (possible future change I'll look at) but as a quick fix I was hoping to simply hardcode the email of the person. eg
=if(@me == 'user @ domain dot com', 'true', 'false')
- Can you confirm is it possible to use the @Me and compare against a static/hardcoded email address?
- The user I want to compare is in another list, but I assume the conditional formulas can only compare against columns in the current list only?