Posted: 27 Aug 2016 11:58 EDT Last activity: 9 Sep 2016 11:44 EDT
Saving the DataPage(List) values to External DB
There is a table called ProductDetails with columns P_ID, P_Name, Price in PostgreSQL. I have linked the table through DataBase Class Mapping.I have created one datapage(D_ProductList) of type List which has a DataSource of Report Definition.
UI: An auto complete who source is data page to populate the Product Name(P_Name).Based on the Product name (Which acts as a parameter to the datapage D_ProductList and Report Definition) there is repeating grid to populate the list of items.
Whenever user selects a particular column and clicks submits the particular column record should be saved to the another table called transaction details.
I have written an post processing activity in the flow action for saving the details of an particular product to the table. As I'm passing the product name as a parameter to the dataPage and ReportDef in Clipboard for every parameter a DataPage is dynamically generate.
For Example: D_ProductList[“ABC”] (code-pega-list).
In Page and Class tab of activity I have written the class name and for the page Name D_ProductList.pxResults.
In Steps tab: I’m using ”Property-Set” method and getting the values from clipboard.As it is pxResults its asking for index I have passed it as D_ProductList.pxResults(1) for setting the Price property. But it works only for the 1st line in the repeating-grid how can I make it dynamically (If user 2nd row in the grid) and save it to the table.
Help appreciated !
Thanks & regards,
***Updated by moderator: Marissa to update ctaegories***
Basically you can use the "post update activity" in the advanced option of the Grid configuration. This activity can be made to run post or pre update of the row and the step page will be currently selected row page(in case of edit scenario). This way you can move away from hardcoding the page name in the page & classes tab.