cancel
Showing results for 
Search instead for 
Did you mean: 

Adding duplicate values in iBrowser using Javascript

Former Member
0 Kudos

How can we add an item with the same value and different datalink in iBrowser using JavaScript?

For example: A iBrowser consists of an element "Record" with Datalink value as "Server A". Now, I want to add an element with value "Record" and Datalink "Server B". Can I add the second element in iBrowser?

I tried to add the element using following functions:

1. document.iBrowser.getBrowserObject().addItemWithDatalink(VALUE,DATAVALUE)

2. document.iBrowser.getBrowserObject().insertItemWithDatalink(VALUE,POSITION,DATAVALUE)

But, it is not working. Moreover, I tried "document.iBrowser.getBrowserObject().setUniqueValues(NEWVALUE)" function.

What is the purpose of this function?

Could you please suggest the solution? It would be a great help.

Thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Rick,

I understand datalinks in browsers. My concern was the UI aspect of it (labels). Its a simple fix, but it is essential for a system's usability if the design has some thought put into it. Which "record" would you click on as a user?

Regards,

Kevin

Former Member
0 Kudos

Shalaka,

I didn't find the SetUniqueValues method in the help (good catch). However, I think your design is faulty due to having a confusing interface for the user. I agree with Ryan's comments on not knowing which "Record" to select if there are two of them.

Regards,

Kevin

Former Member
0 Kudos

Kevin, the part that you're missing is the proper use of a combination of keys/labels that uniquely identify the parent/child relationships. The label is nothing more than that - just a text indication of the item in the tree. The datalink is the actual identifer to be used for selection. In the case where you do not provide keys/datalinks, MII automatically attempts to create them from the labels, and the default case is to "fold together" unique elements.

Bottom line is that it can do almost any scenario, but you need to tell it how your unique dataset is configured so it can achieve the desired output.

Former Member
0 Kudos

So if your browser has two visible options to the user "Record" and "Record", but they both have different hidden values "A" and "B", what is the purpose?

How will the user know which value to select? Sounds kind of fishy to me.

jamie_cawley
Advisor
Advisor
0 Kudos

Can't you do this in the query or wherever it is coming from?

Jamie