I am passing my row data of table to other view by using onRowClicked event in table. Row values are passed in the form of json, how can I get individual item value from that json format?
I’m not sure this is what you need here, but I think you should try
EDIT: I’m not sure this is available in Perspecitive
I tried it, didn’t work for me. I think its not supported in perspective.
Did it error out, or did it just not work. If it didn’t cause an error message, I would expect the syntax was wrong.
causing error, above is the screen shot of log error message
Posting your script will help the most, if you don’t mind.
try this as the first line of your message handler:
system.perspective.print(type(payload['rowData'])) # and look in Designer Console
You’re probably sending Qualified Values, when you should probably just be sending the plain values.
since i am sending json data as message it will not work in designer console.
Below is my tables onRowClicked event
when i am trying to output json in label in other view using below code it prints all json file data but i just need one item from it.
You cannot run system.perspective scripts in the Script Console.
I intended for you to include that line of code as part of the message handler.
Yes, but your later post convinces me you’re receiving the data correctly. To reference the data in the received json, you just need to supply the key, which is the key used in the row. Using the default data of the table,
you would do this to get the city value:
Ya, it worked thank you so much