Drop down, change of selection


I have dropdown On my vision screen. having data as below.

after selection of "In Progress" I want End date pop calendar should disable .
after selection of "Completed" I want End date pop calendar should Enable.

I tried on mouse click event, its working only on second time selection. not working for first time selection.

I have written script on dropdown

what is the script for change of selection for dropdown.

please suggest the script for this. what is the script for change of selection for dropdown.
It will be very helpful.

I wouldn't script this. It would be much simpler to use an expression binding on the popup calendar's enabled property:

{Root Container.Dropdown.selectedIndex} = 1


1 Like

so simple. Thank you so much.
need more help from your side

1 Like


I have one more dropdown in my Screen. in this screen I am inserting and updating in the data base.

when user inserting second time, selecting same Line from drop down it should error message.
I am getting error message but only after selecting 2 times from drop down.
on one time selection it is not showing error message.

on drop down I have written the code:

after clicking on ok. I am getting the data for all the fields on component but for status I am not getting .the status dropdown should show status which is is in db table.

please help me in this screen. this I am trying from last many days.
since I am new to Ignition, if get these solution it will be very helpful for my ignition learning.
Thank you

1 Like

If you are attempting this from the mouse clicked event handler, the problem is that the event fires before the index is selected. This is why it doesn't work on the first click but does work on the second. Of course, by the second click, all of the other scripting is out of sequence.

The correct way to fire this script is from the propertyChange event handler. Simply take all of your code and nest it in the following if statement:

if event.propertyName == 'selectedIndex':