Retrieving the position of a BOD element

Use the GETPOSITION() function to retrieve the position of a BOD element, especially for elements that occur multiple times in a certain level. The position value can be used as an identifier on which node is being processed.

  1. Open the Replication Documents Elements form and execute Filter-In-Place.
  2. Initiate a new record.
  3. In the BOD Tag Name field, specify the element name and the GETPOSITION() function.

    For example:

    ShowFinancialCalendar/DataArea/FinancialCalendar/CalendarYear/Year/GETPOSITION()

  4. Click Save.
The GETPOSITION() function retrieves the position value of the XPath that precedes it.

During inbound BOD processing, the position numbers are added to the XPath log, as in this example:

XPATH: ShowFinancialCalendar/DataArea/FinancialCalendar/CalendarYear[1]/Name/text() 
XPATH: ShowFinancialCalendar/DataArea/FinancialCalendar/CalendarYear[1]/Year/text()
XPATH: ShowFinancialCalendar/DataArea/FinancialCalendar/CalendarYear[1]/Year/GETPOSITION()/text()
XPATH: ShowFinancialCalendar/DataArea/FinancialCalendar/CalendarYear[2]/Name/text()
XPATH: ShowFinancialCalendar/DataArea/FinancialCalendar/CalendarYear[2]/Year/text()
XPATH: ShowFinancialCalendar/DataArea/FinancialCalendar/CalendarYear[2]/Year/GETPOSITION()/text()