Archive

Archive

How to have Discovery type parameter displayed as Tree Menu when Advanced Mode is enabled in Custom

Member

I am able to have configuration code for dropdown, but so far can't seem to make it happen for Tree Menu.  Please send some sample code and improve documentation.

 

Thanks.

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In

Comments

  • Domo Employee

    Can you let me know which connector that you are referring to? We can definitely get this looked at. Thanks

  • Member

    I'm writing my own custom connector.  Please see attachement.

     

     

  • Domo Employee

    I will send this over to our team to see if there is sample code that we can provide. Stay tuned. Thanks

  • Domo Employee

     Hua,

     

    Please see attached.

     

    Of note, please notice the publisTree() command at the end.

     

        

    var res = JSON.parse(httprequest.get(baseURL+'all'));
    var regions = {};
    for(var i in res){
    var country = res[i];
    if(!country.region){
    country.region = "other"
    }

    if(!regions[country.region]){
    var node = discovery.addNode(discovery.tree,country.region)
    regions[country.region] = node;
    }
    discovery.addLeaf(regions[country.region],country.name)
    }
    discovery.publishTree();

     

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In