Okay so i have set a condition on a button:
If user’s role is not X then do action
However it seems like it doesn’t do anything, i tried “doesn’t contain” and “is not”
Anyone know what the issue could be ?
Okay so i have set a condition on a button:
If user’s role is not X then do action
However it seems like it doesn’t do anything, i tried “doesn’t contain” and “is not”
Anyone know what the issue could be ?
What are you saying? The workflow runs when it shouldn’t? Or doesn’t run when it should? or what?
yep it doesn’t work like it should
The user with the role, still makes the workflow run, while it shouldnt be running
It’s doing exactly what you told it to do.
Your workflow has two conditions:
price1
price2
Your user’s role contains price2
. So, condition 1. is true and condition 2. is false. Because at least one of these two conditions is fulfilled, the workflow runs.
Well (aside from the fact that I’ve got no idea why you’re using Stripe Price IDs as User Roles???), If a User has a ‘Role’ that contains one of the two price IDs you’ve entered in your condition then the workflow will run…
Is that not what you’re intending to happen?
ah so i inverted everything i guess, i want that if it contains 1 of those 2 plans it dont run
Change the or
to and
then
ah because i thought that AND would require both of those values to be true
Yes… we need both those conditions to be true…
okay i will try to explain it differently:
i got 6 plans 2 of them can’t access the feature, however 1 user can only have 1 plan, so i wanted to put a condition that if user has a plan that has no access to it it won’t get access, on the other hand if it has a plan thats not in the condition it gets access
There’s a much easier way to do this. Delete your ‘role’ data type on the user.
Create an option set ‘Role’. Each role has attributes:
For each role, add the list of permitted features. Let’s call the feature you’re talking about FeatureX. Add “FeatureX” as a text to the option set.
In your workflow, do only when 'current user’s Role’s PermittedFeatures contains “FeatureX”.
yep i tried to change with AND, and it doesn’t work, because Curren’t user cannot contain Price1 AND Price2 at the same time, it’s either Price1 or Price2
Current user’s role doesn’t contain price1
and current user’s role doesn’t contain price2
works.
Yes but create a new field ‘Features’ which is list of features. I’d use an option set but you can use a database thing if you’d like…
oh ok, i didn’t know that existed, also why a list ? i don’t understand the use case of a list of features
Because you want a list of features that each role can access.
ye but the value of the feature list will be something like “API Access; 200 Credits; Limited Entries…”
it’s static
Use an option set like I told you.
Give each role:
Features (list of texts)
API Access (number)
API Entries (number))
etc…