Topic
  • 1 reply
  • Latest Post - ‏2019-03-29T11:42:41Z by PaulBrett
Santanu
Santanu
37 Posts

Pinned topic Function Invoking

‏2019-03-28T11:18:33Z |

Hi,

 

I have two field in input and output.can i call the function dynamically from Field2 using value of field1 and passing argument to it so that runtime it execute it as IF function with the argument pass to it.I tried as below but there is some syntax error in the mapping rule of Field2:Output

Field1:Output="IF"

Field2:Output=Field1:Output+"("+Field1:Input="US","USA"+")"

is it possible to execute Field2:Output mapping rule as IF function but function name will be passed from another field?

 

Thanks

Santanu

  • PaulBrett
    PaulBrett
    356 Posts
    ACCEPTED ANSWER

    Re: Function Invoking

    ‏2019-03-29T11:42:41Z  

    I find your question a bit confusing.  No you cannot use objects to define which function to call.

    You can use objects to define which sub map to call in a RUN() function:

    Field1:Output="IFMAP.mmc"

    Field2:Output=RUN("Field1:Output",Field1:Input)

    ...and then have an array of functional maps, each doing the function you intended.

    This would be a very poor (and CPU expensive) design.

    Thank you.

    Paul

    Follow me on Twitter

  • PaulBrett
    PaulBrett
    356 Posts

    Re: Function Invoking

    ‏2019-03-29T11:42:41Z  

    I find your question a bit confusing.  No you cannot use objects to define which function to call.

    You can use objects to define which sub map to call in a RUN() function:

    Field1:Output="IFMAP.mmc"

    Field2:Output=RUN("Field1:Output",Field1:Input)

    ...and then have an array of functional maps, each doing the function you intended.

    This would be a very poor (and CPU expensive) design.

    Thank you.

    Paul

    Follow me on Twitter