cancel
Showing results for 
Search instead for 
Did you mean: 

DropDownByIndex

Former Member
0 Kudos

hi,

I have a DropDownByIndex.This is populated after executing RFC.This is done.But its having one empty row and other rows are having values.I want to avoid that empty row and instead of that i want to show -dsome text - as a default value.

can anyone help me out?

Thanks

Abhilasha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

To remove Empty row you need to change the property od the context node that you have associated with the dropw down.

1. Change Cardinality to 1..n (If you change it 1:1 then you will not be able to add more than one option to drop down).

2. Change the Selection to 1..n

And to add some text to drop down before the values from RFC you can use the below code in wdInit() method.

wdContext.nodeVn_Node().currentVn_NodeElement().setVa_Attribute("-Please Select-");

use the node name as you have given in the context you have created.

Regards

Narendra Singh

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

In order to remove the Empty space in DropdownByIndex change the cardinality as 1..n and selection as 1..1

Then that empty space is removed

Regards

Padma N

Former Member
0 Kudos

Hi,

I want to set a particular value from the set of values retrived from the rfc as the default value that is my dropdwn has the values(100,200,300,400,500) and i want to set the value 400 as default. so how do i do it.

and this 400 value is got from some other rfc.so do not suggest mi to set this value in wedint.

former_member197348
Active Contributor
0 Kudos

Hi Abhilasha,

If you want to set the default value to the dropdown box. Do like this:

After calling the particular RFC,

if(wdContext.node<DDnodename>().size()>index)
wdContext.node<DDnodename>().setLeadSelection(index);
 // if you want to set ith  value as default then +index = i-1+ because elements start from 0. 

In your case,

(100,200,300,400,500) and if you want to set the value 400 as default then

if(wdContext.node<DDnodename>().size()>3)
wdContext.node<DDnodename>().setLeadSelection(3);

Regards,

Siva

Former Member
0 Kudos

Hi,

If you want any default selected value for the dropdown u can implement this code in wdDoInit()

wdContext.Anode.currentAElement.setB(the value you want to set);

Former Member
0 Kudos

The empty entry is automatically added by the framework if you allow an empty selection (selection cardinality 0:1). If empty selection should not be allowed, set it to 1:1.

Armin

Former Member
0 Kudos

Hi All,

I want to avoid that empty row and instead of that i want to show -some text like"select country".

how can i do that?

Edited by: Abhilasha Dahare on Dec 31, 2008 6:19 AM