Starting an XMLPublisher report based on Connected Queries through an AE and AdvancedSearchQueries m
edited Oct 22, 2014 10:04AM in PeopleTools and Lifecycle Management - PSFT (MOSC) 3 commentsAnswered
Starting an XMLPublisher report based on Connected Queries through an AE, method AdvancedSearchQueries is called at some point:
method GetQueryScopeByName
/+ &sQueryName as String +/
/+ Returns Number +/
Local ApiObject &aQueryList;
Local number &nQryCount;
/* WriteToLog(%ApplicationLogFence_Error, "TEST 4");
WriteToLog(%ApplicationLogFence_Error, &sQueryName);*/
&aQueryList = %Session.AdvancedSearchQueries( False, &sQueryName, %Query_AdvSrchEquals, "", 0, "", 0, "", 0, "", 0, "", 0, %Query_Query, 0, False);
&nQryCount = &aQueryList.Count;
/* WriteToLog(%ApplicationLogFence_Error, "TEST 5");
WriteToLog(%ApplicationLogFence_Error, Char(&nQryCount));*/
Evaluate &nQryCount
When = 0
Return &Qry_NotFound; /* 2 */
When-Other
If &aQueryList.Item(1).PublicPrivate = 0 Then
Return %Query_Private; /* 0 */
Else
Return %Query_Public; /* 1 */
End-If;
End-Evaluate;
end-method;
This method is described in the PeopleCode API Reference PeopleBook but it seems not to work properly as the parameter passed to it is the name of an existing query in our system but the method returns 0 (which means Query not found).
method GetQueryScopeByName
/+ &sQueryName as String +/
/+ Returns Number +/
Local ApiObject &aQueryList;
Local number &nQryCount;
/* WriteToLog(%ApplicationLogFence_Error, "TEST 4");
WriteToLog(%ApplicationLogFence_Error, &sQueryName);*/
&aQueryList = %Session.AdvancedSearchQueries( False, &sQueryName, %Query_AdvSrchEquals, "", 0, "", 0, "", 0, "", 0, "", 0, %Query_Query, 0, False);
&nQryCount = &aQueryList.Count;
/* WriteToLog(%ApplicationLogFence_Error, "TEST 5");
WriteToLog(%ApplicationLogFence_Error, Char(&nQryCount));*/
Evaluate &nQryCount
When = 0
Return &Qry_NotFound; /* 2 */
When-Other
If &aQueryList.Item(1).PublicPrivate = 0 Then
Return %Query_Private; /* 0 */
Else
Return %Query_Public; /* 1 */
End-If;
End-Evaluate;
end-method;
This method is described in the PeopleCode API Reference PeopleBook but it seems not to work properly as the parameter passed to it is the name of an existing query in our system but the method returns 0 (which means Query not found).
0