- A business table contains the following fields: province name (Csqmc), Province code (Csqdm), city name (Csxmc), and city code (Csxdm ).
- By selecting the province/region name, city/county names are linked.
1. No Csqmc or Csxmc fields exist in the dealer table. Write an SQL statement into the Query to Query the fields in the dealer table.
- SelectSsqx. sqmc, ssqx. sxmcWhereDealer table. sqdm = ssqx. sqdm
Ssqx is a provincial/municipal joint view.
- Create Or Replace ViewV_sys_sysc07sysc08As
- SelectA. csqdm, B. csxdm, a. csqmc, B. csxmc, B. njd, B. nwd
- FromSysc07 a, sysc08 B
- WhereA. csqdm = B. csqdm
Then, in the dealer VO, get the Csqmc and Csxmc
- 2. Then, associate the province name with the city name.
- Perform LOV configuration in the province name
- List data source: Select VO for the province table, and list Attribute select Csqmc for the province table. then, associate the list Attribute with the View Attribute. (because the province name is required to change, the province Code also changes.ReturnIn the value07Table Csqdm is also associated. In UI Hints, select the control type and set the content displayed in the control .)
List data source: Select VO for the province table, and list Attribute select Csqmc for the province table. then, the list Attribute and the View Attribute are associated. (because the province name is required to change, the province Code also changes. Therefore, the Csqdm of table 07 is also associated in List return value, select the control type in UI Hints and set the content displayed in the control .)
.
3. the city and county names are similar to the preceding operations. However, because the province and city names must be linked, the principle is that after the province and city names are selected, the province code should be passed to a parameter, use the where statement to compare the Csqdm and this parameter in the city, county, and county tables (you can create a view ).
View code:
- SELECT
- SYSC08.CSXDM CSXDM,
- SYSC08.CSXMC CSXMC
- FROM
- SYSC08
- WhereSYSC08.CSQDM =: p_csqdm
P_csqdm is the parameter set by the user. If you want to upload the name of the province to which the dealer table is selected-> code, you can configure LOV In the dealer table to implement provincial/municipal linkage.
4. in the coordinated operation on the presentation layer, the province/region name control must be set to autosubmit () to true, and the city name control must be set to partrialtrriger to true, that is, if the province/region name value changes, it is submitted locally, the city name trigger listens to the province/region name controls to achieve linkage.