Scenario:
I have a set of tags I would like to edit with a modal popup window. I want the user to only enter a SP within a certain range of it's current value. For example if the SP is 50, only want a bump of 20, the user would only be able to enter a new value between 30-70. And I want to show the old and new values before the user hits the Accept or Cancel button.
So I have a numerical entry (display only) with a User Defined Action: (removed some superfluous code)
The Cancel button returns: EndModal(0);
The Accept button returns: EndModal(1);
It all works perfectly however the formatting does not carry over to the modal window tags. My SP tag has 2 decimal places and a format of kPPH.
Questions:
Is there a way I can dynamically reference formats between tags?
I would like to use this modal window for each data entry.. for %, DegF, kpph. All of those have different decimal formats and units.
I have a set of tags I would like to edit with a modal popup window. I want the user to only enter a SP within a certain range of it's current value. For example if the SP is 50, only want a bump of 20, the user would only be able to enter a new value between 30-70. And I want to show the old and new values before the user hits the Accept or Cancel button.
So I have a numerical entry (display only) with a User Defined Action: (removed some superfluous code)
Code:
Entry.Old_Value = Setpoint; // show old value
Entry.New_Max = Setpoint + 20; // set max range
Entry.New_Min = Setpoint - 20; // set min range
If(showmodal(ENTRY))
Setpoint = Entry.New_Value;
The Accept button returns: EndModal(1);
It all works perfectly however the formatting does not carry over to the modal window tags. My SP tag has 2 decimal places and a format of kPPH.
Questions:
Is there a way I can dynamically reference formats between tags?
I would like to use this modal window for each data entry.. for %, DegF, kpph. All of those have different decimal formats and units.