Skip to Content
0
Former Member
Jun 09, 2008 at 04:34 AM

DropDownbyKey Emty Space in middle of values

29 Views

Hi Friends,

I am populating values using DropDownByKey using RFC FM. every things works fine but in the middle of values it's giving an empty space. I found some answers in the forum changing the cardinality from 0..1 or 1..1 should fix this issue. but I need any empty sapce as first value in the dropdownbykey bot not in middle.

Example: Say i am populating 3 values like : London, Dublin, Frankfurt

but my dropdown displying as follows: London, Dublin, < empty Space>, Frankfurt

Here the empty Space suppose to be the first value in the DropDownByKey but in between.

I want to display like here: < empty Space>, London, Dublin, Frankfurt

I am this code:

IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateCountryView.IContextElement.COUNTRY);
	ISimpleTypeModifiable valuesType = attributeInfo.getModifiableSimpleType();

	valuesType.setFieldLabel("Country Name");
	IModifiableSimpleValueSet valuesSet = valuesType.getSVServices().getModifiableSimpleValueSet();
	int countryNodeSize = wdContext.nodeCountry_Help().size();
	valuesSet.put("", "");
	for (int i = 0; i < countryNodeSize; i++)
	{		 
		valuesSet.put("" + wdContext.nodeCountry_Help().getCountry_HelpElementAt(i).getLow(), "" + wdContext.nodeCountry_Help().getCountry_HelpElementAt(i).getText());
	} 
	



 

Thanks in advance.

Peter.