Buy Now
Sign in

Help checkboxes

rafaelscouto , May 21 2019, 12:04
R
rafaelscouto 173
May 21 2019, 12:04 #386992
How do I return the ID names
In the Teste
teste.jpg
healyhatman 8
May 21 2019, 23:36 #387001
Well does the table Teste have a corresponding entry? Because it looks like it doesn't. What exactly are you trying to do here, and what does your second model in the read data action look like?
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
R
rafaelscouto 173
May 21 2019, 23:57 #387002
I have two tables.

Tab_1 and Tab_2

Tab_1
id, name
1, car1
2, car2
3, car3

Tab_2
id, brand
1, ["1", "3"]
2, ["2"]

I want to relate these tables, and instead of showing the values of the IDs, I want to show the corresponding name
healyhatman 8
May 22 2019, 00:26 #387003
Going to need a screenshot of your read data setup.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
R
rafaelscouto 173
May 22 2019, 01:20 #387004
relation01.jpg
relation02.jpg
Attachments
relation01.jpg
relation01.jpg
(83.58 KiB)
120 Downloads/Views
relation02.jpg
relation02.jpg
(78.15 KiB)
122 Downloads/Views
healyhatman 8
May 22 2019, 03:40 #387005
So is ciriosidades in your first image a JSON list of selected answers?
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
R
rafaelscouto 173
May 22 2019, 03:43 #387006
yes
healyhatman 8
May 22 2019, 04:19 #387007
Then you need a separate read data after the first that gets foreignkey IN {var.jsonde:read_data1.model.jsonfieldname}
Should probably also set the first read data to first matching unless you're trying to get multiple rows
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
R
rafaelscouto 173
May 22 2019, 11:45 #387011
I can show it on the screen, it looks like this:
["item1", "item2", "item3"]
How do I display it like this:
item1, item2, item 3 ...
Without the brackets and quotation marks
healyhatman 8
May 22 2019, 12:42 #387012
 Answer
echo implode(", ", json_decode($this->get("read_data.model.field")));
Whack that in a PHP block or somesuch
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
R
rafaelscouto 173
May 22 2019, 13:30 #387013
thanks!