Question
Revature
US
Last activity: 11 Dec 2017 8:01 EST
How to store data from a report in a property
I have a business requirement that states employees must not claim more than x dollars in reimbursements in the current year.
I created a report definition that gets the total amount of dollars awarded per employee in the current year.
The idea is to check the requested amount against the awarded amount inside a validate rule.
Is there a way to reference the total reimbursement amount per employee inside a case?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IN
Hi Egan,
Please check my config below
Hi Egan,
Please check my config below
Hope it helps
Thanks,
Ujjwal
Pegasystems Inc.
IN
Can you please elaborate your requirement?
Is it that you want to display the calculated reimbursement amount per employee as a report in a case?
Revature
US
Thanks for the reply!
The application has a Reimbursement case type where employees can request reimbursements.
When employees create a new Reimbursement case, the system needs to check if that employee's total reimbursement is less than 1000 dollars.
So after an employee enters in the reimbursement amount, a validate rule needs to check to make sure the total reimbursement in addition to the requested amount is under 1000 dollars.
Pegasystems Inc.
IN
Hi,
From the onchange of reimbursement amount , call an activity where report definition is called. The report definition results can be stored in pyPageName which is given in the parameter. Based on the obtained result you can either call the Validate rule using Obj-Validate method where you can check or you can directly check in the activity itself.
Revature
US
Hi,
I currently have an activity that calls Rule-Obj-Report-Definition.pxRetrieveReportData, then sets a property.
The problem I have now is passing a parameter to the report definition from the activity, so that I can get data for a specific employee.
I've attached screenshots of my activity. It takes a single parameter called OperatorID, but I don't know how to pass this to the report definition.
Pegasystems Inc.
IN
Pegasystems Inc.
IN
Hi There,
As explained by Kakul(Venkat) you can call report Definition on change which creates pageName (pyReportContentPage) and pyReportContentPage.pxResults List can be iterated to validate the values.
It also seems that the data that RD would contain would be very static in nature, hence having a parameterized DataPage (Employee Identifier as Key) sourced from Report should work.
Hope it helps:)
Regards,
Ujjwal
Updated: 6 Dec 2017 15:04 EST
Revature
US
Hi Ujjwal,
I'm trying to set up the data page sourced from a report definition, but I can't figure out how to configure the response data transform. I've attached screenshots of my data transform and the error I get on my clipboard when I run a case.
Accepted Solution
Pegasystems Inc.
IN
Hi Egan,
Please check my config below
Hi Egan,
Please check my config below
Hope it helps
Thanks,
Ujjwal
Revature
US
Thanks, Ujjwal! This is really helpful, I was able to populate a data page with a report definition.
However, I'm having a problem with passing parameters to the data page. I'm passing pxCreateOperator to the data page in a data transform, but pxResults still contains more than 1 record.
Revature
US
Forgot to attach screenshots
-
Vibek Sharma
Pegasystems Inc.
IN
Hi Egan,
I think you have missed Param in report definition.
The parameter added in Data Page must be applied to Report as well.
Now the parameter must be used as filter in Report to get unique row.
Please check my Report screen shot from above posts.
Thanks,
Ujjwal
Revature
US
Thank you so much Ujjwal, it works now thanks to your help. I just renamed my parameters to pxCreateOperator, and it works!