Skip to Content Skip to Menu

[SOLVED] CB Auto Action to update a field in another table of the DB

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
9 years 2 months ago - 9 years 2 months ago #269980 by ricco1
First of all your CB Fields integration is not working or it's half working.

I've disabled all CB AUTO Actions for the CB VIP field and made like you've said:

Plan > Integrations > CB Fields
Field: VIP
Operator: Set
Value: 1
Remove value on plan deactivation: Yes
Value on plan deactivation: 0

The field gets the value on activation but not on deactivation.

Then I thought that it gets the 0 value as NULL and I've created a new Radio field (let's call it VIP2) with values 1 for NO and 2 for YES. I've set the plans as the above suggestions but still it only get the value on activation and not on deactivation, on deactivation the value is again empty.

I've tried from both Front end and Back end, it just don't change the value as I tell it to on deactivation. period
Last edit: 9 years 2 months ago by ricco1.

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

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
9 years 2 months ago #269983 by ricco1
Your ID orders in CB Auto Action get messed up when saving, please resolve at least that, it's important.

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

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
9 years 2 months ago - 9 years 2 months ago #269984 by ricco1
So far so good. I have 1 Free and 6 VIP (Paid) plans. I've made 19 CB Auto Actions to make the VIP field change its value eventually On User State Change, like so:



For me this is a lie, as you are saying that CB Fields integration is doing something that it doesn't!

Do you think that I want to make 19 actions instead selecting the options in the CB Fields integration?

Please resolve your CB Fields integration.

I also needed to make 19 Usergroup actions to eventually change the groups as I want.
Last edit: 9 years 2 months ago by ricco1.

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

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
9 years 2 months ago - 9 years 2 months ago #269992 by ricco1
It's all working now with this 19 CB Auto Field Actions + 4 Query Actions, all set to on User State Change.

Thank you
Last edit: 9 years 2 months ago by ricco1.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
9 years 2 months ago #270005 by krileon

Your ID orders in CB Auto Action get messed up when saving, please resolve at least that, it's important.

I see no issue with ordering on save. Can you be more specific as to what issue you're seeing?

For me this is a lie, as you are saying that CB Fields integration is doing something that it doesn't!

Do you think that I want to make 19 actions instead selecting the options in the CB Fields integration?

Please resolve your CB Fields integration.

It could be a bug. I'm not lying to you. This is software and software can have bugs. It SHOULD be doing as I've instructed, but if it's not then it's a bug. I've created a bug ticket to look into this for a future CBSubs release.

It's all working now with this 19 CB Auto Field Actions + 4 Query Actions, all set to on User State Change.

I don't understand why you need 19 actions. You should only need 2 for the fields. 1 to handle plan activate and 1 to handle plan deactivate. You don't need to have a action per plan as you can have the action condition for multiple plans as follows.

Plan Active
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditional 1: [var3] Is REGEX /PLAN_ID_HERE|PLAN_ID_HERE|PLAN_ID_HERE|PLAN_ID_HERE/
Conditional 2: [var2] Equal To A

Plan Expired
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditional 1: [var3] Is REGEX /PLAN_ID_HERE|PLAN_ID_HERE|PLAN_ID_HERE|PLAN_ID_HERE/
Conditional 2: [var2] Equal To X

Separate multiple plan IDs with |.


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.

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
9 years 2 months ago - 9 years 2 months ago #270016 by ricco1

I see no issue with ordering on save. Can you be more specific as to what issue you're seeing?


To reproduce the problem: Copy 3 actions and the order of this 3 actions is messed up, then arrange them as you want them to be, open 1 for editing save it, then the order is messed up again.
Last edit: 9 years 2 months ago by ricco1.

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

Moderators: beatnantkrileon
Powered by Kunena Forum