cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable a default value from the available value of dropdownboxbykey

Former Member
0 Kudos

Hi,

I am having one dropdownboxbykey. In that I am having three values. But when displayed all the values are inside of the dropdownbox and I want to bring one of the available three values as a default value when the screen is displayed.

Can any one help ?

Thanks

Ponnuchamy

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Provide the default value key for the node.

You might have provided the key values in domain for the node. Go to context and in the properties of node provide default value. e.g. 01, 02 etc.

Ashvender

Former Member
0 Kudos

Hi,

By making the default value I am not able to bring the value into the screen.

for Ismail :

secondly, using the set attribute will not bring the available entry but it will insert the value (eg. add) to the screen. that is not a right solution. and for other times this value gives problem

Thanks

pons

Former Member
0 Kudos

Hi Ponnuchamy ,

The solution is every time when ou display the dropdown you have to read the node info and set one of the value you required to the attribute whivh is binded to the dd.

if you know the default values, you can directly bind opne of the values to the attribute using set attibute

else you have to read the node info and bind one of the values read to the attibute.

Regards

Sarath

former_member182190
Active Participant
0 Kudos

Hi,

DropdownBy Key UI element has a property SelectedKey.

Create an attribute in your node of the type you want to populate in the dropdown

and bind this attribute to the SelectedKey property after populating the required

data in the attribute.

Hope this solves your problem.

Regards,

Ismail.

Former Member
0 Kudos

Hi ,

We already connected the selectedkey attribute to the node where we need to populate the values. Now I am getting the values available in the domain for that element. My question is i need to bring one value as default value from the available entries. I hope we need to set some of the attribute to a selected value. I dont know how to do it.

I think i gave some clarification to you so that you can help little more.

Regards

Pons

former_member182190
Active Participant
0 Kudos

Hi,

What you have done is perfectly fine.

Now assume your dropdown by key shows 4 colors.

So you might have created an attribute color type 'DOMAIN_COLOR' in your node color_node

and this attribute needs to be bound to selectedkey property.

And the domain has default values red,green,yellow,black.

Now you want to set the default value as red.

Lo_node = wd_context->get_child_node( 'COLOR_NODE').

lo_node->set_attribute

exporting

name = 'COLOR'

value = 'Red'.

.

Hope this example solves your problem.

Regards,

Ismail.