Daniel B

Custom Profile Field (Toggle) as Condition upon registration

Recommended Posts

Hello there,

I'm trying to create a rule that adds a secondary member group to a registered user that toggles ON a yes/no custom profile field:

636159479_ScreenShot2019-06-18at3_17_13AM.png.75491fc7e76a60e9d2f5155c34521e23.png

I'm using the Truth value for this custom profile field. But it does not work:

240334260_ScreenShot2019-06-18at3_18_40AM.png.0139849205e8c74c87bf1ebb5d8e8daf.png

Any advise?

Already tried "Value is TRUE or equivalent to TRUE (any non-empty string/array, number not 0)" but doesn't work either.

Regards.

Edited by Daniel B

Share this post


Link to post
Share on other sites

Looks like your comparing the "Member that was created", which is a Member object to see if its value is Boolean TRUE. Which an object is not a boolean true value.

I'm not sure how the value for that checkbox is represented in the system, but I'm guessing that at a minimum, you want to use the "Value is TRUE or equivalent to TRUE" condition to do a soft evaluation of the value.

And the value you want to compare is not the "Member that was created". You want to compare against the value of their custom profile field.

Share this post


Link to post
Share on other sites

But when I compare against "Member that was created" isn't the content between parenthesis the custom field already? (pre-candidato is the custom field) ... Or should I use [member:field_xx] instead?

Share this post


Link to post
Share on other sites

Hi Kevin. Unfortunately already tried with that Comparison Type and it fails as well. The debug simply states that the condition didn't meet. So I'm really not sure how to troubleshoot.

Share this post


Link to post
Share on other sites

It's probably because that field has not yet been populated by the member creation process at the time when the rule is ran (which is immediately after the member object is created.) I'm guessing it is a timing issue. You need your rule to run at the end of the member creation process, but it's actually triggered at the very beginning.

To compensate for that, you need to offset your condition evaluation to the end of the process. In order to do that, create a custom action from the Rules ACP which takes a member argument. Then create a rule for that custom action which checks the profile field value and has the appropriate actions if the condition is true. Then what you do is trigger your custom action from the "Member created" event, but you set the action to run at the end of the page load, that way, your custom action rule can evaluate against the member once the member data has been fully populated by the creation process.

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.