Skip to Content
avatar image
Former Member

How do I pass an external key value from a BEX Query to a Universe?

I have a DROPDOWNBOX that has items from a data source (BEX Query). Let's say it contains city names. I need to pass the external key of the selected city to a data source (universe) that has the same cities and associated keys to fill some LISTBOXes. When I try to do it I get a warning "All selections for dimension City are invalid and have been discarded". How do I fix it?

Code:

// set filter on universe
DS_1.setFilterExt("_RogQIRwAEeiofrGGUX0vqg",DROPDOWN_1.getSelectedValue());
var members = DS_1.getMembers("_RozLEBwAEeiofrGGUX0vqg",400);
LISTBOX_1.removeAllItems();
members.forEach(function(m,mi) {
   LISTBOX_1.addItem(m.externalKey,m.text;
});
LISTBOX_1.sort();
LISTBOX_1.addItem("","All Cities",0);
LISTBOX_1.setSelectedValue("");
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Mar 08 at 08:58 AM

    Hi Eric,

    Can you provide screenshots of the following?:

    1) The initial view of the BEx Query data source you are using to populate the Dropdown, showing the key and text values of the dimension members to be used for filtering;

    2) The initial view of the Universe data source showing the key and text values of the dimension "_RogQIRwAEeiofrGGUX0vqg".

    You need to make sure that the format of the key values from the BEx Query match the format of the corresponding Universe dimension values.

    Also, how are you populating the Dropdown Box?

    Regards,

    Mustafa.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 09 at 11:10 PM

    Hi Eric,

    I suggest you change your code as follows:

    //set filter on universe
    DS_1.setFilterExt(<Technical ID of BA_Key>,DROPDOWN_1.getSelectedValue());
    

    Regards,

    Mustafa.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 08 at 04:34 PM

    BEX Query initial View

    Universe Initial View

    Business Area (City) in the BEX Query corresponds to the BA_Key (City) in the universe.

    The items For DROPDOWN_1 get loaded via the following code during the application's "On Startup" event.

    DS2.loadDataSource();
    DS2.setVariableValueExt("ZA_BUSAR",exclusion);
    DS2.setVariableValueExt("ZFYR_MULTI_REQ","2016;2017;2018");
    DROPDOWN_1.setItems(DS2.getMemberList("0BUS_AREA", MemberPresentation.EXTERNAL_KEY,  MemberDisplay.KEY_TEXT, 1000));
    DROPDOWN_1.sort();
    
    Add comment
    10|10000 characters needed characters exceeded