1

I have a RTF template with a column EVENT. I want to display the events in the EVENT column as 'event-1", 'event-2', etc... at run time. I tried using the following codes in the text/form field but none are working and instead giving me the same number, example-event -1, event -1, .... and so on. Please help!

CODE 1:

?for-each-group:current-group();./EVENTPT?

    xsl:value-of select="position()"/

CODE 2:

?xdoxslt:set_variable($_XDOCTX, 'V_SNO', 1)?

?xdoxslt:get_variable($_XDOCTX, 'V_SNO')?

?xdoxslt:set_variable($_XDOCTX, 'V_SNO', xdoxslt:get_variable($_XDOCTX, 'V_SNO') +1)?

CODE 3:

?xdofx:if "position()" = "last()" then "last()"
  else
  ("position() + 1")
end if?

If there is any other way I can get the sequence number please post your answers.

Thanks in advance.

The Vee
  • 11,420
  • 5
  • 27
  • 60
namrata
  • 11
  • 1
  • 3
  • I have used position() before, and it has worked. What is the problem you are having with it? Maybe you can give some example XML and better examples of the rft code? – EdHayes3 Feb 09 '18 at 17:52

1 Answers1

0

You can use this to get the sequence in increasing order and it display the events in the EVENT column as 'event-1", 'event-2', etc... at run time.

ouflak
  • 2,458
  • 10
  • 44
  • 49
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 24 '22 at 13:37