Web interface reports: Dynamic Query and Number of Records returned

413 views
Skip to first unread message

somesh.m...@gmail.com

unread,
Aug 22, 2013, 10:21:01 AM8/22/13
to suppor...@runmyprocess.com, somesh. mukherjee
Hi,

For Web Interface Reports included on a RMP Web form, using the RMP Report Widget:

1. How can I include a dynamic query filter (like we can do for a report driven out of a collection)?

2. I am also using the Web Interface Report response and parsing the response XML to read certain Report Measures information. I need to be able to pull all the records, but noticed that the "Nb" parameter in the query restricts it to a certain number. I can manually bump it to a higher number but was wondering if there is a way to request all records?

Thanks!

Gareth Thiveux

unread,
Aug 22, 2013, 11:05:38 AM8/22/13
to suppor...@runmyprocess.com, somesh. mukherjee
Hi Somesh,

1. Here are the javascript functions you can use to filter on a web interface or process report :

widgetID.addFilter(standardColumnName,operator,primaryValue,secondaryValue): this function sets a filter on a given column for a standard process or application column.

widgetID.addMeasureFilter(columnName,operator,primaryValue,secondaryValue): this function sets a filter on a given column for a measure. Column name for measure is name of measure

widgetID.refresh() : this function refreshes the report. It must be used after "addMeasureFilter" function.

These functions can only be used if "Enable filter" of report is not checked.

An operator can be : RMP_FilterOperator.EQUAL, RMP_FilterOperator.NOT_EQUAL, RMP_FilterOperator.LESS_THAN, RMP_FilterOperator.GREATER_THAN, RMP_FilterOperator.LESS_THAN_EQUAL, RMP_FilterOperator.GREATER_THAN_EQUAL, RMP_FilterOperator.BETWEEN, RMP_FilterOperator.CONTAINS, RMP_FilterOperator.IN, RMP_FilterOperator.NOT_IN

A standardColumnName can be for application : RMP_AppliReport.NAME, RMP_AppliReport.PUBLISHED, RMP_AppliReport.STATE (id of screen starting on 0), RMP_AppliReport.AGE, RMP_AppliReport.ONHOLD, RMP_AppliReport.OWNER, RMP_AppliReport.CONTRIBUTOR

A standardColumnName can be for process : RMP_ProcessReport.NAME, RMP_ProcessReport.DURATION, RMP_ProcessReport.DELAY, RMP_ProcessReport.YEAR, RMP_ProcessReport.MONTH, RMP_ProcessReport.DAY, RMP_ProcessReport.ID, RMP_ProcessReport.PARENT, RMP_ProcessReport.PUBLISHED, RMP_ProcessReport.UPDATED, RMP_ProcessReport.STATUS, RMP_ProcessReport.EVENTS, RMP_ProcessReport.OWNER, RMP_ProcessReport.CONTRIBUTOR

Example : id_report.addMeasureFilter("mymeasure",RMP_FilterOperator.EQUAL,"myvalue");id_report.refresh();


2. Results are paginated and you can only go up to nb=100. A solution to get all results is to loop and concatenate each page results by playing on first=0, then first=first+100 ... until the number of results on a page is <100 which means you're on the last page.


Regards,

Pre-Sales Consultant / Consultant Avant-Vente
 Fujitsu RunMyProcess
22 rue Chauchat, 75009 Paris - France (GMT+1)

     


Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.



--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/2862301f-a3f9-4328-86c0-85bb085b3eb1%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/groups/opt_out.

somesh.m...@gmail.com

unread,
Aug 22, 2013, 11:25:01 AM8/22/13
to suppor...@runmyprocess.com, somesh. mukherjee
Thanks Gareth!

For your feedback on #2, do you have a sample code handy? I can see that there is a category on the response: {term: "nb_rows",label: "310"} which I presume indicated the total number of records available on the response?

Gareth Thiveux

unread,
Aug 22, 2013, 11:28:47 AM8/22/13
to suppor...@runmyprocess.com
Hi Somesh,

Can you explain me (or use screenshots) how you're querying the response so far ?


Regards,

Pre-Sales Consultant / Consultant Avant-Vente
 Fujitsu RunMyProcess
22 rue Chauchat, 75009 Paris - France (GMT+1)

     


Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.


2013/8/22 <somesh.m...@gmail.com>
Thanks Gareth!


For your feedback on #2, do you have a sample code handy? I can see that there is a category on the response: {term: "nb_rows",label: "310"} which I presume indicated the total number of records available on the response?
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.

somesh.m...@gmail.com

unread,
Aug 22, 2013, 11:36:37 AM8/22/13
to suppor...@runmyprocess.com
Here you go, I have the following Ajax call to retrieve and parse the response of a web interface report. My use case needs me to populate the value of dupExist flag.

___________________________________________________________________________________
$j.ajax({
type : "GET",
url : "https://live.runmyprocess.com/live/2215365968/applireport/all_nominations_test.csv?nb=20000&first=0&filter=PROJECT%20MODE%20APPLI&operator=EE%20EE%20EE&value=58903%20TEST%2084206&column=name%20measure_10%20measure_6%20measure_11%20measure_1&media=json",
data : {},
cache : false,
async : false,
dataType : "json",
error : function () {
alert('Error while loading credits.');
},
success : function (P_result) {
var myentries = get_array(P_result.feed,"entry");
for(var i=0;i<myentries.length;i++){
var res_nominee_memno="";
var res_nom_class="";
var res_nom_status="";
for(var j = 0; j<myentries[i].category.length; j++){
if(myentries[i].category[j].term=="MEASURE_1"){
res_nom_status = myentries[i].category[j].label;
}else if(myentries[i].category[j].term=="MEASURE_11"){
res_nominee_memno = myentries[i].category[j].label;
} else if(myentries[i].category[j].term=="MEASURE_6"){
res_nom_class = myentries[i].category[j].label;
}
if("" != res_nom_status && "" != res_nominee_memno && "" != res_nom_class){
break;
}
}
if("" != res_nom_status && "Submitted" == res_nom_status && "" != res_nominee_memno && nominee_memberno == res_nominee_memno && "" != res_nom_class && nomination_class == res_nom_class){
dupExist = "true";
break;
}
}
}
});

___________________________________________________________________________________

Gareth Thiveux

unread,
Aug 22, 2013, 12:58:20 PM8/22/13
to suppor...@runmyprocess.com
Hi Somesh,

I guess something like this would work :

function get_all_nominations(first){
$j.ajax({
type : "GET",
url : "https://live.runmyprocess.com/live/2215365968/applireport/all_nominations_test.csv?nb=100&"+first+"=0&filter=PROJECT%20MODE%20APPLI&operator=EE%20EE%20EE&value=58903%20TEST%2084206&column=name%20measure_10%20measure_6%20measure_11%20measure_1&media=json",
if(myentries.length == 100){
get_all_nominations(parseFloat(first)+100);
}
}
});
}

get_all_nominations(0);


Regards,

Pre-Sales Consultant / Consultant Avant-Vente
 Fujitsu RunMyProcess
22 rue Chauchat, 75009 Paris - France (GMT+1)

     


Fujitsu RunMyProcess user? Please add a review on GoogleApps Marketplace

Afin de contribuer au respect de l'environnement, merci de n'imprimer ce message qu'en cas de nécessité.
Be environmentally friendly: do not print this email unless it is entirely necessary.


2013/8/22 <somesh.m...@gmail.com>
Here you go, I have the following Ajax call to retrieve and parse the response of a web interface report. My use case needs me to populate the value of dupExist flag.
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages