bumerang
11th April 2002, 09:11
Hi

We need how do change enumurate domain constrain value in program scrips.

how to do this way

NPRao
11th April 2002, 09:20
check these commands which can be used in scripts -

Syntax

void set.enum.values.for.field( const string field.name.string, [ALL_ENUMS_EXCEPT], [ enum_value, ... ] )

Description

This fills a listbox field with a specified set of enumerate values.
With set.enum.values(), the change to a set of enumerate values occurs immediately before input to the enumerated field. With set.enum.values.for.field(), the change occurs immediately after the conditions on which the change depends become true. To achieve this, include the function in the before.display.object section or in the when.field.changes section of each field on which the change depends.

Arguments

field.name.string The name of the enumerated field. For example, "ttadv996.type". For an array field, include the array element. For example, "tttadv996.type(5)".
ALL_ENUMS_EXCEPT This optional macro specifies that the succeeding list of enumerate values represents those values that are to be excluded from the enumerate set. Otherwise, the list of enumerate values represents the values that are to be included.
enum_value, … The values to be displayed in the field, separated by commas [,].This is an optional argument. If not included, all enumerate values defined for the field are available.
Notes

You can set enumerate values for the current occurrence only.
If the existing value of an enumerated field in not included in the new set, no value is selected in the list and no value is displayed in the display area of the listbox.

Context

4GL library function.