Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] How to check DB field value in Auto Action Conditional?

  • Wai Wai
  • Wai Wai
  • OFFLINE
  • Posts: 24
  • Thanks: 2
  • Karma: 1
11 years 1 week ago - 11 years 6 days ago #235734 by Wai Wai
I have the following action to send email to user when the moderator approved account.

Published = Yes
Title = Email User to Notify Approval
Description = Send notification email to user to inform registration has been approved.
Type = Email
Triggers = onAfterUserApproval
User = Automatic
Access = Everybody
Conditional = [cb_usertype] Equal To _UE_ANT_PARTNER

Email Action
To: \[email\]
Subject: Your registration is approved
Body:
Dear [name],

Your registration has been approved by moderator.......
Kind Regards,
Website Administration Team

Mode = Text

When moderator approves the user, this email is sent to user to notify approval. It's fine. But when moderator rejects by using workflow module, both this approval email and reject email are sent together.

I think I must add one more conditional as below in red:
Conditional = [cb_usertype] Equal To _UE_ANT_PARTNER
approved Equal To 1 or [approved] Equal To 1

I have tried but both are not working.
Let me know what is the format for the DB field name check (approved? or [approved]? or something else?) or please give me the link to Auto Action manual. I don't see any document for it in download area. Thank.
Last edit: 11 years 6 days ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 1 week ago #235766 by krileon
With the onAfterUserApproval trigger you can compare against the below to get an accurate check as to what the approval status was changed to.

[var2] Equal To 1

The second variable of onAfterUserApproval is the $approval value. Please see the below Trigger tutorial for other variables available to it.

www.joomlapolis.com/support/tutorials/120-api-usage/18358-using-cb-triggers

or please give me the link to Auto Action manual. I don't see any document for it in download area.

There isn't one. Documentation for CB Auto Actions is not possible. It's simply a tool so the documentation would be the information already provided next to each input. We've provided a few usage tutorials however below.

www.joomlapolis.com/support/tutorials/107-use-cases


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

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

  • Wai Wai
  • Wai Wai
  • OFFLINE
  • Posts: 24
  • Thanks: 2
  • Karma: 1
11 years 6 days ago #235825 by Wai Wai
Thank for your reply!

It's work now.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum