Start a new topic

/back:: vs Context:/back::

Hi,


Mainly /back:: and Context:/back:: have two differences, which are where the operation is performed and the returned set of items.

 

/back::

Returns a list of all items in the DB which include the current obj as the specified part.

The use of this axis is executed by the server, and is potentially expensive, especially if you run on a slave server.


Note: The use of /back:: is NOT recommended due to the potentially negative effect on performance for all system users.  


Example:

<Report>
  <ForEach select="IRSS">
    <ForEach select="/back::IRSS">
      <Text>#{Name}</Text>
    </ForEach>
  </ForEach>
</Report>

Result:

image



Context:/back::

If you must /back::, it is recommended to use it in a Context since it would not have an impact on system performance.

Returns a list of all items in the current context which include the current obj as the specified part.

The use of this axis is executed by the client, which result in faster performance.  


Example:

<Report>
  <Context name="document">
    <AddParts owner="main" sid="IRRS" part="documentSection" defobj="section"/>
    <AddParts owner="section" sid="ISSE" part="subSection" defobj="subSections"/>
  </Context>
  <ForEachInContext name="document" group="section">
    <ForEach select="Context:/back::documentSection">
      <Text>Item name: #{Name} Version:#{Version}</Text>
    </ForEach>
  </ForEachInContext>
</Report>
Result:

image

Best Regards,
Bashar





1 person has this question
Login to post a comment