cancel
Showing results for 
Search instead for 
Did you mean: 

how to add "ALL" in sorting in dropdown box?

chandrasekhar6
Participant
0 Kudos

Hi All,

Using the below SCN link we have to implemented the sorting in Dropdown-box,

var membersAsc = DS_3.getMembers("0CALMONTH", 1000);  // Initialise ascending member array
var membersDesc = [membersAsc[0]];                    // Initialise descending member array


    membersDesc.pop();
	
var memberCount = membersAsc.length;	


// Build descending member array
membersAsc.forEach(function(element, index) {
  membersDesc.push(membersAsc[memberCount - index - 1]); 
});


// Populate Listbox and Dropdown
membersDesc.forEach(function(element, index) {
 
  DROPDOWN_MNTH.addItem(element.internalKey, element.text);
 
});

https://blogs.sap.com/2017/11/14/sorting-in-descending-order-for-listboxes-and-dropdowns/

but in dropdown box missing ALL items selection, here how to add ALL items selection.

please help in the scenario

Thanks,

Chandrasekhar

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

In the Dropdown box properties for "All Members" type "All". You will get the All option in Dropdown list.

chandrasekhar6
Participant
0 Kudos

Hi Taneer,

Thanks for the reply.

Could you please suggest in Dropdown properties, where I will type "ALL"

I have given in Display --> Items --> ALL Members Text

getting in dropdown as shown below,

In Dropdown missing descending order.

But I need as below : In dropdown descending order along with ALL items selections,

Thanks,

Chandrasekhar