Skip to Content Skip to Menu

How can I set trigger to fire only after a change to cb field value

10 years 7 months ago #243477 by prestoproducts
I have a cb auto action which is set to fire after the user updates their profile information. I would like to set a condition wherein the trigger only fires if a user changes the radio button on the field from “Yes” to “No” or from “No” to “Yes.”

In other words if they edit their profile and do not change the specified value then the trigger should not fire. What is the best solution for this?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 7 months ago #243498 by krileon
You can use the following usage in any action.

Trigger: onAfterUserUpdate
Conditional: [var1_FIELD_NAME] Not Equal To [var3_FIELD_NAME]

var1 is the new user object and var3 is the old user object. This would compare the field to its old value to see if it changed. If it did your action will perform. This only fires on frontend profile edit, but you can add backend profile edit from the dropdown as needed. Replace FIELD_NAME with the actual name of the field to condition (e.g. [var1_name] and [var3_name]).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum