Choosing 1 of 2 values in an auto action

1 year 7 months ago #330402 by PaceOnline
Choosing 1 of 2 values in an auto action was created by PaceOnline
I am configuring an request auto action and for one of the keys e.g. code i have a number of fields that I can send so it could be [cb_driver] [cb_class] or [cb_pilot] can I use an if statement to choose one for the value parameter so e.g. if[cb_driver] is_empty then [cb_pilot] else [cb_driver] + [cb_class] 

Please Log in to join the conversation.

1 year 7 months ago #330408 by krileon
Replied by krileon on topic Choosing 1 of 2 values in an auto action
Yes, you can use IF substitutions to send a conditioned value. See the bottom of our substitutions tutorial below as it provides examples for IFELSE and ELSE usages.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb


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.

1 year 7 months ago #330436 by PaceOnline
Replied by PaceOnline on topic Choosing 1 of 2 values in an auto action
Thanks. Is there an operator for empty. Can use [cb:if cb_institutions empty ]There are no institutions in the profile.[/cb:if]

Please Log in to join the conversation.

1 year 7 months ago #330443 by krileon
Replied by krileon on topic Choosing 1 of 2 values in an auto action
For empty you'd IF condition against empty string. Example as follows.

[cb:if cb_address=""]Address is empty.[/cb:if]


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.

Moderators: beatnantkrileon
Time to create page: 0.214 seconds

Facebook Twitter LinkedIn