CalcBuilder Forum

Option List name and value

Usuario anonymous 2011-11-02 18:45:25

Hello everyone,

I have a question and do not know how to solve:

I created a field optin list with several names and values. For me to just show a value I place the $variable = $variableoptionlist; that will come the selected value.

My question is how to show the name and not the value selected?

Can you show me how to show the name and not the value of an type option list?

Sincerely,

Walbert

Moonsoft support 2011-11-02 19:01:00

Hello,

By default, Calc Builder return values and not names to use it in codes. But you can transform values to name in code. Here you have three possible solutions:

-You can use a simple if or switch statements to test values and assign name to other references.

-Also you can declare in code an array with combo value as key and combo name as value and get it easy.

-Other solution is create a matrix in Calc Builder and use it to get values.

Hope this helps. Regards,

Moonsoft Team

...
CalcBuilder

Create dynamic calculators

Buy now!
...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!