Hi there.
I'm working with Ignition 8.1.24.
I have a table in the Perspectiv view with a field called "Response". Since the field has a lot of content it was replaced by a button that opens a popup, if clicked.
to this end I created a custom session property, which is filled with a value, onRowClick. The button itself is linked with another viewthat only shows a label with the content on a custom property "Response". In the end I had to link this one direktly to the corresponding session property, because the standard solution does not work.
I tried the following script on the button:
def runAction(self, event):
response = self.session.custom.Response
path = 'ResponseContent'
system.perspective.openPopup("ResponsePopup",path,params={'Response':response})
I also tried to go the way shown on the following screenshot:
None of them worked.
There's a workaround so it's fine but it's very unusual that you need a workaround to fix a standard solution, that does not work.
Does anybody habe a similar experience?
Did I miss something?
Thank you.
Best
Alex
Don't use session.custom
for this. I know a lot of people like using it, but I strongly believe those properties shouldn't be used for things that are page related. You'll end up with a mess of things that is VERY hard to disentangle, because you never know where values are coming from, where they're used, and what you'll break if you interact with them.
It's just like abusing global variables in programming.
So, let's step back, and first make sure everything is clear:
You have a view that contains a table.
This table used to contain a column that displayed too much data, so you want to display that data in a popup instead.
For this, you want the user to select a row in the table, then click a button, and the popup will open to show that data.
issue: you couldn't pass the data you need to the popup.
Did you consider using subrows ?

If that's not a satisfying solution, popups are absolutely a good alternative, so let's fix what's wrong.
What data are you trying to pass to the popup, and what didn't work exactly ?
It's a pretty straightforward process, so you'll need to give us details about what doesn't work and show us what you did: Show us the view's params, how you're trying to pass them, where they come from, etc.
2 Likes