AnsweredAssumed Answered

QML - How to query portal group info for a user

Question asked by paul.haakma on Jun 28, 2015
Latest reply on Jun 30, 2015 by paul.haakma



Can anyone point me in the right direction for any samples or code that shows how to query what groups a user belongs to on a portal. I can sign in to the portal ok. I can see several code samples on querying portal items such as web maps, but haven't come across any yet that show querying groups.


So far I have a Portal object, a PortalSearchParameters object, a PortalSearchGroups object and a button to fire the 'searchGroups' method of the PortalSearchGroups object, but I can't get the onRequestComplete signal to fire and can't access any results of the query, so I assume the query is failing somewhere.


Any ideas?



   PortalSearchParameters{   id: portalSearchParameters;     query: '*'; }

  PortalSearchGroups{ id: portalSearchGroups;  portal: myPortal;

onRequestStatusChanged: {

  if (requestStatus === Enums.PortalRequestStatusCompleted)   {

  console.log("request status is completed!")  }  }

  onRequestComplete: {   console.log("request is complete..............") }


    Button{  id: testPortalSearchGroups; x: 300;    y: 300;   text: "Search Portal Groups";
   onClicked: {   console.log("test Portal groups button clicked")