cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the dictionary data into a dropdownByindex

Former Member
0 Kudos

Hi all,

I had some data as 01,02..10 in my dictioanry of type Integer.

Now i want to show this data in the dropdown at runtime.

I created a value node with cardinality as 0..n ,selection as 1..1

and a value attribute of type simple data types.

But i am not able to see the data at runtime??

Can anyone please help me out??

Regards

Padma N

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

If you are going for Data Dictionary then DropdownbyKey is the right choice or if it is binded to a node and values are fetched at runtime then use DropdownbyIndex

Regards

Raghu

Former Member
0 Kudos

Hi Padma,

If you still wish to proceed with DropdownByIndex, you need to

create a value node(A) and value attribute(B) in context and also add little bit of following code in the init method.

IPrivateEVSView.IAElement oE = wdContext.nodeA().createAElement();

IPrivateEVSView.IAElement oE1;

oE.setB("Select");

wdContext.nodeA().addElement(oE);

for(int i=0;i<wdContext.nodeC().size();i++) /*C is the node having values */

{

oE1 = wdContext.nodeA().createAElement();

oE1.setB(wdContext.nodeC().getCElementAt(i).getELEMENT());

wdContext.nodeA().addElement(oE1);

}

make some changes to code with respect to your context. Revert me if you have any queries.

Regards

Raghu

Former Member
0 Kudos

Hi all,

What is the difference between DropDownBYIndex and DropDownByKey??

Which one is better to show the data which is there in the dictionary???

Regards,

Padma N

Former Member
0 Kudos

Hi

Drop down by key and drop by index are two types of search help

Drop down by key is used when values in the input field for search help are less than 30 constants

DD by index if they are more than 30 cionstants

Dropdown by key is used when values are known at design time

Drop down by index is used when values are expected at runtime.

Both are considered as Simple value selector

former_member197348
Active Contributor
0 Kudos

Hi,

DropDownByKey is used for dictionary types.

DropDownByIndex is used for data available in nodes 0..n.

DropDownByKey is the right choice for data is in the dictionary.

Regards,

Siva

Former Member
0 Kudos

hi...

Generally when the amount of data that you are going to bind to a drop down is fixed ,i.e you have declared in the dictionary ,,then its better to go for a DBYkey ...

If you getting data from backend or if you do not know the number

and values that you going to get you can go for DDBYindex.

By taking a node and an atrribute in that node in context ,and binding the attribute to the texts property of you ddbyindex you can implement DDBYindex.

Former Member
0 Kudos

Hi Padma,

1) Bind the Dropdownbykey to Context Attribute with data dictionary to see only key values at runtime which is called as SVS.

or

2) While creating the Form Bind the context attribute with data dictionary to InputField, such that you can see both key and value information at time.(EVS)

Regards

Raghu

Former Member
0 Kudos

Hi,

take dropdownByKey instead of dropdownByindex.

your problem solves.

Regards,

ramesh