[SOLVED] Auto Actions Query

6 years 2 months ago - 6 years 2 months ago #302606 by Gnc
[SOLVED] Auto Actions Query was created by Gnc
Hi guys, had a look around for the field names i need for this query..seen it before, but now i need it cant find it!!

I am wanting to a query to update the profile logger DB to show which user Approved a profile.
The 2 fields i am wanting are the ID fields..what are the substitutes here please or where can i find them..
I have used fixed valuse..thats on purpose.. just the ID am after

IE
Update `#__evyhc_comprofiler_plug_pulogger`
(`changedate`, `profileid`, `editedbyid`, `mode`, `fieldname`, `oldvalue`, `newvalue`)
Select NOW(), `id`(this is the member being approved id??), `user_id`(this is the user doing the approval??), '1', 'User_groups', 'waiting approval', 'approval updated'
FROM `#__Comprofiler`

Please Log in to join the conversation.

6 years 2 months ago #302611 by krileon
Replied by krileon on topic Auto Actions Query
id is the row id. Don't specify that as it's an auto increment column. The columns you're needing are profileid and editedbyid. editedbyid is the user id of the person editing the profile and profileid is the profile being edited. So in your case profileid should be the user being approved and editedbyid should be the user doing the approval. I'm guessing something like the following should be correct if using substitutions to set those values.

`profileid` = '[user_id]'
`editedbyid` = '[cb:userdata field="user_id" user="#me" /]'


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

Please Log in to join the conversation.

6 years 2 months ago - 6 years 2 months ago #302645 by Gnc
Replied by Gnc on topic Auto Actions Query
Awesome thanks..exactly what was looking for..

and this the bit that worked out for..just in case any looking...

INSERT INTO `#__comprofiler_plug_pulogger`
( `changedate` , `profileid`, `editedbyid`,`mode`, `fieldname`, `oldvalue`,`newvalue`)
VALUES
(NOW(), '[user_id]', '[cb:userdata field="user_id" user="#me" /]', '1', 'cb approvals', 'waiting approval', 'approval update')
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 2.539 seconds

Facebook Twitter LinkedIn