Topic
4 replies Latest Post - ‏2012-11-19T18:36:37Z by SystemAdmin
SystemAdmin
SystemAdmin
6184 Posts
ACCEPTED ANSWER

Pinned topic Issue with map rule executing EITHER(A, FMap(B))

‏2012-11-16T18:28:49Z |
The following map rules all output the value of A:
=A
=IF(PRESENT(A), A)
=EITHER(A, NONE)

Using the same input data, these map rules always output the value of FMap(B):
=IF(PRESENT(A),
A,
FMap(B))
=EITHER(A, FMap(B))

I'm drawing a blank on this. How do I output the value of A when present and the output of FMap(B) when it is not?

Thanks, Jim Divoky
Updated on 2012-11-19T18:36:37Z at 2012-11-19T18:36:37Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6184 Posts
    ACCEPTED ANSWER

    Re: Issue with map rule executing EITHER(A, FMap(B))

    ‏2012-11-16T18:30:52Z  in response to SystemAdmin
    I forgot to add that A is a field within the complex object, B.
    • SystemAdmin
      SystemAdmin
      6184 Posts
      ACCEPTED ANSWER

      Re: Issue with map rule executing EITHER(A, FMap(B))

      ‏2012-11-16T22:18:04Z  in response to SystemAdmin
      I've simplified my map rules and my results still make no sense.

      =Date - The map rule returns the date value 20120902, 20120903, etc., as the parent FMap loops.

      If I change the map rule to:
      =EITHER(Date, TEXTTODATE("20121116")) - The map rule returns 20121116 on every loop.
  • SystemAdmin
    SystemAdmin
    6184 Posts
    ACCEPTED ANSWER

    Re: Issue with map rule executing EITHER(A, FMap(B))

    ‏2012-11-19T16:20:06Z  in response to SystemAdmin
    Could this be a "data binding" issue? Do a search on this forum for discussions on this topic, it might help!
    • SystemAdmin
      SystemAdmin
      6184 Posts
      ACCEPTED ANSWER

      Re: Issue with map rule executing EITHER(A, FMap(B))

      ‏2012-11-19T18:36:37Z  in response to SystemAdmin
      >> Could this be a "data binding" issue?

      Thanks for the suggestion. That's what I thought initially so I passed a second copy of the input without good results. Then I simplified the map rule in the functional map and still had an issue.

      In the input, the value of Date is present 5 times and missing 5 times. The following occurs with each of these map rules:

      = Date Date is present 5 times in the output and missing 5 times.

      = EITHER(Date, NONE) Date is present 5 times in the output and missing 5 times.

      = EITHER(Date, TEXTTODATE("20121116")) All ten Date fields contain 20121116.

      Now I've eliminated the EITHER function and am using a LOOKUP function. It appears to be working as expected. I still have to add three more conditions to the map rule though. I hate ACORD data!