Skip to Content Skip to Menu

Count field groups

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
2 years 1 week ago #331160 by krileon
Replied by krileon on topic Count field groups
CB Auto Actions understands field groups just fine. The problem is you're conditioning against the original field which isn't used anymore beyond being a blueprint for CB Field Groups. You need to use CB Field Groups substitutions to pull values out of the field group or you need to parse the JSON yourself in a Code condition. Example of how to read a field group field as follows.

Field Group = cb_grp
Field = cb_int
Substitution = [FIELDGROUP__ROWNUMER__FIELD]
Result = [cb_grp__0__cb_int]

That will give the value of cb_int in cb_grp for the first row of the field group.


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.

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
2 years 1 week ago #331161 by galanopd
Replied by galanopd on topic Count field groups
Ok , so
As far as I understand for the conditions it will be like
[cb:parse function="clean" method="int"][cb_fieldgroup__3__var1_cb_field][/cb:parse]
[cb:parse function="clean" method="int"][cb_fieldgroup__3__var3_cb_field][/cb:parse]
but for the AA->Action, how do we use substitutions since the DATE_FIELD is also inside FIELDGROUP

[cb:parse function="date" date-format="Y-m-d" time="false"]now[/cb:parse] doesn't update the DATE_FIELD
 

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

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
2 years 1 week ago #331162 by krileon
Replied by krileon on topic Count field groups
You are not going to be able to update a date field within a field group easily using the Fields action. The only way would be to process the JSON yourself. I do not recommend using field groups for complex usages like this. Row numbers are not static that 3 could be a 5, a 10, a 9, or even 0 depending on the rows.


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.

  • galanopd
  • galanopd
  • OFFLINE
  • Posts: 374
  • Thanks: 49
  • Karma: 8
2 years 1 week ago - 2 years 1 week ago #331163 by galanopd
Replied by galanopd on topic Count field groups
Taking the DATE_FIELD out of the GROUPFIELD is it going to make it work?

So either I have to proccess JSON or take both fields out of GROUPFIELD, correct?
Last edit: 2 years 1 week ago by galanopd.

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

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
2 years 1 week ago #331164 by krileon
Replied by krileon on topic Count field groups

 So either I have to proccess JSON or take both fields out of GROUPFIELD, correct?

Correct.


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

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

Moderators: beatnantkrileon
Powered by Kunena Forum