Topic
2 replies Latest Post - ‏2012-12-11T18:20:47Z by SystemAdmin
SystemAdmin
SystemAdmin
6184 Posts
ACCEPTED ANSWER

Pinned topic Output index

‏2012-12-11T17:46:28Z |
Hi
We need to write a sequential number in some output records. We've tried to use the index function but every time that we switch from one functional map to another it restart from 1.
We need a global variable that allow us to number all the records across functional maps
Thanks for your help
Emilia
Updated on 2012-12-11T18:20:47Z at 2012-12-11T18:20:47Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6184 Posts
    ACCEPTED ANSWER

    Re: Output index

    ‏2012-12-11T18:12:07Z  in response to SystemAdmin
    You may be able to pass the index value between functional maps and then just add it to the current INDEX() value. For example, your FMap might look like:

    FMap(Object1, Object2, Index, INDEX())

    Your map rule might be:

    SequentialNumber=PreviousIndex + CurrentIndex

    Look up the LAST function to see if it might be of use.

    "Using LAST in a map rule to reference an output

    In a map rule, when referencing an output, LAST refers to the last built occurrence of that object. For example, using the same expression:

    PO# Field:Order = PO# Field:OrderLAST
    LAST refers to the previous occurrence of Order because, when this rule is evaluated, the last known Order is the last one built.

    LAST is a reserved word and is not case sensitive."
    • SystemAdmin
      SystemAdmin
      6184 Posts
      ACCEPTED ANSWER

      Re: Output index

      ‏2012-12-11T18:20:47Z  in response to SystemAdmin
      Thank you very much, let me try and I will return the result to you
      Thanks
      Emilia