Document directory
- The corresponding website bar in the cascade drop-down list
- All links
This article serves as a basic SharePoint operation for administrators to prepare for the subsequent DVWP extension. For experienced readers, skip this step.
Transfer to subject, regardless of country or province, specification and color, position and location, and so on, you can achieve cascade-or range restriction-that is, the option in one drop-down box is based on the option in another drop-down box to improve availability.
However, before implementing cascading in the drop-down box, we need to establish a relationship between data. In most cases (such as specifications/colors; positions/locations), we also need to make it easy for the content owner to modify these relationships. The option column that comes with SharePoint is not the best choice for this, because the option data in the option column is "hidden" in the definition of this column.
It is more intuitive to use the item bar. At the same time, this method is also necessary for implementing the cascade in the drop-down box.
Note: many of the ideas in this article come from Marc Anderson's discussions in the jQuery Library for SharePoint Web Services (that is, SPServices) forum.
The corresponding website bar in the cascade drop-down list
How can the options in the drop-down box be maintained in a single group and can be used by others in multiple places? For example, HR may need to clearly define the name of the position, and the manager may actually use the name of the position to filter the employees. Therefore, how can we design to "reuse" data within the company?
Answer: Use the website bar, which we discussed in the previous blog.
Suppose you have prepared the Countries and States data according to the method in the previous article. Now you have two data lists. Next, before you set the linkA list is required to store relational data..
All links
The hierarchical dependency between two drop-down lists. Therefore, first we need to create a list for each set of data (such as Countries and States), And then we need a list to describe the relationship between the two.
Next let's set the link list.
1. Click "website operations"> "CREATE"
2. Under "custom list", click "custom list in data table View"
3. In this example, Countries and States are associated, so name the list RELCountryStates.
We do not want to display this list in the "Quick Start" Column (based on your actual needs ).
Note:HereName the link list with letters without spacesIn this way, we can get a name that does not need to be encoded and converted, which will help us to reference it in the jQuery script in the future. Note This for Chinese names. We will update its "display name" in the next step ".
4. Now you can see a list of data table views. We modify it and then fill in the data. Click "Settings"-> "list Settings"
- Modify name
- Under general settings, click "title, description, and navigation"
- Modify the name and enter some descriptions (such as Country-State Relationships) as needed)
- Click "save ".
- Remove attachment
- Under general settings, click "Advanced Settings"
- Under "attachment", click "Disable"
- Click "OK" (twice)
- Add website bar
- Click "add from existing website"
- Click all required website columns and click "add>. If you put the required website column in a separate group in advance, it will be very convenient to find.
- Select "add to default view" and click "OK"
5. Click the list name in the breadcrumb navigation bar and return to the data table view.
The Countries and States website columns appear in the data table.
6. You should have prepared the data in the corresponding list before filling in the relational data. If you have not prepared yet, prepare now (the last time, I shared the method to quickly fill data in the information source list required for the website column)
7. Fill in the link data for the configured link list. Add a record for the States State in each website column to its corresponding Country.
The drop-down box is displayed for selection from all available values.
8. It is too difficult to fill in one item. Therefore, we will fill the field in a way similar to the previous filling of the website column list, and paste the entire list to the data table at one time. However, there will be a small problem on the title bar. The default title is required. We have the following options:
- We can change the title to an option (you can also hide it in the current view if necessary)
- We can change it to an option and create a workflow to connect the values in the corresponding website column to generate a unique title. (Not recommended)
- We can use Excel to create the entire Country-State Relationship table and paste it here.
Next time: We will use the first method to quickly fill the data, and then use Excel.
References
SharePoint: Extending the DVWP-Part 17: User-Managed Dropdowns-Creating a Relationship list