Method Call validators

Method Call validators use IDO methods to validate a component's data. If the method returns a value less than 5, Windows client passes the validation. Otherwise, Windows client fails the validation. The values 1 through 4 are used for warnings.

To define a Method Call validator, you must specify the name of the IDO that contains the method, the method name, and any parameters required by the method. You can specify literal, property, variable, and component values as parameters. Method Call validators can also output values to properties, variables, or components.

These parameters are supported for validator output:

Output Parameter Description
No List Cache Force the validator to process whether or not its current value was selected from a list.

See additional information about this option at the end of this topic.

Output First Time Only The output is generated only the first time that the validator is fired after the collection was loaded, was saved, or became current. Use this parameter when you want to prevent subsequent executions of the validator from overwriting changes made to the target component by the user.
Output Immediate Only The output is generated only for immediate validations. Use this parameter when you do not want the validator to change a component at the time the collection is saved.
Mark Output Targets Validated This parameter prevents output target components from revalidating unless the user modifies the value of the component. When the validation requires a round trip to the server, use this parameter to improve performance.
Set Output Null on Null Force the output parameters to be set to null if the input value is null. If the method is actually called, the output parameters are set by the method. However, if the method is not called and the No List Cache parameter is not selected, WinStudio sets the targets specified in the Set Prop/Var/Comp parameter to null. If the No List Cache parameter is selected, you can force the output parameters to be set to null by specifying this parameter.
Call Method on Null Force the method to be called even if the value is null and the component is not a required component. You can use this parameter in processing null inputs. By default, if a component is not a required component, a null value is considered valid. By default, the method is not called for null values. You can force the method to be called by setting the parameter.
Set Property / Variable / Component Output values to properties, variables or components. Specify the appropriate property, variable, or component name for the method's output parameters. You must also specify the output parameter for each output parameter.
Error Message Optional. This parameter specifies the application error message to display if the validation fails.

By default, Method Call validators bypass validating data selected from a list box, drop-down list, or combo box. The assumption is that the list represents a list of valid values. In this case, the component's list source must also contain the properties needed to provide the validator's output values. The validator's output values are taken from the list cache instead of the validator's IDO. Specify this with the Set Prop/Var/Comp attribute. Specify the property name of the list item property as the source, and specify the variable, property, or component name as the target.

This default behavior is important because it eliminates round trips to the server. However, you can force the validator to process whether or not its current value was selected from a list by specifying the No List Cache attribute.