Scenarion for Savable DataPage For Fetching and Saving Updated Data Back to DB.

 Hi All,

In this Blog we will see real time implementation of Savable Data Page.


1) DEV Studio ---> Data Types --->Add data type



2) Add Data Type ---> Label = TVSerialDetails


Parent class =>  HDFC-HDFCAuto-Data

Add to ruleset = HDFCAuto


3) Go To Data Type ---> Click on Add field Button  

Add field according to requirement.


4) Now Go to Records Tab ---> Actions Button --->Edit Columns   

Make one field as Primary according to requirement.



5) In Sources Tab we can see 3 data pages automatically created by PRPC


a) Read-Only  Data Page ---> Page list structure --->Source = Report definition              

This data page does not have any parameter defined


b) Savable Data Page ----> Page Structure ---> Source = Lookup ; Data save options = Database save

Savable Data Page also have parameter, i.e primary key


c) Read-Only Data Page ---> Page Structur ---> Source = Lookup 

This data page also have parameter, i.e primary key



6) Put some test data for testing purpose


7) Now, go to case type and stage--->process--->Add Step




8) Now open Process


9) Open Connector Property dialog box, by clicking outward connector.

Now give flowaction name and click on glass icon to open/create a rule



10) In Flow Action in Layout tab,  

Page context = Use current page context

Applies to = Work Class

Section Name = ViewUpdateTVChannelDetails

click on glass icon to open/create section rule




11) Before Adding controls in section, Create a Page property in Work Class and give page definition class as Data Class





12) Now, go back to ViewUpdateTVChannelDetails Section and add controls

a) Dropdown   Property = PageName.PropertyName    Source = Data Page  D_TVSerialDetailsList


b) Embed section By name

Source => ChannelDetailsUpdate {Section}

Page context = Data Page

Context value  = D_TVSerialDetailsSavable

Parameter = pyWorkPage.TVChannelDetails.ChannelNumber










13) In ChannelDetailsUpdate {Section} add control and set property



14) Now come back to our Flow Action = ViewUpdateTVChannelDetails

Actions tab ----> Post-processing

Savable data pages

Give When rule = ChannelNumberExist 

according to requirement

Data Page = D_TVSerialDetailsSavable

Parameters = Primary.TVChannelDetails.ChannelNumber





15) Now go back to flow and save your flow.





16) Go to Case type --> Refresh ---> Save--->Save and Run

17) Select value from dropdown And update Channel name hit submit












18) Now Go to data type to check updated value



Comments

Popular posts from this blog

pxSubscript and pxListSubscript Properties In Pega

Frequently Used Date Expressions In Pega

pyForEachCount In Pega