Here, I am using the classic HR tables.
Objective: The objective is to create a dependency between Region and Country LOVs and a dependency between Country and Location LOVs.
This means, wen a Region is selected from the LOV, the Country list will be filtered for the selected Region.
Similarly, when a Country is selected, the list of Locations will be filtered for the selected Country.
The output will have a screen as below.
Step1: Add two attributes to the DepartmentsView as below.
Step2: Assign LOVs of all three attributes as below.
Step3: Let’s create view criteria for the view objects(CountriesView and LocationsView).
CountriesView to be filtered based on Region
LocationsView to be filtered based on Country
Step4: Let’s update the accessors for LOVs in DepartmentsView with the view criteria created in Step3.
Step5: Update the properties of the attributes of DepartmentsView as below.
To set the dependency between Region and Country
Region(Auto Submit: True) Country(Dependency: RegionId)
Region(Auto Submit: True) Country(Dependency: RegionId)
To set the dependency between Country and Location
Country(Auto Submit: True) Location(Dependency: Country)
Country(Auto Submit: True) Location(Dependency: Country)
Now, we can run the ApplicationModule to verify the dependency among Region, Country and Location.
Step6: Let’s drag DepartmentsView to the Page to create a Form
Step7: To have the LOV dependency on the page, we need to do the below changes for the page items:
RegionId(Id: RegionId, AutoSubmit: true)
CountryId(Id: RegionId, AutoSubmit: true, Partial Trigger: RegionId)
LocationId(Id: LocationId, Partial Trigger: CountryId)
Time to run the page!!
ليست هناك تعليقات:
إرسال تعليق