Posted: 21 Mar 2019 13:06 EDT Last activity: 22 Mar 2019 6:41 EDT
Transfer of data from ui to database
I have to transfer the data from the ui section in the work class to the database.I have 11 columns like phone,email,first name ,last name etc and i have to update the data to the database at the same time.Can anyone help me on this? Please provide the steps to do it.
***Edited by Moderator Marissa to move from Pega Academy to Pega Support Community; update platform capability tags***
If i understood your requirement correctly below if what you need to do:
If you want to map the ui fields with the DB table columns, you need to mention the property corresponding to the UI field in the section.
For example: You would have created a property name Phone and a UI field in the section.
Now you need to open the cell property of the UI field in the section (by clicking gear icon) and in the property field in the cell property mention .Phone (if both the UI section and property are in the same class).
Similarly you need to map all the UI fields with the corresponding property.
Once you click Submit button in the UI at runtime the values provided in these fields will be saved to the Database.
If you want to save all the data in the database as soon as you enter the value in the field, then you need to add "onChange" event with "Save" action.
Please let me know if i misunderstood your requirement.
Create a data class like XXX-XXX-DATA-Employee and map this data class to your table .Now create a page type property Employee in work class which of type XXX-XXX-DATA-Employee. Now use this page as a reference in section .Once your case gets submitted it will get saved to database.