Topic
  • 4 replies
  • Latest Post - ‏2012-11-16T21:02:40Z by sam.plyler
sam.plyler
sam.plyler
12 Posts

Pinned topic Passing arguments and indexes to functional maps

‏2012-11-15T22:31:09Z |
This question will be composed of two different but related questions. Both deal with using functional maps and looping.

The first question I have is about passing an element from my output card to a functional map so that the value can be used on each iteration of a loop. I have tried passing this value as an argument in my functional map call (from the same output card), but when I create my second input card for my functional map, I do not know how to retrieve said value (ala which type to use). How would I set my type on the second input card for the second argument? I tried setting it to the same element that I am passing but it gives me this error:

M111 ERROR:
Map: CPA_Out Output: C Record Standard005:CPAOut
Argument #2 for map F_Transaction does not match
type of input card #2.

The second question pertains to a counter value. I have a value inside the functional map that needs to be a counter. So each time the functional map is called I have a new record in my output. With each record I need the count to increment something like this:

C000000001
C000000002
C000000003
...

*The C is just a record header

I have tried getting the index of my type for that output card, but I think I need to get it from the calling element and pass that value similar to above. Does this sound like a better approach?
Updated on 2012-11-16T21:02:40Z at 2012-11-16T21:02:40Z by sam.plyler
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: Passing arguments and indexes to functional maps

    ‏2012-11-16T18:19:09Z  
    Did you use the functional map wizard to create the FMap? It usually builds the cards correctly.

    Add INDEX($) as the last object of your FMap call. Here the wizard will not create the input card and you will have to select a numeric field from one of your type trees.
  • sam.plyler
    sam.plyler
    12 Posts

    Re: Passing arguments and indexes to functional maps

    ‏2012-11-16T20:09:09Z  
    Did you use the functional map wizard to create the FMap? It usually builds the cards correctly.

    Add INDEX($) as the last object of your FMap call. Here the wizard will not create the input card and you will have to select a numeric field from one of your type trees.
    Whenever I try to use the functional map wizard I get a dialog box that says "No unknown maps."

    I have never used the functional map wizard, any good resources I can use to figure out how?
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: Passing arguments and indexes to functional maps

    ‏2012-11-16T20:17:26Z  
    Whenever I try to use the functional map wizard I get a dialog box that says "No unknown maps."

    I have never used the functional map wizard, any good resources I can use to figure out how?
    The wizard only works the first time your create an FMap. Delete the original FMap in the outline or composition window OR change the name of the FMap in your map rule. You will then be able to use the wizard.
  • sam.plyler
    sam.plyler
    12 Posts

    Re: Passing arguments and indexes to functional maps

    ‏2012-11-16T21:02:40Z  
    The wizard only works the first time your create an FMap. Delete the original FMap in the outline or composition window OR change the name of the FMap in your map rule. You will then be able to use the wizard.
    You saved me, thank you so much!