Skip to Content Skip to Menu

[SOLVED] Conditional logic in auto action email

  • lkessner
  • lkessner
  • OFFLINE
  • Posts: 15
  • Thanks: 1
  • Karma: 0
10 years 2 months ago - 10 years 2 months ago #248019 by lkessner
Hello,

I make some experiments with the auto action e-mail function.
My scenario are follow:
i would send an e-mail to the moderator when a user update the phonenumber.
In Profile it gives three numbers (private, mobile,work) and an check box phone_notification (send mail only when true). Now i create an auto action with this condition: phone_notification == 1 and a second condtion var1_mobile != var3_mobile. I think the conditions are use & logic. Thats ok, and work fine. Now i can create the same notification for the other numbers, but it gives three e-mails.
Give it an possibility to change the logic between conditions?
Example 4 conditions:

phone_notification == 1 & (var1_mobile != var3_mobile | var1_phoneprivate != var3_phoneprivate | var1_phonework != var3_phonework )


Lars
Last edit: 10 years 2 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
10 years 2 months ago #248057 by krileon
Replied by krileon on topic Conditional logic in auto action email

Give it an possibility to change the logic between conditions?

No, no such feature exists, but you can sort of do this by combining the values. Example as follows.

[var1_mobile][var1_phoneprivate][var1_phonework] Not Equal To [var3_mobile][var3_phoneprivate][var3_phonework]

The condition should pass if any of the 3 fields values change.


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.

  • lkessner
  • lkessner
  • OFFLINE
  • Posts: 15
  • Thanks: 1
  • Karma: 0
10 years 2 months ago #248077 by lkessner
Replied by lkessner on topic Conditional logic in auto action email
Hi Kyle,

i have tested it, but with this condition i get also an e-mail by changeing another field. Not one of this.

The E-Mail shows me that the old and new value of phonenumbers are the same.

Lars

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
10 years 2 months ago - 10 years 2 months ago #248088 by krileon
Replied by krileon on topic Conditional logic in auto action email
You can try applying a trim to both sides to see if a trailing space might be causing them to mismatch. Example as follows

Left: trim([var1_mobile][var1_phoneprivate][var1_phonework])
Operator: Not Equal To
Right: trim([var3_mobile][var3_phoneprivate][var3_phonework])

Ensure when you input these values there is no extra spaces in it.

If that doesn't work then next step is using multiple auto actions or using a CB Query Field to do the computation for you then condition the query field.


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.
Last edit: 10 years 2 months ago by krileon.
The following user(s) said Thank You: nant

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

  • lkessner
  • lkessner
  • OFFLINE
  • Posts: 15
  • Thanks: 1
  • Karma: 0
10 years 2 months ago #248180 by lkessner
Now it works with trim and a little mistake in writing.
It's not the perfekt solution, but it works :-)

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

Moderators: beatnantkrileon
Powered by Kunena Forum