Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

[SOLVED] Auto Action for Managing Connections: database trigger

  • cberry1971
  • cberry1971
  • OFFLINE
  • Posts: 125
  • Thanks: 7
  • Karma: 0
12 years 2 months ago #214860 by cberry1971
Don't you just hate it when you have something solved and then have to come back an re-post. Moving on:

I have the CB Query Plugin,

Created a query field and query with settings shown in screenshot.




2 items:

1. can I use [user_id] in the query?
2. I don't see the field in _comprofiler. Guessing I need some trigger to populate the field?

Many thanks for the help.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago #214871 by krileon
Your image didn't attach so no idea what your configuration is.

1. can I use [user_id] in the query?

Yes.

2. I don't see the field in _comprofiler. Guessing I need some trigger to populate the field?

Query fields do not exist in database. They are calculated fields. You can not adjust them or store them like a normal field.


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.

  • cberry1971
  • cberry1971
  • OFFLINE
  • Posts: 125
  • Thanks: 7
  • Karma: 0
12 years 2 months ago - 12 years 2 months ago #214878 by cberry1971
You answered my question. Just posting image for anybody else who might benefit from this post:


Attachments:
Last edit: 12 years 2 months ago by cberry1971.

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

  • cberry1971
  • cberry1971
  • OFFLINE
  • Posts: 125
  • Thanks: 7
  • Karma: 0
12 years 2 months ago #214881 by cberry1971
This is falling into the category of "all great things are worth working for".

Ok, I have two query fields:

1. Event Creator Query: returns the event_id of events created by User Group: Event Creator
2. Athlete Registration Query: returns the event_id of Athlete's registered events

I was hoping thru a auto action to have (on Profile Display) the Athlete and/or Affiliate connect Users who have one Event Creator Query AND Athlete Registration Query match.

Unfortunately, I got to the Auto Connect form and see

Users field: "Input comma separate list of user ids to connect user to."

screenshot:


totally stumped and I know you are likely out for the weekend. I will keep researching and post back if I don't hear from anybody til Monday :silly:
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago #214971 by krileon

You answered my question. Just posting image for anybody else who might benefit from this post:

Your query is incorrect and your where statement is backwards. Please Try the below (avoid unnecessary linebreaks).
Code:
SELECT `ohanah_event_id` FROM `#__ohanah_events` WHERE `created_by` = '[user_id]'

totally stumped and I know you are likely out for the weekend. I will keep researching and post back if I don't hear from anybody til Monday

You first need to add your conditionals to the auto action. These can be substitutions or straight values. Example as follows

[cb_query] Greater Than 0

Once you've your conditions setup you need to give it the user id of who you want the user to connect to. This is specifically where the query field that gives you the user id comes in and you'd supply such a field with a substitution (e.g. [cb_queryfield]).


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.

Moderators: beatnantkrileon
Powered by Kunena Forum