I have read in the documenation to avoid boolean values (not exaclty sure why).
So I have created a new metaattribute for the metaclass with a MetaAttributeValues "yes" and "No". I used the enumeration format. By default, this gives me a dropdown menu in the forms.
I have read I document "HOPEX Forms - Forms", page 52, that it is possible to use a checkbox for attributes with 2 values. Here is an extract of it:
CheckOn=<UnCheckValue>/<CheckValue>: This option enables display of a
property with only two valid values in the form of CheckBox, and this whatever its format. It is
particularly adapted to simplify entry of attributes with two enumerated values. To do this,
specify (in ASCII format) the value playing the "uncheck" role and the value playing the "check"
Value: corresponds to ASCII value "0" or "1".
Click: sent when we click the box.
I have not succeeded to make this work so far with my Yes/No metaattribute. Could someone provide an example of the string to use in the property page in order to display this metaattribute as a checkbox?
So far, I have the following:
DeployEnvProd = Item(~ZBH7tD2xMPgC[Deployment Environment Prod]),Control(CheckBox),Param(CheckOn=0/1)
0 is my internal value of "no" for the metaattribute and 1 is for Yes. (I have tried with other values without success...
I'm alway getting error "Error, 1 value outside table"". Whatever I put in the CheckOn option, I get this value as error in message.
Solved! Go to Solution.
try to replace "Item" with "Attribute" :
DeployEnvProd = Attribute(~ZBH7tD2xMPgC[Deployment Environment Prod]),Control(CheckBox),Param(CheckOn=0/1)
It was still not working so I discarded everything done and restarted from scratch. My attribute now has an internal value of Y or N (instead of 0 and 1) and I use the following to display a checkbox:
DeployEnvProd = Item(~7ukH)k4yMfKE[Deployment Environment Prod]),Control(CheckBox),Param(CheckOn=Y/N)
It works great now. Thanks.