I'm annoyed that I just worked this out, since I've made a whole bunch of forms and connections where I've used a PHP action to make an array, and I needn't have bothered.
Let's say you use a read data action to get all of the articles on your site, and you want an array of just the article id's . Maybe your read data action gets all the articles after a certain date, and you want a second read data action to get all the articles NOT in the first read data action.
===============================================
Using {var:read_data29.[n].user.id} gives me ["558","559"]
Let's say you use a read data action to get all of the articles on your site, and you want an array of just the article id's . Maybe your read data action gets all the articles after a certain date, and you want a second read data action to get all the articles NOT in the first read data action.
{var:read_data#.[n].model.field}
===============================================
Array ( [read_data29] => Array ( [log] => Array ( [0] => SELECT `user`.`id` AS `user.id` FROM `##_users` AS `user` LIMIT 100; ) [var] => Array ( [0] => Array ( [user] => Array ( [id] => 558 ) ) [1] => Array ( [user] => Array ( [id] => 559 ) ) ) ) )
Using {var:read_data29.[n].user.id} gives me ["558","559"]
This is awesome, you made my day! how did you get to the [n] parameter? do you know if there's a way to use a wildcard or a variable?
I got it from this post
https://www.chronoengine.com/forums/posts/t105619/p377969/chart-widget-how-to-calculate?startat=0
I had never seen it before, haven't seen it since, didn't see it in any of the FAQs or manuals.
https://www.chronoengine.com/forums/posts/t105619/p377969/chart-widget-how-to-calculate?startat=0
I had never seen it before, haven't seen it since, didn't see it in any of the FAQs or manuals.
Can I just say this is absolutely perfect! We'd never have figured out how to do this ourselves.
This topic is locked and no more replies can be posted.