I am having an issue with Conencted Web Parts in 2010. This is all in SharePoint Designer, I can solve this in studio no worries; Im trying to do this No Code Solution instead.

I have 3 lists. Quotes, ParentPart, Sub Part.

The Quotes list has a title and a Lookup onto ParentPart. ParentPart has a title and SubPart has a title and a Lookup onto ParentPart.

I want to Customise the Quotes Display form to add another webpart in that page which will show all the SubParts related to that ParentPart field on that quote list item.

I add an DataViewPart and then add a connection which passes the row data from the main part to the newly added dataview part. (You can try filter or parameters, easy to see what is being passed with filter though).

When connected the Filter/Parameter passed thru is 1#;ParentItem1 the format of a lookup field.

Ofcourse in a dataview part the Filter MUST not contain the 1#; part of it. In the case of a parameter (what I really want) the CAML query which contains the {Param1} in the where clause also does not work as it needs just the text also, or the ID but with both it doesn't work.

I tried adding an "additional field" to the Quotes, which is the ParentPart:Title, then connected that field, but alas it also passes the lookup field and not just the title.

So without resorting to writing a webpart in Studio how do I solve this problem.

How do I get the source connected part to pass either just the ID or just the text of the lookup; or how do I, in the CAML, parse the Parameter to be either ID or Text; or is ther some special CAML command that can take a full Lookup as a parameter. I do not want to filter in XSLT, it's too late, I want paging to work and everything, there may be many sub parts in that list so it has to be optimised.

This just seems broken to me.


| improve this question | | | | |
  • don't know for sure but can't you do this with some JQuery coding in the page? – user10215 Aug 21 '12 at 12:00
  • I would not have thought so, as the connection happens server side, Perhaps it might be possible to set the filter client side, but my real goal was to mod the CAML to restrict the number of returned items, as there could be loads. – BinaryJam Aug 21 '12 at 12:08
  • even though it's probably not very complicated, I have a hard time visualising this. Especially when you get into more detail. Can you show some kind of model or a few screenshots so I can better understand you request? – Christoffel de Gruyter Aug 19 '14 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.