<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<contentHaul xmlns:a="http://www.appian.com/ae/types/2009">
    <rule>
        <name>${expRule_attachmentsGridRow_name}</name>
        <uuid>${expRule_attachmentsGridRow_uuid}</uuid>
        <description>${expRule_attachmentsGridRow_desc}</description>
        <parentUuid>${_a-0000dc10-002c-8000-9b0c-01ef9001ef90_2789}</parentUuid>
        <visibility>
            <advertise>false</advertise>
            <hierarchy>true</hierarchy>
            <indexable>true</indexable>
            <quota>false</quota>
            <searchable>true</searchable>
            <system>false</system>
            <unlogged>false</unlogged>
        </visibility>
        <definition>#&quot;SYSTEM_SYSRULES_gridRowLayout&quot;(
  id: ri!index,
  contents: {
    if(
      ri!index &gt; ri!oldAttachments,
      #&quot;SYSTEM_SYSRULES_fileUploadField&quot;(
        label: &quot;file upload &quot; &amp; ri!index,
        target: ri!target,
        value: ri!attachment,
        saveInto: ri!attachment
      ),
      #&quot;SYSTEM_SYSRULES_linkField&quot;(
        label: &quot;document download link &quot; &amp; ri!index,
        links: #&quot;SYSTEM_SYSRULES_documentDownloadLink&quot;(
          document: ri!attachment,
          label: #&quot;${expRule_documentName_uuid}&quot;(ri!attachment)
        )
      )
    ),
    if(
      ri!index &gt; ri!oldAttachments,
      #&quot;SYSTEM_SYSRULES_textField&quot;(
        label: &quot;uploaded &quot; &amp; ri!index,
        readOnly: true,
        value: &quot;&quot;
      ),
      #&quot;SYSTEM_SYSRULES_textField&quot;(
        label: &quot;uploaded &quot; &amp; ri!index,
        readOnly: true,
        align: &quot;RIGHT&quot;,
        value: #&quot;${expRule_dateFormat_uuid}&quot;(document(ri!attachment, &quot;dateCreated&quot;))
      )
    ),
    if(
      ri!readOnly,
      {},
      #&quot;SYSTEM_SYSRULES_imageField_v1&quot;(
        label: &quot;delete &quot; &amp; ri!index,
        images: #&quot;SYSTEM_SYSRULES_documentImage&quot;(
          document: #&quot;SYSTEM_SYSRULES_iconIndicator&quot;(&quot;REMOVE&quot;),
          altText: &quot;${remove}&quot;,
          caption: &quot;${remove}&quot;,
          link: #&quot;SYSTEM_SYSRULES_dynamicLink&quot;(
            value: ri!index,
            saveInto: {
              if(
                isnull(ri!attachment),
                {},
                a!save(ri!deletedAttachments, append(ri!deletedAttachments, ri!attachment))
              ),
              a!save(ri!attachments, remove(ri!attachments, save!value)),
              if(
                ri!index &gt; ri!oldAttachments,
                {},
                a!save(ri!oldAttachments, ri!oldAttachments - 1)
              )
            }
          )
        ),
        size: &quot;ICON&quot;
      )
    )
  }
)</definition>
        <namedTypedValue>
            <name>attachment</name>
            <type>
                <name>CollaborationDocument</name>
                <namespace>http://www.appian.com/ae/types/2009</namespace>
            </type>
        </namedTypedValue>
        <namedTypedValue>
            <name>index</name>
            <type>
                <name>int</name>
                <namespace>http://www.w3.org/2001/XMLSchema</namespace>
            </type>
        </namedTypedValue>
        <namedTypedValue>
            <name>attachments</name>
            <type>
                <name>Variant</name>
                <namespace>http://www.appian.com/ae/types/2009</namespace>
            </type>
        </namedTypedValue>
        <namedTypedValue>
            <name>target</name>
            <type>
                <name>CollaborationFolder</name>
                <namespace>http://www.appian.com/ae/types/2009</namespace>
            </type>
        </namedTypedValue>
        <namedTypedValue>
            <name>readOnly</name>
            <type>
                <name>boolean</name>
                <namespace>http://www.w3.org/2001/XMLSchema</namespace>
            </type>
        </namedTypedValue>
        <namedTypedValue>
            <name>oldAttachments</name>
            <type>
                <name>int</name>
                <namespace>http://www.w3.org/2001/XMLSchema</namespace>
            </type>
        </namedTypedValue>
        <namedTypedValue>
            <name>deletedAttachments</name>
            <type>
                <name>CollaborationDocument?list</name>
                <namespace>http://www.appian.com/ae/types/2009</namespace>
            </type>
        </namedTypedValue>
        <preferredEditor>legacy</preferredEditor>
        <offlineEnabled>false</offlineEnabled>
    </rule>
    <roleMap public="true">
        <role allowForAll="false" inherit="true" name="readers">
            <users/>
            <groups/>
        </role>
        <role allowForAll="false" inherit="true" name="authors">
            <users/>
            <groups/>
        </role>
        <role allowForAll="false" inherit="true" name="administrators">
            <users/>
            <groups/>
        </role>
        <role allowForAll="false" inherit="false" name="denyReaders">
            <users/>
            <groups/>
        </role>
        <role allowForAll="false" inherit="false" name="denyAuthors">
            <users/>
            <groups/>
        </role>
        <role allowForAll="false" inherit="false" name="denyAdministrators">
            <users/>
            <groups/>
        </role>
    </roleMap>
</contentHaul>
