cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1254
Views
0
Helpful
6
Replies

Select (multiple) with arrow-button to other text area. 2008.3

Bruce Fernandez
Level 1
Level 1

Select (multiple) with arrow-button to other text area. 2008.3

Many apps, including newScale reporting, use multi-select boxes, with an arrow-button pointing to an identical box, that moves the selected items to the other text area. When finished - what has not been selected is on the left, and what has been selected on is the right. Has anyone used this in a service? Can it be done without writing tons of code? Thanks.

6 Replies 6

Bruce Fernandez
Level 1
Level 1

Thanks Chris, I appreciate it. I'll give it a try and see how it goes. It would be nice if this type of select box was native to nS. Another nice out-of-the-box feature would be a "processing" message/graphic (like the famous hourglass). We have a lot of services that go out to get data which can take some time.

Chris Morris
Cisco Employee
Cisco Employee

This is the only way that I've found to add items to a select box at runtime.

var myaddressselect=document.getElementById('CMN_Physical_Location.Address');
  myaddressselect.options.length = 0;
  myaddressselect.add(new Option(" -- Select Address --", " -- Select Address --"))
  myaddressselect.add(new Option(AddressName, AddressName));

You have to specify the DictionaryName.FieldName in your getElementById call.

Clear the select box by setting the options.length equal to 0.

Patti Richards
Level 1
Level 1

I've only done the piece with copying what they selected (comma delimited list) to a different text area. I just did on onChange Conditional Rule with a setValue.

Allen Cecil
Level 1
Level 1

An enhancement request was opened for this feature a few days ago. The ID # is: 26952

Peter Lee
Level 1
Level 1

I agree with the out of box feature, but if you wanted you could always either add code to display a prompt until the processing is complete, or as you describe change the mouse pointer to an hourglass(only visual).

//Set Cursor to hourglass

document.body.style.cursor = "wait" ;

//Set hourglass off

document.body.style.cursor = "default";

You can create the options for a drop-down list using a data retrieval rule.  If you don't actually want to retrieve the rule contents from a database table, just write the rule like:

(Oracle)
Select 'Value 1' FieldName from dual
union
Select 'Value 2' from dual
...

(SQLServer)
Select 'Value 1' AS FieldName
union
select 'Value 2'
...

Just remember to put in the column alias ("FieldName") and map that column to a form field.

Review Cisco Networking for a $25 gift card