Skip to main content
3 of 4
added 88 characters in body; edited tags; edited title
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182

Why is my Rules data comparison not evaluating correctly?

This should be easy, but I can't figure out what is going wrong. I have created a field on the user account called "User profile type." It has two options: "General user" and "Grant Network user".

I am trying to create a rule (using the Rules module)to apply a role to these options if they are selected upon saving or updating of the user account form.

However, despite everything I have tried, I can't get the data comparison to evaluate as TRUE:

  • I am selecting site:current-user:field-user-profile-type:0 as the data to compare.
  • Then, in the conditions field, I am given the option in the direct input method to choose the item I want.
  • I am trying to choose "Grant Network user" and it evaluates to FALSE every time no matter what I try.
  • I have set it up with an OR statement, so that I also am selecting site:current-user:field-user-profile-type:1 as well. But, neither of these will evaluate to TRUE.

The weird thing is that when I test these data selection values in a rule to show a message on the site, they both display a message of "Grant Network user."

So, I don't understand why the data comparison is evaluating to FALSE.

Any ideas? It's probably something simple, but I can't seem to figure it out.