HeavyMetal, 2009/8/28

To facilitate the description, I create two list and two simple content type:

List:Mylist01

Contenttype: mycontenttype01

Field: Title

Field: OB_ID

image001

List: Mylist02

Contenttype: mycontenttype02

Field: Title

Field: OB_ID

Field: mystatus

image003

Now, we need to join the 2 lists using the id field “OB_ID”, so we can the object’s status

Step 1: create a webpart page and add a data view webpart in SPD

1) Create a webpart page

image005

2) edit in SPD, in the data source library create a data source

fill the name:

image007

Add the two list to the data source wizard:

image009

Click next step, select the second option

image011

Click finish:

image013

Click ok and quii.

3) Add the dataview webpart

Select “myjoinlist” and right click, in the pop menu, select display data:

image015

In mylist01, drop the title and OB_ID to the webpart area:

image017

Save the page, and refresh the page in the IE, you can see the data in mylist01 displayed.

image019

Step 2: Join the 2 lists

Continue the editing in SPD, click the button in the top-right corner of the webpart, and select edit column, then add a formula column:

image021

Select the mystatus column in mylist02, double click and then move the cursor to the end of the “Row”, input a “[”, and select “@OB_ID”, select “all” in the function type, and double click current, add a “/”, and select “@OB_ID”, then input a “]”, click OK, and then click OK in the Edit colomn dialog.

image023

image025

Save the page, and refresh the page in IE.

We can get the joined list as follows

 

 

 

 

 

 

 

 

 

 

 

 

 

image027

posted on 2009-08-31 14:11  重金属  阅读(369)  评论(0编辑  收藏  举报