Related Item - Lookup-Field

rss

Posted by wdeffner - Dec 29 ’16 at 05:30

Hi,

we are trying to configure a pretty basic related-items-list in a form. In other situations we had no trouble setting up relatd-items-lists, but here the situation seems to be different:

The Form is setup for List A, which contains a lookup-field that is populated by a calculated field in List B.

We want to use the related-items list to show additional information from List B.

In the data-source-editor we have chosen the correct list and view, "Filter by form field" and the two fields from List A and B.

When we call this form, the related-items list is empty, a message "In this view of "List B" no items can be displayed" (In dieser Ansicht der Liste "List B" sind keine Elemente anzeigbar) is shown.

Just for tests we have created another text field in List A and have filled this with values. When we chose this field for List A in the data-source-editor, everything works fine. Eperiments with using ID as mentioned in "How to filter related items by almost any field" have not been successful.

So the trouble must have something to do with the use of the lookup-field in List A.

Any idea?

Greetings, Wolfgang

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 18 days
    #1 by Dmitry Kozlov Dec 30 ’16 at 10:15

    The problem is that the lookup field is located in the parent list, not in a child as in our samples. So, here you should configure filtering by Lookup-Calculated column in the Data Source editor, then add an HTML-control onto your form, set CDATA property in False and insert the following code into its Content:

     

    <xsl:variable name="LookupValue" select="substring-before(substring-after(@Lookup,'&gt;'),'&lt;')"/>

    <xsl:comment>

    <xsl:value-of select="ddwrt:GenFireConnection(concat('*', '@Lookup=', ddwrt:ConnEncode(string($LookupValue))), '')" />

    </xsl:comment>

     

    Replace @Lookup with the internal name of your lookup field (@InternalName).

Displaying 1 to 1 of 1 messages