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

5 years 8 months ago - 5 years 8 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?

Please Log in to join the conversation.

5 years 8 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 to join the conversation.

5 years 8 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 to join the conversation.

5 years 8 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 to join the conversation.

5 years 8 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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.228 seconds

Facebook Twitter LinkedIn