|
Problems and Solutions>Databases |
|
|
Scripting in a Dialog returns a missing value error |
|
|
Article #: |
0036 |
|
Contributor: |
Daniel Todes |
|
GF version: |
All |
|
Applies to: |
Scripting in Dialogs |
|
Last updated: |
February 21, 2002 |
Problem
When filling a Dialog Answer-set that contains script, an error message is displayed.
Click to view the error message

Where Issued is the name of the field that contains the script.
Description
You may have added script, similar to the following, to the "OnExit" event of a Dialog field and used the names of fields (Issued and Authorized) as part of the logic:
%[IfTrue((Issued>Authorized),MsgBox('Warning!','The amount issued cannot exceed the amount authorized!'))]
When filling the Dialog Answer-set, an error message is displayed, stating that the field (Issued) that contains the script is missing a value.
Solution
When you use the name of a field in script, you need to preface the field name with "ThisDialog". The example above should then read:
%[IfTrue((ThisDialog.Issued>ThisDialog.Authorized),MsgBox('Warning!','The amount issued cannot exceed the amount authorized!'))]
|
NOTE |
|