0
votes

I have a repeat control which displays a list of Attachments, which are saved as response documents to the current document. Right now I just see all the main docs and response docs in a list. How do I 1) Filter the view to only to include the response docs and not main docs? 2) Filter the view to only include responses to the current document? I tried using the Filter by column value on the datasource, but I can't figure it out. My Xpage datasources are "document1" document and "Requirements" view

<xp:dominoView var="Atts" viewName="Requirements">
    </xp:dominoView>



<xp:repeat id="AttsContainer" rows="100"
var="Attachments" repeatControls="true" value="#{Atts}">
<xp:panel id="AttsPanel">                           
    <xp:table style="width:100.0%;border-width:thin;border-color:rgb(0,0,0);border-style:solid">
        <xp:tr>
            <xp:td style="width:234.0px">
                <xp:text escape="true"
                    id="computedField1" value="#{Attachments.AttName}">
                </xp:text>
            </xp:td>
            <xp:td><xp:text escape="true" id="computedField2">
        <xp:this.value><![CDATA[#{javascript:var doc:NotesDocument = Attachments.getDocument();

    var sUNID = doc.getUniversalID();
    sUNID}]]></xp:this.value>
    </xp:text></xp:td>
            <xp:td>
                <xp:link escape="true"
                    id="link2">

                    <xp:this.text><![CDATA[#{javascript:Attachments.getColumnValue("Files")}]]></xp:this.text>
                <xp:this.value><![CDATA[#{javascript:var doc:NotesDocument = Attachments.getDocument();
    var sUNID = doc.getUniversalID();
    ATT = Attachments.getColumnValue("Files");
    "/bid.nsf/0/" + sUNID + "/$FILE/" + ATT}]]></xp:this.value></xp:link></xp:td>
        </xp:tr>
    </xp:table></xp:panel>

1

1 Answers

1
votes

From the top of my head:

  • Create a view showing only the documents created with the response's form.
  • Disable the "show response documents in a hierarchy" property
  • Add a categorized first column with this formula: @Text($ref)

That gives you a view where all responses are categorized by their parents unid. You use that view in the data source and set the categoryFilter the the unid of the main document.