M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 75
Registered: ‎02-19-2019

How to Pass SQL query values to Javascript function

Dear community ,

 

I have a sql query that returns point IDs 

 

SQL[select PP_PP from PLANNING_POINT where PP_PK in ({SESSION.Map.MapSelection})]

I have a javascript function with 2 parameteres, I need to send query value as a paramerter 

 

 

function SelectElements (layername,pointids){  
  SC.Map.setActiveLayer(layername).then(function(){
      return SC.Map.clearSelectedElements().then(function(){
            return SC.Map.setSelectedElements(pointids).then(function(){  
		  SC.Map.closeWebBrowser(); 		                
          });
      });
  }).fail(function (error) {
          alert(error);
  });
}

How can send SQL query values to javascript function ?

SelectElements('PlanningData', queryvalue)

Thanks in Advance !