Auto action, send a mail when field is given a val

12 years 1 month ago - 12 years 1 month ago #195014 by fribse2011
Is it possible to add an auto action that reacts when a user field is changed to a specific value?

I would like to send a mail when a field is changed from 'not payed' to another value.
I can see that I have a trigger that I can set when profile is modified in the frontend or backend, but how do I make a condition so it will only send a mail if the value in question is changed?

My idea so far is:

Type: Email
Triggers: onAfterUserUpdate,onAfterUpdateUser
User: Automatic
Access: Everybody
Conditional: ??? NOT EQUAL TO 'not payed'
Email action: [email]

But this action will send a mail EVERY time the profile is changed?

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

12 years 1 month ago - 12 years 1 month ago #195039 by krileon
Conditions support full substitutions (see info directly next to input for details and special functions). You could for example use the below.

Left: [cb_myfield]
Operator: Not Equal To
Right: not payed

But this action will send a mail EVERY time the profile is changed?

Yes, if that condition is met it will.

If you want it to send only 1 time when the field is changed you could use the below (requires 2 conditions)

Condition 1
Left: [cb_myfield]
Operator: Not Equal To
Right: [var4_cb_myfield]

Condition 2
Left: [cb_myfield]
Operator: Not Equal To
Right: not payed

Note in the above the "var4". The 4th variable provided by these triggers is the previous values. This means [cb_myfield] will be what I just change the field to and [var4_cb_myfield] will be what I just changed the field from.


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 to join the conversation.

12 years 1 month ago #195098 by fribse2011
Hey, neat! Thankyou!

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

12 years 1 month ago #195104 by fribse2011
Ok, maybe you can explain to me what I'm doing wrong.

I've created a test user, and I've set him to 'Endnu ikke betalt'.
Then I go in, via the backend, and change the value to '2012'
The field cb_betalt is a multiselect field.
As I understand it, the rule below both triggers on frontend and backend profile modification, and with the very neat var4, asks for the value before and after.


Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.
Attachments:

Please Log in to join the conversation.

12 years 1 month ago #195162 by krileon
The conditions are not what I supplied, please see my previous reply. The first condition needs to first check if the field was even changed. That's done with the below.

[cb_betalt] Not Equal To [var4_cb_betalt]

If the above passes it means the fields value differs from the previous meaning it was changed. After that you can do your matching for a value such as the below.

[cb_betalt] Does Contain 2012


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.
The following user(s) said Thank You: fribse2011

Please Log in to join the conversation.

12 years 1 month ago #195171 by fribse2011
Ah, yes, I misunderstood, I'll give it a go, excellent, thanks!

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.225 seconds

Facebook Twitter LinkedIn