How to report on how many requests were submitted via the portal?

KristinaB
Giga Contributor

Has anyone successfully figured out how to report on how many requests were submitted via the portal other than querying if requester and opened by are the same? Obviously, on INC, we can report on contact type but not finding anything for RITMs.

TIA

1 ACCEPTED SOLUTION

Alex Macdonel
Tera Expert

The following is something I hacked (in a pejorative way) to determine if a record was submitted through the portal. We're using undocumented features so buyer beware...



Before insert business rule on the task table:



(function executeRule(current, previous /*null when async*/) {


  var glideURI = gs.action.getGlideURI().toString();


  if (glideURI.indexOf("angular") >-1){


  current.contact_type='self-service';


  }


})(current, previous);



This works because we noticed that whenever a user creates a record from the Service Portal the URI says 'angular.do' instead of 'incident.do' or 'service_catalog.do'. There's still other ways to manipulate the contact_type variable and this will probably be tweaked one or two times before we're happy with it.


View solution in original post

11 REPLIES 11

Alex Macdonel
Tera Expert

The following is something I hacked (in a pejorative way) to determine if a record was submitted through the portal. We're using undocumented features so buyer beware...



Before insert business rule on the task table:



(function executeRule(current, previous /*null when async*/) {


  var glideURI = gs.action.getGlideURI().toString();


  if (glideURI.indexOf("angular") >-1){


  current.contact_type='self-service';


  }


})(current, previous);



This works because we noticed that whenever a user creates a record from the Service Portal the URI says 'angular.do' instead of 'incident.do' or 'service_catalog.do'. There's still other ways to manipulate the contact_type variable and this will probably be tweaked one or two times before we're happy with it.


Hello @Alex Macdonel ,

 

I have used the same code in business rule on SC Task form but it doesnot work for me,

 

Please help me on this, my client is asking me to set the contact type as "Self service- portal" when the end user submits any service catalog requests through the portal.

 

Any suggestions will be most welcome.

 

Thank you!!!