Page 1 of 1

Related items - fliter by lookup

Posted: 20 May 2015
by Sebastian Haugland
In related items I dont get any value in the field "filter by lookup" , I have tried different lists and views. Any suggestions?

Re: Related items - fliter by lookup

Posted: 20 May 2015
by Dmitry Kozlov
What version of Forms Designer do you use? You can find the version at the lower right corner of the Forms Designer dialog.

Re: Related items - fliter by lookup

Posted: 20 May 2015
by Sebastian Haugland
ver 2.8.11

Re: Related items - fliter by lookup

Posted: 20 May 2015
by Dmitry Kozlov
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

Re: Related items - fliter by lookup

Posted: 26 May 2015
by Sebastian Haugland
Thanks! Now its working :)

Re: Related items - fliter by lookup

Posted: 28 May 2015
by Sebastian Haugland
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>

Re: Related items - fliter by lookup

Posted: 29 May 2015
by Dmitry Kozlov
Do you want to display all tasks relating to the current product on the product form?

Re: Related items - fliter by lookup

Posted: 31 May 2015
by Sebastian Haugland
Yes in the task form I would like to se all the tasks on the related product.

Re: Related items - fliter by lookup

Posted: 01 Jun 2015
by Dmitry Kozlov
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).