How to send table row data to other view using onRowClick event of table

I have a table which shows data from database, I want to open a pop up on clicking the row of the table with the details of that table row. How can I pass my row values to that view and how to retrieve it in that view.

Thank You.

Hi @ptchanchal,
You can see here how to pass parameter to a pop up.

Once you have your parameter inside the pop up, you can perform your CRUD,
then when you finish you may consider to use the function
to update your table and show up your changes.

Grab your selected row elements from the table :

If you like to pass parameters from script :

window = system.nav.openWindow('TestPopUp', {'Int' : 40})

here we are opening a pop up called “TestPopUp”, passing parameter as a Dict.

1 Like

Thank you, I solved this issue by sending json file as message.

If you refer at this:

system.nav.openWindow(‘TestPopUp’, {‘Int’ : 40} )


by sending json file as message

I think this Is a Python Dictionary, otherwise I’m curious to know how you passed parameter to a window as plain JSON.

I wrote the following code on the onRowClick event of the table:

messageType = ‘rowData’
payload = {‘rowData’: event.value}
scope = ‘session’
system.perspective.sendMessage(messageType, payload, scope)

on and script configuration of label in the other view, i created a rowData message Handler and selected listen scopes as session and wrote the following code:

self.props.text = payload[‘rowData’][‘employeeName’]

Oh i understand, you talking about Perspective sorry,
never worked on it yet,
my bad, I did’t pay attention on you tagging the post on perspective.

thats ok, you should try perspective its good