Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] auto action time condition for profile update action

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
8 years 11 months ago - 8 years 11 months ago #274073 by krileon
Not equal to 1 won't work as it's returning the activity id, which is unlikely to be 1. You need to check that it's equal to 0, equal to (leave empty), or probably the is empty condition. Also be sure to move the field to a tab it can seen on profile so you can make sure it's outputting the activity id of the most recent profile update for the user to ensure it's even outputting as expected.

You don't need a field action. You can't change the value of a CB Query Field as it has no storage. You only need a copy of the profile update activity action with a condition against the query 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.
Last edit: 8 years 11 months ago by krileon.

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

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
8 years 11 months ago #274079 by jpdenny1
Understand I think and thanks for further feedback.

Don't need field action - ok.
Move to visible tab - already had, changed to field type, activity ID does not populate it, unfortunately.
Suppose the whole thing falls down with no actiivty ID, being shown.

With it, I can try to condition against it in User Update Action using: = 0 or = 'blank' or it might not need to be conditioned, is what I picked up from:

"need to check that it's equal to 0, equal to (leave empty), or probably the is empty condition".

If you think it's worth it community-wide be great to pin this down. Otherwise can unpublish. I'm at tail end of my project would gladly move on, but again think it's an awesome addition to this auto action.

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
8 years 11 months ago #274085 by krileon
You need to first create a CB Query Field with exactly the below query.

Code:
SELECT `id` FROM `#__comprofiler_plugin_activity` WHERE `type` = 'profile' AND `subtype` = 'update' AND `date` >= ( NOW() - INTERVAL 1 DAY ) AND `user_id` = '[user_id]' ORDER BY `date` DESC LIMIT 1

Next log a profile update activity entry. Then check that the field is displaying the ID of that activity entry. Once that is confirmed you can work on the condition of the auto action, which should be as follows.

[FIELD_NAME] Is Empty

Replace FIELD_NAME with the name of your CB Query Field. Now click save as copy for the profile update action. Ensure your copy is published and the system action is unpublished. Next attempt to log a new profile update activity entry and ensure it does not log one. Once confirmed delete the activity entry in CB Activity backend and now try to log a profile update activity entry again (very the CB Query Field returns nothing in profile view first) to ensure it logs.


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.

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
8 years 11 months ago #274092 by jpdenny1
Super!It works!and thanks. Hope others may find it useful too..

Have to apologise, I was confused intially with the CB Query Field in Integrations Tab of a Field. Drew me off course.

All you said and asked to confirm were done and successful. Maybe I just need to test after 24 hours, but suspect it will work fine, as it passed your checklist. Reckon I'll get more into database queries at some point, great introduction right there, find it interesting.

Thanks again :-)

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9

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

Moderators: beatnantkrileon
Powered by Kunena Forum