Related items - fliter by lookup

Discussions about Forms Designer for SharePoint 2010.
Locked
User avatar
Sebastian Haugland
Posts: 43
Joined: Fri Sep 19, 2014
Contact:

20 May 2015

In related items I dont get any value in the field "filter by lookup" , I have tried different lists and views. Any suggestions?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

20 May 2015

What version of Forms Designer do you use? You can find the version at the lower right corner of the Forms Designer dialog.


User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

20 May 2015

Please, install the latest version (2.9.1). You can download it from our website:

http://spform.com/download

The following article may help you to configure the related items:
http://spform.com/office-365/filt ... point-form

User avatar
Sebastian Haugland
Posts: 43
Joined: Fri Sep 19, 2014
Contact:

26 May 2015

Thanks! Now its working :)

User avatar
Sebastian Haugland
Posts: 43
Joined: Fri Sep 19, 2014
Contact:

28 May 2015

Hi The code above worked fine, in my task list I also have another lookup field called "Product" from a list called Product. The list has has a ID field and a Title field - the Title field (product name) is shon in the task form.

Any suggestion on how to change the html below to work for product? In related items I set filter Product in form and Title from the productlist.

HTML for "Assigned To"

<xsl:variable name="UserName" select="substring-after(substring-before(substring-after(@AssignedTo,'userdisp.aspx?ID='),'&lt;'),'&gt;')"/>
<xsl:comment>
<xsl:value-of select="ddwrt:GenFireConnection(concat('*', '@AssignedTo=', ddwrt:ConnEncode(string($UserName))), '')" />
</xsl:comment>

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

29 May 2015

Do you want to display all tasks relating to the current product on the product form?

User avatar
Sebastian Haugland
Posts: 43
Joined: Fri Sep 19, 2014
Contact:

31 May 2015

Yes in the task form I would like to se all the tasks on the related product.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

01 Jun 2015

Hi,

First, you need to configure filtering by the lookup field in the Data source dialog of the Related items control. Next, drop HTML-control onto your form and turn its CDATA property into False. Then insert the following code into its Content property:

Code: Select all

<xsl:variable name="LookupField" select="substring-before(substring-after(@Lookup1,'&gt;'),'&lt;')"/>
<xsl:comment>
<xsl:value-of select="ddwrt:GenFireConnection(concat('*', '@Lookup1=', ddwrt:ConnEncode(string($LookupField))), '')" />
</xsl:comment>
Please, replace ''Lookup1' with the internal name of your lookup field (Product).

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests