DeltaV Live: Write values to 2 parameters on ComboBox selection

I have a requirement where after selection an entry from a Combobox dropdown, i wish to write values to 2 parameters

The first parameter needs the value of the entry. This i have achieved by adding a expression to the combobox.

However, the problem is that based on the selected entry i wish to calculate a value in a script and write that to another parameter.
In the above example, i can write the selected entry to SOURCE_TXT. Based on this I would also like to write a value in the SOURCE_REF.
How can I do this? 


I do not see any 'On Change' event for the ComboBox.
Also, could not find an 'OnChage' event for other items in Datalink which i could use to initiate a script to calculate and write a value to the other parameter.

Regards,

Navin Singh

  • Hi Navin,

    DeltaV Live was designed with a goal of simplifying graphics development by reducing the amount of scripting necessary to accomplish most tasks. Using a ComboBox is an example where most use cases require writing a single parameter from the options selection. However, there will always be needs that go beyond the regular use case, like your need to write 2 parameters from a single ComboBox selection.

    One way this can be accomplished is by using Graphics variables. These variables can be created at the graphic level and have properties that include adding scripts when they change (OnWrite). For example, Dropdown_values in the screen capture below:

    This variable was assigned to a ComboBox with 3 options and placed in a graphic accordingly:

     

    The script for the variable's OnWrite event was then prepared like this:

    The end result is this:

     

    I hope this helps!

    Camilo Fadul

    Camilo Fadul | DeltaV Solution Marketing Director

    https://www.linkedin.com/in/cfadul