Field formula to get current user's role
# ask-stanley-ai
a
Field formula to get current user's role
c
AI generated answer (using internal Slack threads):
To get the current user's role in a formula, you can use
{user.role}
. This will return the role of the current user in the context of the formula. If you want to rank roles in a search, you can create a Formula (numerical) column using a CASE WHEN statement which assigns a value to each role, then adds those cumulative values. Here's an example:
Copy code
code
CASE {role}
WHEN 'Role 1' THEN '01'
WHEN 'Role 2' THEN '02'
WHEN 'Role 3' THEN '03'
...
END
Replace 'Role 1', 'Role 2', etc. with the actual role names in your NetSuite account. The numbers '01', '02', etc. are the ranks you assign to each role. You can then sort by this formula column to get the users listed by their most permissive role. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818237305
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813964903
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.805053711
Please provide your feedback on this answer.
Thank you for your feedback