I've created a CB action Type "Private Message" that sends a welcome PM to the user onAfterlogin with a popup, and it works great.
The issue is that it will send the PM every time the user logs in, in spite of the fact that I've setup a condition "only to be send if the field cb_welcomesent is Not Equal to 1". And even though "when the field is 1" the PM is sent anyway.
This is my setup:
CB Field Management
New Field
name: cb_welcomesent
type Checkbox (Single)
CB Auto Actions
1st action (Welcome Private Message)
Private Message Auto Action Global
Type: Private Message
Triggers: onAfterLogin
User: Automatic
Access: Everybody Conditions
cb_welcomesent Not Equal To 1
2nd action (Update cb_welcomesent_field)
Field Auto Action Global
Type: Field
Triggers: onAfterLogin
User: Automatic
Access: Everybody Conditions
cb_welcomesent Not Equal To 1
So when I login as the user with the cb_welcomesent Not checkmarked "no"
I've get the PM and the cb_welcomesent gets check marked to "yes"
I read the Message and Proceed to delete it.
When I logout and Log back In
I still get the PM even though the cb_welcomesent filed is check marked to "Yes"
What am I doing wrong?
Thank you,
Attachments:
Last edit: 8 years 2 months ago by krileon. Reason: Added [SOLVED] tag to subject
Your condition ins't a valid substitution. It's literally comparing the text cb_welcomesent to 1 and since the text cb_welcomesent can never be 1 your condition always passes. You need to use proper substitution format for that to work such as [cb_welcomesent]. See the below for substitution usage information.
If you only want it to do this for the first login there's a trigger that fires only on first login that you could use instead. More specifically onAfterFirstLogin.
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.
I'm sorry!
You are right!!!
I forgot the brackets [ ]
Hahahahah!!!
This system is so powerful, I feel like a little kid with a new toy!
It works great now!
and yes the onAfterFirstLogin I will use for the 1st welcome message,
this was just an experiment to see if I could send targeted PMs,
and it obviously works great!