cancel
Showing results for 
Search instead for 
Did you mean: 

How to get siteName in authority-query.get.js

marvet
Champ in-the-making
Champ in-the-making
I'd like to define a rule (Perform Action: Send email) where all sitemembers of mySite receive an email (GROUP_site_mySite). The recipients list is generated with authority-query.get.js

So I included following code to authority-query.get.js and all works fine if siteName is a static string (f.e. var siteName = "mySite"Smiley Wink
I want to get the siteName dynamically but if I use args.siteName as variable I always recieve a NULL as result.

Does anyone have an idea how I can get the siteName within authority-query.get.js?

Additional code in authority-query.get.js:

var siteName = args.siteName; //I get null as siteName, why doesn't this work?
mappings.push(
{
   type: MAPPING_TYPE.STATIC,
   data: [
   {
      shortName: "site_" + siteName,
      fullName: "GROUP_site_" + siteName,
      displayName: "site_" + siteName,
      description: "GROUP_site_" + siteName
   }
   ],
   fn: mapGroup
});
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
the optional argument is called "site" not "siteName".

marvet
Champ in-the-making
Champ in-the-making
Hi mrogers, thank you for your fast reply.
I tried    
var siteName = args.site;

but I still get a null as result instead of the site name.