Values of Web Select Widget

Values of Web Select Widget

Is it possible for select widget to receive decimal values? And if it's not, is there any other way around to solve this?

Thanks :)
Dear Miguel,

A Select Widget can, indeed, receive decimal values if you use the “Custom Record List” to fill in suitable values.

As an example, assume you have a Record List called DecimalRL with all the decimals you want to show as options in the Select. This Record List can be made up of a single Structure (let’s call it DecimalStruct) with a single attribute (called value, and of type Decimal).

You also want to have a variable (possibly a Screen Variable) of Decimal type (called SelectedDecimal for example) that will pre-load the Select with the initial value on rendering AND receive the selected result when you submit the screen.

On the Select, you should fill in the following properties as:

“Variable”: SelectedDecimal
“Custom Record List”: DecimalRL
“Source Entity/Structure”: DecimalStruct
“Source Attribute”: value

On submit (via a Button or Link widget), SelectedDecimal will hold the desired value.

Producing the initial DecimalRL is, of course, heavily application-depended: you may have a query that fetches these values from the DB or you can construct the Record List “by hand” by using the ListAppend built-in function. Please check the Service Studio help for more information on this function, as well as the mechanics mentioned above.

Hope this helps.