BASIC: Combobox (Set Default value)

BASIC: Combobox (Set Default value)

  
Which property is to set the combobox value to a default value?

Example you have entity "COUNTRY" with attributes, Id,Code,

Name Id=1 Code=US
Name=United States


Id=2 Code=UK
Name=United Kingdom

Now you want the combo box to show "United Kingdom", when the page is first loaded OR when the page receives input parameter 2/UK.
If you use a static entity you can specify the default value of the input parameter. Check the attached eSpace.

Best Regards,
Gustavo Guerra
problem solved. thanks
What if I need to use a normal entity, how do I go about doing the set default value for a combobox?
Hi Renato,

First and foremost welcome to OutSystems community.

The combobox widget will assume as the selected value the one the variable holds. Hence in order to define a default value you rather do it to the variable you pass to the widget than the widget itself.

Hope this helps you.

Cheers,
André
Problem Solved. Thanks.
Hi
When i have changed in the edit_record_form, an input for a combobox, my problem is when i
link to the edit form, the combobox ever shows the same value... how can i set the value of the combobox?
widerman montoya wrote:
Hi
When i have changed in the edit_record_form, an input for a combobox, my problem is when i
link to the edit form, the combobox ever shows the same value... how can i set the value of the combobox?
 
Check out the following video that shows how to use the combobox.
Also a good reference is to use F1 when you have a combobox selected to read the reference help.

Cheers
Hi,
 How to add subsections inside a combo box.For eg  if i have the Electronix as my
first list then under Electroninx i need to add subsections like Laptop,Tv,Refrigreator.How can i do this.Is there any way of doing .

Regards,
ChandrasekarRadhakrishnan
Chandrasekar Radhakrishnan wrote:
Hi,
 How to add subsections inside a combo box.For eg  if i have the Electronix as my
first list then under Electroninx i need to add subsections like Laptop,Tv,Refrigreator.How can i do this.Is there any way of doing .

Regards,
ChandrasekarRadhakrishnan
 Since its not a tradicional combobox (html select), you'll have to implement your own component, using webblocks and javascript, and it will need a little work... (check this post). Please, dont forget to share this on forge if you do! :)

You can try a workaround too, using the Search and AutoComplete component, that is very customizable and easy to use.


Hi,

For this we need something like a tree widget but i tried to download but its incompatible for my version..

Regards,
ChandrasekarRadhakrishnan
Hi,
I think according to the post which you have mentioned the tree widget will be ideal but in outsystems 
we dont have a tool for that .
Hi,
Is it possible to do using javascript.
Hi,

Check this component, looks like that could make the subgroups you need.
Hi Nuno,

This is a multiline combo i need something like a tree node.
And it can be a tree? Like this component, it has examples of use.
Hi,
Ok but actually i want like a tree like combo box.