AnsweredAssumed Answered

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

Question asked by marvet on Jan 22, 2014
Latest reply on Jan 23, 2014 by marvet
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";)
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
});

Outcomes