Related items - fliter by lookup
Posted by Sebastian Haugland - May 20 ’15 at 12:23
In related items I dont get any value in the field "filter by lookup" , I have tried different lists and views. Any suggestions?
-
Dmitry KozlovAdminMember for: 6 years 2 months 26 days
What version of Forms Designer do you use? You can find the version at the lower right corner of the Forms Designer dialog.
-
Sebastian HauglandMemberMember for: 4 years 8 months 22 days
[#1]: ver 2.8.11
-
Dmitry KozlovAdminMember for: 6 years 2 months 26 days
[#2]: Please, install the latest version (2.9.1). You can download it from our website:
The following article may help you to configure the related items:
http://formsdesigner.blogspot.com/2015/01/filter-related-items-by-almost-any.html
-
Sebastian HauglandMemberMember for: 4 years 8 months 22 days
Thanks! Now its working
-
Sebastian HauglandMemberMember for: 4 years 8 months 22 days
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='),'<'),'>')"/>
<xsl:comment>
<xsl:value-of select="ddwrt:GenFireConnection(concat('*', '@AssignedTo=', ddwrt:ConnEncode(string($UserName))), '')" />
</xsl:comment> -
Dmitry KozlovAdminMember for: 6 years 2 months 26 days
[#5]: Do you want to display all tasks relating to the current product on the product form?
-
Sebastian HauglandMemberMember for: 4 years 8 months 22 days
[#6]: Yes in the task form I would like to se all the tasks on the related product.
-
Dmitry KozlovAdminMember for: 6 years 2 months 26 days
[#7]: 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:
<xsl:variable name="LookupField" select="substring-before(substring-after(@Lookup1,'>'),'<')"/> <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).