AnsweredAssumed Answered

open a sub query in a Query Widget from a Custom Widget.

Question asked by muralidharmoka on Feb 25, 2019
Latest reply on Feb 26, 2019 by muralidhar.moka

Hi,

Look at the snap to understand this  better.

 

1) on Left we have a Custom Widget (red Color).

    it contains list of items (Shelter, Homeless, Food, etc...).

 

2) on the right we have queries in a Query Widget (Blue Color)

     Each of the list item from our Custom Widget is associated with one of the item in the Query Widget..

 

Question:

      Click on Shelter in Custom  to open "Shelter" in QueryWidget.

 

      I was not successful in opening the QueryWidget.

 

 

Here is the code I tried //

 

ClickCustomCategory: function(listItem)
   {  
        var widgetId = "widgets_Query_Widget_38"  //ID of the QueryWidget is known from setting.

 

        var  queries= this.appConfig.getConfigElementById(widgetId );
        var node = dijit.byId(widgetId ).tasksTbody;      //this gives the Table that contains all the queries in each tr rows.
      if (widgets.length === 0) {
          alert("No Target Widget configured.")
         return;
      }

   var QueryNodes = dijit.byId(this.config.selTargetwidget).tasksTbody;

     for (child in QueryNodes .children) {
    if (  listItem== QueryNodes .children[child].innerText)
          {
                 //open the QueryNode panel here
           }
}

Outcomes