Workflow formula to compare current role with fiel...
# ask-stanley-ai
r
Workflow formula to compare current role with field of list roles
c
AI generated answer (using internal Slack threads):
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** To compare the current user role with a field of list roles in a workflow, you can use a formula in the condition builder. Here's a general approach based on the conversations: 1. In the workflow condition, select "Formula" from the dropdown. 2. In the formula field, you can use a comparison like
{userrole.id} = {customfield.id}
where
customfield.id
is the internal ID of your custom field that contains the list of roles. This will compare the current user's role ID with the ID of the role in your custom field. If your custom field is a multi-select field, you might need to use an
IN()
or
LIKE
formula to check if the role is contained in the multi-select values. For example, your formula might look something like
IN({userrole.id}, {customfield.id})
. Also, it's important to double-check role and field IDs, verify role assignments and permissions, check the workflow execution order, and test with users having the roles. Use logging/debugging if available and ensure the system is up to date. If you're still having trouble, you might find it helpful to create a saved search with the right formula. If you can get the formula working in a saved search, you can then replace it in the workflow or use the saved search as the condition.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.805356383
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.805171311
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.800487101
Please provide your feedback on this answer.