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 - 12 years 2 months ago #214770 by cberry1971
First and foremost,

Thanks for all the great support! I plan to comment / donate etc as soon as I dig out from a mountain of work.

Case setup:

1. User Type: Event Creator. Registers and logs in thru CB. They then create a event using a extension called Ohanah. Event Creator now has a) CB profile and b) Ohanah event

2. User Type: Athlete. Registers and logs in thru CB. They register and pay for the above event (using Ohanah).

I would like to create a trigger using Auto Actions to automatically make the CB profile connection between Event Creator AND Athlete

This would save the confusion of making the athlete (after registering) to go to the event creator profile and connect manually.

site: www.wodrocket.com/pivot

you can login as:
- demo Event Creator login: demo/demo123
- demo Athlete login: demo1/demo123
Last edit: 12 years 2 months ago by cberry1971.

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 #214779 by krileon
CB Auto Actions has a Connections action to do this, but you need some sort of way that CB can see (CB Query Field, field value, etc..) a connection between the two users already as it needs the user id of the user you want to connect to. You could then fire it on login trigger for example.


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: 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 #214781 by cberry1971
I knew you would have a idea. That is a great idea. Let me play with it and I will post back with (hopefully) solution and (perhaps) follow up questions.

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 #214822 by cberry1971
Ok I am still trying to get my small brain around this one and I'm hoping you can give me some coaching.

Example:

Event Creator A creates a event in Ohanah. The event is located in table _ohanah_events table
Event Creator A also has a profile in _comprofiler

Athlete B registers for a event in Ohanah. The registration is located in table _ohanah_registrations (along with the Event Creator User Id in the same row)
Athlete B has a a profile in _comprofiler

If I understand your last post correctly, I need a field set up to catch (thru triggers) all events Athlete B has registered for. In this example Athlete B would have Event Creator's ID in that field.

I just can't figure out how to create that field.

Thanks again.
Last edit: 12 years 2 months ago by cberry1971.

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 #214844 by krileon
You need to create a relationship between ohanah and the user. Ohanah isn't creating one so you need to. To do this you'll need something like CB Query Field to query ohanah database and output some sort of result so you know the user belongs to an event or an athlete, whatever is needed. You'd then use that to condition your auto action.


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 #214858 by cberry1971
LOL CB noob. I have been killing myself to find the query field. YEP it is a plugin. Now Houston, we are a go!

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

Moderators: beatnantkrileon
Powered by Kunena Forum