How to Insert Records into Table in Pega
I was created an Local Data Type with Zero Records, Lets see how to insert data in to Table.
I have created a flow , in the first assignment I get Employee Information .In the flow action post action I mapped an activity to enter the information what we get in the first assignment into the table.
Now add activity to flow action post action.
Activity Methods used to insert data to table.
Pages and Class Tab:
In this activity we are inserting the data in to the table, We have all the data except EmployeeID, We have to get incremented EmployeeID for each employee.
EmpCaseInfo page to store Case Details what user provide in the form.
MaxRecords page to store existing records in table.
Obj-Browse to retrieve all the data which is already present in the table. We are using this step to get the count of the table, Now we can add 1 to get next employee id for current Case.
In the property-set , I copied the data in Primary Page(pyWorkPage-TGB-HRApps-Work) to EmpCaseInfo(TGB-HRApps-Data-EmployeeInfo) Page.
EmployeeID is calculated by record count of the table +1, if 10 records are already present then pxResultCount will be 10, for our next record we are providing EmployeeID 11.
Obj-Save to save the data into Table.
Lets test the activity by run the flow and enter test data.
I am providing this data and click submit.
Now you can see first record is inserted.
Lets provide another one data.
After processed this case, you can see a new record is added in table.
That's all insertion of data into table. If you have any doubt ask in comment.
thank you sharing good valuable information you can thought your web sitepega online traning
ReplyDeleteThank you so much I just love this Blog. Thanks for sharing...
ReplyDeletei'm in love with this blog mate :)
DeleteCan u tell how to add multiple records(page list) into table?
ReplyDeleteWe have to loop through all the pages in page list. Inside loop we have to save each page to table. Thanks.
DeleteThanks for your information. very good article.
ReplyDeletePega Online Training India
Pega Course