How to use programmatic filter with domo

Hello devs,

I need help over adding multiple i frame with programmatic filter, after reading docs and trying out the JavaScript filter code ( i am not ure how it working for different filters neither the code is working.

So is there any one who have a integration of filter in domo


  • GrantSmith
    GrantSmith Indiana 🥷

    Hi @sunny

    How is it not working? What have you tried? Are you able to log into the sample login page with mike as the user? Did you start up the yarn server to connect to? There's a lot of moving pieces with programmatic filters. It'd be helpful to know what you tried and what the outcome of it was.

  • @GrantSmith First of all thanks for your reply.

    Steps i take to work with given repository ( After clone i created .env file and paste the Client ID, Secret, EMBED_ID, EMBED_TYPE, then npm install (i am not using yarn).

    In terminal i write npm start for running the project. Once project started i open the http://localhost:3001/ in browser where i can simply see company login screen, after putting username and password (rachael), i entered in main screen where filter showing in top of the screen , but entering any filter like merchants and brand it's doing nothing neither any api is called in network mode.

    This is image from domo where i used filter for brand Beechnut and only beechnut data is showing

    These images are from my localhost, nothing will happened when i clicked on submit filter button

    @GrantSmith Let me know can you help me over this issues. Also please take a look at this one github issues.

  • GrantSmith
    GrantSmith Indiana 🥷

    What values are you attempting to filter on? Are you using the correct column name?

  • sunny
    sunny ⚪️
    edited September 2021

    I have to show multiples iframe in my web app for displaying top 25 products, retail sales, website analytics.

    can we do a real time chat for discussions.

    I am trying brand, merchant and project team name

  • Also one more thing why ports is undefined

    ```window.addEventListener("message", e => {

    console.log('received message on window', e);

    console.log("e.ports[0]", e.ports[0]);

    // Check origin

    if (!e.ports[0]) return;

    const referenceId =;

    console.log(`referenceId = ${referenceId}`);

    const port = e.ports[0];


    const onPortMessage = e => {

    if ( {

    console.log(`received rpc event message with referenceId = ${referenceId} and method ${}`);

    switch( {

    case '/v1/onDrill':

    const filters =['filters'];

    console.log(`filters = ` + JSON.stringify(filters));

    const iframe = document.querySelector(`#iframe${referenceId}`);

    if (window.ENV.REPLACE_IFRAME) {

    iframe.src = `/embed/page?filters=${JSON.stringify(filters)}`



    case '/v1/onFrameSizeChange':

    console.log(`width = ${['width']}`);

    console.log(`height = ${['height']}`);



    console.log('params = ' + JSON.stringify(;



    if ('result')) {

    console.log(`received rpc response message with referenceId = ${referenceId}`);

    const result =;

    console.log(`result = ${result}`);


    if ( {

    console.log(`received rpc error message with referenceId = ${referenceId}`);

    console.log('error = ',;



    port.onmessage = onPortMessage;

    ports[referenceId] = port;


  • GrantSmith
    GrantSmith Indiana 🥷

    Have you tried URL encoding your pfilters since you're using IFrames? You can use a website like to easily convert it for you.

  • Have you tried URL encoding your pfilters since you're using IFrames? => Yes i am using i frames

    You can use a website like to easily convert it for you. ==> This is just wrong thing you committed.

    Well right now i am facing different issues, in my local all iframes are woking fine but in server no iframes are workiing

  • No comment