Been playing with ignition for a bit and going to training soon, but have a question. I would like to make an “active” sidebar in my project in which when you click the text of a label in my north docked navigation pane, it changes a value or text in a label or navigation tree in my west side docked window. I am finding it hard to transfer data between windows/root containers.
The answer really is that you can’t bind component properties on one Window/View to another Window/View as they don’t know each other exists, especially not in development time. You need to use something that is always present and known, which is where client tags (Vision) and session custom props or message handlers (Perspective) come in. You bind your components to these (or for message handlers, you don’t bind but you implement them) to pass values around.
I would avoid using tags wherever possible with perspective with things like this since tags are gateway scoped and will update for input from any perspective client. This makes an application with multiple clients an actual nightmare that you won’t notice in dev since you are the only one making changes.
I agree with nminchin above that session properties and messages are the way to go. I tend to almost exclusively use message handlers for this thought since I like to reserve session properties for “higher-level” project scoped properties and not just individual view properties.
One caution with message handlers though is that they can sometimes be difficult to trace, especially with Ignitions limited debugging tools. I usually like to wrap all of my message handler scripts with the following code so that debugging is easier, especially in larger projects:
Then you can link it here:
Or if you use script somehting like this: system.perspective.openPopup("myPopupId", "folder/custompopup", params={"aParam":self.props.text})
If you place them here inside the popupview they should show up in the "explorer" thingy in your popup. You probably will have to close and reopen the config though so it can update the "explorer"
Thanks again for your reply!
I want to pass the values from scripting to popup params as I have converted some component values and called required other popup msgs to display and validations too so after going through all these things data needs to get saved after clicking on yes,proceed button (which popups after clicking on main view’s save button). so how can I pass values from save button event scripting to yes,proceed (Popup view’s)button event script so that i can pass these values to database by calling Stored procedure on yes,proceed (Popup view’s)button
Hope you understand my concern.
need help plz
If any additional explanation required, plz let me know
I understand, what you want and i think my answers have covered everything. What else is not working?
Your popup script seems to add in the params correctly. (as far i can see on the small screenshot)
If you have added the same names (LotId, MatlName ...) to the view params of your popup:
they should show up in the browser properties
so you can use them just like you did in this script
Thank u so much for the detailed explanation. I have already added the params to popup view and tried to print to check the passed value of LotId as you can check image in the above popup view event script i have added params from browser props only but while sending here i have deleted becoz in console it’s printed as “value” which is default one and not passed value of lotid so thought i am going in a wrong way.
I will try once again and confirm
Thanks a lot
this is the code of Popup view button script and I am not facing any error on save button, here how to convert those values to int while passing it to SP, should i share save button(main view)script (it’s too long )