This article provides an example of how you can enable users to update existing parts in an item structure directly in a configured grid view. This specific example shows how to update Header and Footer parts in multiple Documents using a Work Area.


Example Meta Model

Example Data 

To update Header and Footer parts in the Documents, place the new Header and Footer Template Items in the structure as shown below. The four Documents have Headers and Footers that need to be replaced with new ones ("New_Footer" and "New_Header).

Example Configuration

  <Variable name="header" as="Item" select="/IDI[Handle='x04000000000B9A70']"/>
  <Variable name="footer" as="Item" select="/IDI[Handle='x04000000000B9A73']"/>
  <Variable name="docs" as="Item" select="/IDI[not .  in ($header union $footer)]"/>
    <ActionBinding actionId="updateHeaderFooter">
      <WithParam name="newHeader" select="$header"/>
      <WithParam name="newFooter" select="$footer"/>
      <WithParam name="documents" select="$docs"/>
    <Action id="updateHeaderFooter" caption="Update to the New Header #{? /IDI[Handle='x04000000000B9A70']} and Footer #{? /IDI[Handle='x04000000000B9A73']}">
      <Parameter name="newHeader" as="Item"/>
      <Parameter name="newFooter" as="Item"/>
      <Parameter name="documents" as="[Item]"/>
      <Item id="NH" match="$newHeader"/>
      <Item id="NF" match="$newFooter"/>
      <ForEach select="$documents">
        <Item id="DOC_#{Handle}" match=".">
          <Part id="H_#{Handle}" partType="IRHE" defObj="NH"/>
          <Part id="F_#{Handle}" partType="IRFO" defObj="NF"/>
          <If test="/part::IRHE">
            <ForEach select="/part::IRHE">
              <Part id="#{Handle}"  match="." defObj="NH"/>
          <If test="/part::IRFO">
            <ForEach select="/part::IRFO">
              <Part id="#{Handle}" match="." defObj="NF"/>
    <ItemNameColumn width="200"/>

Example Result

Before update

After update

The Execute pop-up will display (if the optional confirmationDialog attribute is set to "true". It should be removed once you roll out the configuration to users.  

The Header and Footer Template Items have been updated in all four Documents.