Auto Action: check multiple select items when one items is checked

5 years 7 months ago #307273 by danpoole
Hi This is what I'm trying to achieve.
  1. I have a CB field called cb_modulescompleted it has values such as Module 1, Module 2, Module 3 etc.
  2. if a user has completed Module 3 then they would have also completed module 1 & 2 and those values should also be selected in the field
  3. the user database has been poorly maintained an in alot of cases Modules 1 & 2 have not been selected
  4. I am trying to make an Auto Action to check Module 1 & Module 2 values (checkboxes) if module 3 is selected

Auto Action Setup:
==============
Global
Triggers: onAfterLogin, onAfterUserProfileSaved
Type: Field

Conditions
Value: [cb_modulescompleted]
Operator: Is REGEX
Value: /m3/
Translate: checked
Format: checked
Prepare: unchecked

Action
Field: cb_modulescompleted
Operator: Set (Field = Value)
Value: m1
Translate Value: No
Save Directly: Yes

Now in the users section when I check Module 3 and save, the result is Module 1 is checked but Module 3 gets unchecked. Please note that I have also used the + Add Rows button to the right and did the same action values as above but changed the value to m2. When doing this the Module 2 checkbox is checked instead of checkbox 1.

I hope this is enough to go on, any guidance on this would be greatly appreciated.

Please Log in to join the conversation.

5 years 7 months ago #307278 by krileon
Multicheckbox and Multiselect fields store as |*| delimitered. This means if multiple values are selected you'd have VALUE_1|*|VALUE_2|*|VALUE_3 for example. So you should be setting your field to m1|*|m2|*|m3 based off the information you've provided.


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: nant

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.147 seconds

Facebook Twitter LinkedIn