Related items - fliter by lookup

rss

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 Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 26 days
    #1 by Dmitry Kozlov May 20 ’15 at 05:16

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

  • Sebastian Haugland
    Sebastian Haugland
    Member
    Member for: 4 years 8 months 22 days
    #2 by Sebastian Haugland May 20 ’15 at 05:33

    [#1]:  ver 2.8.11

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 26 days
    #3 by Dmitry Kozlov May 20 ’15 at 05:41

    [#2]: 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://formsdesigner.blogspot.com/2015/01/filter-related-items-by-almost-any.html

  • Sebastian Haugland
    Sebastian Haugland
    Member
    Member for: 4 years 8 months 22 days
    #4 by Sebastian Haugland May 26 ’15 at 04:50

    Thanks! Now its working smile

  • Sebastian Haugland
    Sebastian Haugland
    Member
    Member for: 4 years 8 months 22 days
    #5 by Sebastian Haugland May 28 ’15 at 06:00

    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>

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 26 days
    #6 by Dmitry Kozlov May 29 ’15 at 04:56

    [#5]: Do you want to display all tasks relating to the current product on the product form?

  • Sebastian Haugland
    Sebastian Haugland
    Member
    Member for: 4 years 8 months 22 days
    #7 by Sebastian Haugland May 31 ’15 at 04:23

    [#6]: Yes in the task form I would like to se all the tasks on the related product.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 26 days
    #8 by Dmitry Kozlov Jun 1 ’15 at 04:32

    [#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,'&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).

Displaying 1 to 8 of 8 messages