I'm having trouble creating a joined edit or view form from 2 lists in Sharepoint 2010.
Details
I have two lists in Sharepoint 2010 that have a 1:1 relationship. When a user creates an entry in the first list (call it "Requests"), this triggers a workflow that creates a corresponding entry in a "Reviews" list. The Reviews list as a "ReqID" column, so each Review has a pointer to the Request item it relates to.
The two lists have different permissions and access points, so only reviewers can see the Reviews list.
What I want to achieve is this- When a reviewer accesses an item in the reviews list, either to view, or to edit, they then see the fields in the Reviews list PLUS the fields from the corresponding Requests item, directly underneath, in a single page. Like this-
REVIEW INFO
Reviews column 1: <Request ID>
Reviews column 2: <some data>
Reviews column 3: <some data>
...
REQUEST INFO
Requests ID: <= request ID above>
Requests column 1: <some data>
Requests column 2: <some data>
...
What I've done so far is-
- Cloned the "Editform.aspx" page for the Reviews list to create a new "Editform_mod.aspx" page.
- Inserted a list view (XsltListView web part) on the Requests list in this page, underneath the normal editing web part for the Reviews entry.
- Set up a connection from the Reviews ListForm web part, to provide a filter row to the Requests XsltListView web part, with the connection set to "Get Filter Values From", and the columns chosen so "ReqID" from the Review list sets the filter value for "ID" in the Requests list.
I will eventually make my modded form the default editform for the Review list, once I can make it work...
Problem
This almost works! However the second view shows no data. When I look at the filter settings in the browser, if (say) I am looking at a Reviews item with ReqID=3, rather than the filter being set simply to the number 3, it's set to "3;#3", which of course doesn't match anything.
Not sure if i'm doing something obviously wrong here. Any pointers would be much appreciated.