ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

How to get the read data result value with chrono syntax?

cambium 19 Jan, 2019
Hi here!
I have the read data function on my form and trying to get the results from data array.
If i use
{var:read_data9}
it works and i get the complete array, but if i use
{var:read_data9.content.title}
i get nothing.
Why i get no result using this chrono syntax command?

cf6code.png
healyhatman 20 Jan, 2019
Answer
1 Likes
If you're trying to get one record only, you need to set Select Type to first matching. Otherwise you need {var:read_data9.number_of_the_record_you_want.model.field}
cambium 20 Jan, 2019
I tried with
{var:read_data9.[0].content.title}
too, but it not works (select type shifting not help).
But i get the array with current settings.
With {var:read_data9} i get:
[{"content":{"title":"Galactosemia","alias":"galactosemia"}}]
I get the right one record with two fields (title and alias), but need to output them separately from each other.
And i don't know how do it
healyhatman 20 Jan, 2019
read_data9.0 , without the square brackets. But again you shouldn't be using the number because it seems you should be selecting just one record.

So {var:read_data9.content.title}
cambium 20 Jan, 2019
It works, indeed.
Earlier didn't work because i tried to use this chrono syntax command into wrong place.
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com