cancel
Showing results for 
Search instead for 
Did you mean: 

How can i filter by excluding values from a data source?

Former Member
0 Kudos

I have a BW query with the following results:

  • first Item
  • second item
  • otheri tems (group of 3 items)
  • not assigned (group of many items)

I do not want "not assigned" items

I checked on internet ( excluding filter ) and i have to put "!" before tha value like that:

!value1; ! value!;

in the input by string area for exluding values but it doesn't work with any item i would like to remove from the list.

I tried to do also a workaround where i filter the graphic object (listbox, crosstab and dropdown menu) with the following code (in global script area):

/*removing all items, and adding only the items i need but it's not dynamic */
LISTBOX_1.removeAllItems();
LISTBOX_1.addItem("CG0A13", "APEROL");

DROPDOWN_1.setSelectedValue("OTHERS");

I have checked also that only the crosstab mantains a hierarchy and filters of query BW, in the listbox and dropdown menu i see all the value

I would like to get:

  • 1) firstItem
  • 2) seconditem
  • 3)otheritems (group of 3 items)
  • 4) not assigned
  • instead i get:

    • 1) firstItem
    • 2) seconditem
    • 3)thirditem
    • 4)fourthitem
    • ...
    • 120) lastitem
    • Accepted Solutions (0)

      Answers (2)

      Answers (2)

      Former Member
      0 Kudos

      I tried by input string :

      • setfilterExt ("id_structure", "!keyvalue");
      • setfilterExt ("name_structure", "!keyvalue");

      by global script:

      • DS_1.setFilterExt("name_structure",
        "keyvalue");
      • var filterExt = "CG0A13";
        
        selectedValues.forEach(function(valueElement, index) {  
        
        filterExt = filterExt + "!" + valueElement + ";";
        
        });
        
        BRAND.setFilterExt("0MATERIAL__0PRODH2", filterExt);<br>

      but nothing happens!

      Thanks

      TammyPowlas
      Active Contributor
      0 Kudos

      Have you checked your syntax, similar to what Victor describes in this thread? https://archive.sap.com/discussions/thread/3592485