hcl-bot
1
I would like to validate an open UI which contains fields which have individual validation formulas.
I would like to perform something which looks like the following:
If uidoc.Refresh = False Then
Exit Sub
End If
However, I cannot perform a uidoc.Refresh in an if statement. Is there a way to do this without duplicating all the individual Validation formulas?
hcl-bot
2
Subject: Validating a document with LotusScript
Yes that works. Thanks. I have set it as follows:
On error goto Quit
Call uidoc.Refresh
’ Your code goes here
Quit:
Exit Sub
End Sub
hcl-bot
3
Subject: Capture the error
“uidoc.Refresh” results in an error if the fields are not all valid. So you can write something like
On error goto Quit
uidoc.Refresh
that will cause the script to advance to the “Quit:” label if the any fields aren’t valid.
hcl-bot
4
Subject: RE: Capture the error
Yes that works. Thanks.
I have set it as follows:
On error goto Quit
Call uidoc.Refresh
’ Your code goes here
Quit:
Exit Sub
End Sub