Question

Passing multiple Values for a field in Report Definition

Hi,

i have a requirement to fetch the data from different tables and populate the data to excel.so for this i have created one Report definition and joined many tables to fetch the required data.this report definition i'm calling from Activity.

i have one scenario for ex: Org ID ='123','234'. this value will be on clipboard page. but when i used same property in query tab of Report definition, it is not fetching any data.

is it possible to fetch the data from tables using Report definition in this kind of scenario.

please suggest.

thanks in advance

Correct Answer
December 3, 2019 - 6:59am

Hi, As you said your "OrgID" data is there in the clipboard but in which form?

  • if it's in a pagelist, use function "pxStringCSVFromPageList" which will format the specific property in required format to pass in the RD filter condition.
  • if the data is in a valuelist, then you can directly refer the property in the RD filter condition.

Comments

Keep up to date on this post and subscribe to comments

Pega
December 3, 2019 - 6:10am

In RD, when multiple values are selected it would be presented in this format {"ABCD","DEF"}, and the SQL that is generated uses 'IN' clause rather than 'EQUAL TO'.

So, the parameter should have values in the above format, which can be achieved using StringBuffer-Append method.

December 3, 2019 - 6:59am

Hi, As you said your "OrgID" data is there in the clipboard but in which form?

  • if it's in a pagelist, use function "pxStringCSVFromPageList" which will format the specific property in required format to pass in the RD filter condition.
  • if the data is in a valuelist, then you can directly refer the property in the RD filter condition.

December 3, 2019 - 8:00am
Response to Abhinav_Chaudhary

Thanks Abhinav.

i tried second option which you gave, it worked for me.