Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

Possible to change the display order of dictionaries dynamically?

Is it possible to change the display order of dictionaries dynamically?

Have a need to reorder the dictionaries depending on which task the form opens in... if anyone can share anything similiar they have done.

Thanks.

2 REPLIES
Bronze

Re: Possible to change the display order of dictionaries dynamic

If you have Multi-Cloud installed, you can see an example of this in the MultiCloud_Platform_Handler JavaScript (triggered during form load) where the Multi-Cloud dictionary is moved to the top of the form:

if   (ServiceName == 'Add Network')  {

    // Re-order the dictionaries on the form

    var MultiCloudNetwork_Element = document.getElementById("MultiCloudNetwork.DictionaryTable");

    var VLANInstance_Element = document.getElementById("VLANInstance.DictionaryTable");

    var VLANCustomerInput_Element = document.getElementById("VLANCustomerInput.DictionaryTable");

    VLANInstance_Element.parentNode.insertBefore(MultiCloudNetwork_Element  , VLANInstance_Element );

    VLANInstance_Element.parentNode.replaceChild(VLANCustomerInput_Element  , MultiCloudNetwork_Element  );

    VLANInstance_Element.parentNode.insertBefore(MultiCloudNetwork_Element  , VLANCustomerInput_Element );

...

You should be able to follow this example.

Community Member

Possible to change the display order of dictionaries dynamically

Thanks Derek. I will test it out but sounds like that should work.

378
Views
0
Helpful
2
Replies
CreatePlease to create content