KB-34442: Limiting characters in a Setpoint with a bi-directional link.

Question:

How can I set limits to the number of characters that can be read and written in a Setpoint with a bi-directional connection?

Solution:

To set limits to the writing, insert a script in the Validate event that tests the value’s size, in order to validate the writing or not. For example:

aux = Len(NewValue)
If aux > 5 then
MsgBox “Maximum of 5 digits!”
Cancel = True
End if

To set limits to the reading, there are two options:

1. Using decimal number: set up the decimal places in the Setpoint’s Formatting tab. You must also change the KeepFormatWhenEditing property to 1-kfAutomatic.
2. Using integers: set up the Setpoint’s MaxLimit property. For example, if you want to set a limit of 4 characters, the limit must be “9999”. You also must change the EnableLimits property to TRUE.

For more information, check the E3 Scripts Reference Manual.

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *