<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Arranging the checkbox list posted using array from table in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647933#M4744892</link>
    <description>&lt;P&gt;If you want to arrange the checkbox values according to the other dimension member, then one thing you can do. You can make the "Rank_Countries" the ID and "City Branch" as the description. And then you can just use a for loop to add the "City Branch" values to the Check Box which will be sorted according to the ID.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2150453-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Please upvote, if this answer helps you.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Mar 2023 05:21:30 GMT</pubDate>
    <dc:creator>former_member838037</dc:creator>
    <dc:date>2023-03-15T05:21:30Z</dc:date>
    <item>
      <title>Arranging the checkbox list posted using array from table</title>
      <link>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaq-p/12647932</link>
      <description>&lt;P&gt;Hi everyone, Does anyone know how to arrange this list on my checkbox posted using array from table? to another checkbox? If anyone could help or give some reference. Thankyou.&lt;/P&gt;
  &lt;P&gt;Note: Its better if the arrangement is based on the numbering on the another column. Please see attached image of table.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2148848-image.png" /&gt; &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2148849-image.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 03:26:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaq-p/12647932</guid>
      <dc:creator>gfsampayan28</dc:creator>
      <dc:date>2023-03-15T03:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arranging the checkbox list posted using array from table</title>
      <link>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647933#M4744892</link>
      <description>&lt;P&gt;If you want to arrange the checkbox values according to the other dimension member, then one thing you can do. You can make the "Rank_Countries" the ID and "City Branch" as the description. And then you can just use a for loop to add the "City Branch" values to the Check Box which will be sorted according to the ID.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2150453-image.png" /&gt;&lt;/P&gt;&lt;P&gt;Please upvote, if this answer helps you.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 05:21:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647933#M4744892</guid>
      <dc:creator>former_member838037</dc:creator>
      <dc:date>2023-03-15T05:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Arranging the checkbox list posted using array from table</title>
      <link>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647934#M4744893</link>
      <description>&lt;P&gt;Question Sir  &lt;SPAN class="mention-scrubbed"&gt;argha2000&lt;/SPAN&gt; how can I do that if the list on the checkbox is cascaded from the list in the radio button? I just need to arrange the list according to the of rank_countries in the table?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 05:54:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647934#M4744893</guid>
      <dc:creator>gfsampayan28</dc:creator>
      <dc:date>2023-03-15T05:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Arranging the checkbox list posted using array from table</title>
      <link>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647935#M4744894</link>
      <description>&lt;P&gt;CheckboxGroup_1.removeAllItems();&lt;/P&gt;&lt;P&gt;res = Tbl_Retail_1.getDataSource().getResultSet({"Hemisphere_Globe":Checkbox_HemisphereList_arry});&lt;/P&gt;&lt;P&gt;console.log(res);&lt;/P&gt;&lt;P&gt;for (a=0; a&amp;lt;res.length; a++){&lt;/P&gt;&lt;P&gt;	CheckboxGroup_1.addItem(res[a]["Rank_Branch"].id,res[a]["City_Branch"].description);&lt;/P&gt;&lt;P&gt;	num&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Note: After doing this one I still cant arrange the order of the displayed branch on the checkbox. &lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 09:16:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647935#M4744894</guid>
      <dc:creator>gfsampayan28</dc:creator>
      <dc:date>2023-03-15T09:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Arranging the checkbox list posted using array from table</title>
      <link>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647936#M4744895</link>
      <description>&lt;P&gt;So are you looking to add values to the checkbox ordered by their rank value?&lt;BR /&gt;So based on the table above the checkbox would list cities in this order&lt;/P&gt;&lt;P&gt;Austin&lt;BR /&gt;Barcelona&lt;BR /&gt;Cairo &lt;BR /&gt;Bogota&lt;BR /&gt;Alexandria etc etc&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 09:48:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647936#M4744895</guid>
      <dc:creator>JBARLOW</dc:creator>
      <dc:date>2023-03-15T09:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Arranging the checkbox list posted using array from table</title>
      <link>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647937#M4744896</link>
      <description>&lt;P&gt;Hi Sir  &lt;SPAN class="mention-scrubbed"&gt;jbarlowjb&lt;/SPAN&gt;. Yes, Let me explain it correctly. I have a table with Rank_Branch, City_Branch and Hemisphere. I want to filter the table by choosing on the Hemisphere (Radiobutton) then listdown its City_Branch unde r that specific hemisphere which is need to be display based on the rank of those branches in the checkbox.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 08:12:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647937#M4744896</guid>
      <dc:creator>gfsampayan28</dc:creator>
      <dc:date>2023-03-16T08:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arranging the checkbox list posted using array from table</title>
      <link>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647938#M4744897</link>
      <description>&lt;P&gt;My understanding is that we want to add dimension member values to the checkboxGroup,&lt;BR /&gt;When added to the checkbox the values need to be sorted by the Rank column value.&lt;/P&gt;&lt;P&gt;Using the BestRunJuice sample data&lt;/P&gt;&lt;P&gt;We have a table with a dimension: Store &amp;amp; measure: Gross Margin  &lt;BR /&gt;In your example Gross Margin would be the Rank column&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2150532-1-sort.png" /&gt;&lt;/P&gt;&lt;P&gt;When the button is clicked the store values will be added to the CheckBoxGroup,&lt;BR /&gt;They will be added in the order low &amp;gt; high based on the Gross Margin column.&lt;/P&gt;&lt;P&gt;The code in the button is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CheckboxGroup_1.removeAllItems();
var dims = Table_1.getDimensionsOnRows()[0];

// sort the table low - high by the measures
var sel=Table_1.getDataSource().getDataSelections()[0];
Table_1.sortByValue(sel,SortOrder.Ascending,Direction.Vertical);

// the rest of the code grabs the values from the table and adds them to the checkbox

var selections=Table_1.getDataSource().getDataSelections();
var memberID = ArrayUtils.create(Type.string);
var memberDESC = ArrayUtils.create(Type.string);


for (var i = 0; i &amp;lt; selections.length; i++) {var member = Table_1.getDataSource().getResultMember(dims, selections[i]);
{  memberID.push(member.id);
   memberDESC.push(member.description);}}

for (var q=0;q&amp;lt;memberDESC.length;q++)	
		{CheckboxGroup_1.addItem(memberID[q],memberDESC[q]);}	

//remove the sort on the table
Table_1.removeSorting();
	&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The table is sorted by Gross margin,  the Store values are added to the Checkbox&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2150534-2-sort.png" /&gt;&lt;/P&gt;&lt;P&gt;At the end of the script we reset the table sort back to default&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2150535-3-sort.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 10:38:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647938#M4744897</guid>
      <dc:creator>JBARLOW</dc:creator>
      <dc:date>2023-03-16T10:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Arranging the checkbox list posted using array from table</title>
      <link>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647939#M4744898</link>
      <description>&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2156468-dasdas2.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Sir  &lt;SPAN class="mention-scrubbed"&gt;jbarlowjb&lt;/SPAN&gt; on your sample code the checkbox list are sorted or arrange base on the gross of each item. Its works correctly. But I have a question. Is it also possible to arrange the checkbox list based also on the rank but it is cascaded from the specific type. Example: There are different type of juice. There is column on the table with sweet, sour, bitter taste of juice then another column for the specific juices under that kind of taste then another column for the rank of those juices. I'm looking for the way to sort the list of specific juices under for example the sweet taste of juice. Please see the sample image of table labeled by process. &lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 06:28:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647939#M4744898</guid>
      <dc:creator>gfsampayan28</dc:creator>
      <dc:date>2023-03-17T06:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Arranging the checkbox list posted using array from table</title>
      <link>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647940#M4744899</link>
      <description>&lt;P&gt;You'll need to get the radio button to filter the table, to the taste of Juice --- then you can apply the logic I suggested above.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 17:36:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647940#M4744899</guid>
      <dc:creator>JBARLOW</dc:creator>
      <dc:date>2023-03-17T17:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Arranging the checkbox list posted using array from table</title>
      <link>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647941#M4744900</link>
      <description>&lt;P&gt;Hi Sir  &lt;SPAN class="mention-scrubbed"&gt;jbarlowjb&lt;/SPAN&gt; the thing is it is not filtered on table just logically filtered on checkbox and then arrange it before displaying. Just need to cascade the table logically then display the information sorted in the checkbox. So far, some reference I got do it in two for loop but I dont get how to simulate it properly. Any idea Sir ?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 02:23:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/arranging-the-checkbox-list-posted-using-array-from-table/qaa-p/12647941#M4744900</guid>
      <dc:creator>gfsampayan28</dc:creator>
      <dc:date>2023-03-21T02:23:38Z</dc:date>
    </item>
  </channel>
</rss>

