To configure the keyed access pattern using keyed data pages:
If you use the data page without a key, all of the objects are displayed, for example, in a dropdown. Using the data page with a property allows you to specify keys. Refer the Student guide of CSSA 7.2 course, page number-100 onwards.
Question-1-"I see the structure of page on clipboard same for parameterised data pages and keyed pages. Can you please explain me the difference. Clipboard Structure is not different so whats the difference"
I didnt find answer to this in your reply.
Question-2-Can we created keyed page without passing parameter?
For list-structure data pages, you can allow read-only access to embedded pages in the data page by using any properties as the key.
Select the Access pages with user defined keys check box to allow read-only access to individual objects in the list based on the value(s) provided for the key(s) specified in the Page List Keys field.
Select the Allow multiple pages per key check box if the keys are not unique across objects in the list. This provides read-only access to a list of objects that match the value(s) provided for the key(s) in this case.
This is what the documentation for the Keyed Page access specifies for the Data Page List.
Parameter Data Pages:
Each time that you reference a data page with different parameters, an instance of the data page is created on the clipboard. You can have multiple instances of a data page on the clipboard, each one created by a reference with different parameters from the others, or, if you have checked the Limit to a single data page check box on the Load Management tab, each new reference to the data page creates an instance of the data page that overwrites any existing instance.
Subsequent references to a data page using parameters that result in a reference to an existing instance of the data page on the clipboard refer to that existing data page unless the conditional refresh strategy indicates the page should be reloaded on each reference.
Note: Report definitions cannot reference data pages that themselves take parameters (such as D_page1[param1:D_page2[param2:Param.P1],param2:pxRequestor.pyUserIdentifier].pyLabel) to populate columns, although they can directly reference properties in a data page (such as D_page1.companyName).
Hope this explanation will help you to understand both the concepts in data pages.
Yes in both the ways the clipboard will have the same representation as you need to pass some values to either parameter or key.
The basic difference between both the ways is as follows:
If i want to load all the Bangalore employees into your Data Page then you will pass this property through Parameter to perform the filter for fetching all the Bangalore employees at the time of Data Page creation.
Now at run time if you want to load the specific employee based on his empid, then this property will be provided in Keyed access of Data Page List, so that at run time you can fetch the specific employee without iterating all the bangalore employees to get specific employee you are looking for.
You can go through this guide which explains well about the both concepts and its usage.
Suppose we have three dropdowns 1.Continent 2,Language 3.Country. We've a data page D_CountryList that populates country dropdown from Country table which has columns as CountryID, CountryName, Continent, Language.
If we dont select any values from drop downs 1.Continent and 2.Language, then all the countries will be populated in dropdown 3.Country. If we select any value say "Asia" from continent then Country dropdown will display all the countries in Asia. Further we if we select any Language say "Hindi" from Language dropdown then Country dropdown will show all the Asian countries where Hindi is spoken.
In order to implement it, we can use both Parameter and Key in the Datapage D_CountryList . We want to filter the country on basis on continent first so we'll first use param as Continent. This will create a data page D_CountryList[Continent:"Asia"].
When we select Language from the dropdown, the country dropdown should display items filtered on both continent and language.
Now, we don't want to create another data page with additional filter/param as Language. So, we'll use Language as Key in "Keyed page access" . On Selecting Language from the dropdown, pega will search for the language "Hindi" in the same data page and display the result without invoking the datapage again or creating another instance of the data page.
Moral is : Param can be used if want to filter a chunk of data from huge data source, then if we want to further drill down on it then use Key over it.