Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

Create a new function by "Auto Action" & "Query Field"

  • shih
  • shih
  • OFFLINE
  • Posts: 49
  • Thanks: 1
  • Karma: 0
6 years 3 months ago - 6 years 3 months ago #306864 by shih
I am trying to create a new function of my website with "Auto Action" and "Query Field".

My Goal :

After users "link" a music video in their own CB gallery, based on the information they put along with the video,(that's the name of the song), I want to recommend the users to join a group with exactly the name of that song by email. I use GroupJive.

Process:

A. Create 2 Query Fields:
[cb_music_piece]


[cb_group_name]


B. Set up "Auto Action":

1. I found 3 "tiggers" in Auto Action, they are:



2. The Conditions setting:


3. The Action setting:



However, it didn't work out. Could you tell me what's wrong with all my setting?
Last edit: 6 years 3 months ago by shih.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 3 months ago #306866 by krileon
Check that your fields are outputting as expected on the users profile. Your auto action is just comparing those two fields and sending an email so if they output fine on profile the auto action condition will also work fine. More than likely your queries need adjustments as both can respond with more than 1 result and I suspect you only want the most recent.

It likely would be better to use a Code action and set Method to PHP then simply code out a custom solution that handles looking for groups that match their uploads, which should act on the gallery_onAfterCreateGalleryItem trigger.


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.

  • shih
  • shih
  • OFFLINE
  • Posts: 49
  • Thanks: 1
  • Karma: 0
6 years 3 months ago #306875 by shih
Thanks. But I am still new to PHP coding. In this site, do we have any tutorial or any examples of using "CB code field"? And do you guys help with PHP code with additional charge?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48560
  • Thanks: 8292
  • Karma: 1445
6 years 3 months ago #306887 by krileon

do we have any tutorial or any examples of using "CB code field"?

No, you wouldn't be using CB Code Field. You'd be using a Code action in CB Auto Actions and coding the group lookup based off upload (for that trigger the upload would be var3). Both Code action and CB Code Field however simply take your PHP and execute it and in the case of CB Code Field it displays the results of your PHP as the fields value.

And do you guys help with PHP code with additional charge?

No.


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.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
6 years 3 months ago #306892 by nant

krileon wrote: More than likely your queries need adjustments as both can respond with more than 1 result and I suspect you only want the most recent.


I think adding a LIMIT 1 at the end of your queries will help.

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

Moderators: beatnantkrileon
Powered by Kunena Forum