Hi all.
I'm currently building in Ignition 8.1.45 perspective and having an issue that I can't understand..
I have 2 views (Sidepanel_JT and Overview_conv) the latter holds 3 buttons, CLR105, CLR106 and CLR107 - when pressed I want them to open up the Sidepanel_JT dynamically so that the side panel opens and displays the conveyor name (CLR105).
This side panel holds 16 boolean states and LED's that will be dynamic based on which button is pressed:
If CLR105 is pressed, sidepanel opens (as embedded view) displays CLR105 at the top, and the LED's are binded via visibility and colour when TRUE and invisible when FALSE.
I have nearly everything working, except the label will just not update with the conveyor name - I've even written a script to output to the output console that each side is working (sending and receiving from views) and it works. - when nothing is pressed, for now, I have 'no conveyor selected' on the screen, which, again, works. But the buttons will not pull the text in!
Below is my current button script and layout:
def runAction(self, event):
# Set the conveyor name dynamically based on the button pressed (e.g., CLR106)
conveyor_name = "CLR106" # Change this dynamically based on the button (CLR105, CLR106, CLR107)
# Update the selectedTag to set the tagPath
self.view.custom.selectedTag = {"tagPath": conveyor_name + "/CV/Status/State/Alarm"}
# Log the selected conveyor name to the console for debugging
system.perspective.print("Conveyor selected: " + conveyor_name)
# Pass the conveyor name as a parameter to the side panel
params = {"conveyor": {"conveyor": conveyor_name}} # The parameter being passed
system.perspective.print("Passing params to side panel: " + str(params)) # Log params being passed to side panel
# Set the session custom property to show the side panel
self.view.session.custom.showSidepanel = True # Trigger side panel visibility
# Set params in the session
self.view.session.custom.sidePanelParams = params # Set the params dynamically
self.view.session.custom.sidePanelTitle = "Side Panel - " + conveyor_name # Set dynamic title
And below is the script on my label field:
if(isNull({this.view.params.conveyor}), "No Conveyor Selected", {this.view.params.conveyor.conveyor})
Sorry if the question isn't laid out too well, it was either this or the laptop out the window.
Thanks in advance