lookup field in Form field

Discussions about Forms Designer for SharePoint 2010.
Locked
RMIC
Posts: 96
Joined: Sun May 10, 2015

11 May 2015

When use a lookup field in "Form field" in Data Source Editor, no data is displayed. Is there already a solution?

Thanks :)

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

11 May 2015

Thank you for the good question. Actually, you can configure filtering by a lookup field of the form but you need to do extra work here. First, configure filtering 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="LookupValue" select="substring-before(substring-after(@LookupColumn,'&gt;'),'&lt;')"/>
<xsl:comment>
    <xsl:value-of select="ddwrt:GenFireConnection(concat('*', '@LookupColumn=', ddwrt:ConnEncode(string($LookupValue))), '')" />
</xsl:comment>
Please, replace the highlighted text (LookupColumn) with the internal name of the lookup field from the form.

RMIC
Posts: 96
Joined: Sun May 10, 2015

29 May 2015

This worked, thanks a lot!

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests