Difference between revisions of "Referencing Other Sections in XML Calculations"

From SmartWiki
Jump to: navigation, search
Line 10: Line 10:
 
# Find the Section ID of each section to be referenced (in this example, ''Staff'' and ''Equipment''), by floating your cursor over the section name:<br />[[Image:LocationOfXMLSectionID.png|link=|700px]]<br />The Section ID will be contained in the URL shown at the bottom of the page.<br />The Section ID of the ''Staff'' section in this example is ''1440''.
 
# Find the Section ID of each section to be referenced (in this example, ''Staff'' and ''Equipment''), by floating your cursor over the section name:<br />[[Image:LocationOfXMLSectionID.png|link=|700px]]<br />The Section ID will be contained in the URL shown at the bottom of the page.<br />The Section ID of the ''Staff'' section in this example is ''1440''.
 
# Click into the ''Staff'' section and then into the column heading of the first row whose total should be referenced.<br />Take note of the ''Node Name''.<br />Also note that the ''Has Total'' option has been selected.<br />[[Image:XMLExample-StaffNodeName.png|link=|600px]]
 
# Click into the ''Staff'' section and then into the column heading of the first row whose total should be referenced.<br />Take note of the ''Node Name''.<br />Also note that the ''Has Total'' option has been selected.<br />[[Image:XMLExample-StaffNodeName.png|link=|600px]]
 +
# Now click into the ''Overview'' section and click into the node that should contain the total for Year 1 from the ''Staff'' section.
 +
# Enter the reference to the Year 1 total for ''Staff'' using the following syntax: <br />
 +
[[Image:XMLSampleReferenceInOverviewToStaffTotal.png|link=|600px]]
  
  
 
[[Category:XML]]
 
[[Category:XML]]

Revision as of 16:47, 2 December 2013

The following is a step-by-step walkthrough of creating an XML worksheet that calculates the totals across sections.

XMLExample-Cross-SectionReferences.png

In the example above, the Overview section contains the totals of the values entered under the Staff and Equipment sections.

To create these total and subtotal references:

  1. Edit the XML custom field
  2. Click on the Section Builder button
    You will see the list of Sections at the left.
    XMLSections.png
  3. Find the Section ID of each section to be referenced (in this example, Staff and Equipment), by floating your cursor over the section name:
    LocationOfXMLSectionID.png
    The Section ID will be contained in the URL shown at the bottom of the page.
    The Section ID of the Staff section in this example is 1440.
  4. Click into the Staff section and then into the column heading of the first row whose total should be referenced.
    Take note of the Node Name.
    Also note that the Has Total option has been selected.
    XMLExample-StaffNodeName.png
  5. Now click into the Overview section and click into the node that should contain the total for Year 1 from the Staff section.
  6. Enter the reference to the Year 1 total for Staff using the following syntax:

XMLSampleReferenceInOverviewToStaffTotal.png