cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Target path based on Mapper expression condition

UrsVinny
New Contributor II

How to change the Target path based on the Mapper Expression.

On the source file the Column name can be either Overall Manpower(FTE) or Overall Resources(FTE).
In the mapper table expression builder I am using the below Expression.

$input0.findIndex(x=>x.O == โ€œOverall Manpower (FTE)โ€) || $input0.findIndex(x=>x.O == โ€œOverall Resources (FTE)โ€)

On the Target Path can i use two different targets e.g., $ConstructionOverallManpowerFTERow || $ConstructionOverallResourcesFTERow

I even tried conditional snap but got an error.

Please suggest the possible solution.

Cheers
Vinny

2 REPLIES 2

AleksandarAngel
Contributor III

Hi @UrsVinny,

You can try using Mapper with Null-Safe access on,
image

And after this Mapper use another one that will filter null value from the root object.
image

Example Input:
image

Example Output:
image

Let me know if this helps you.

BR,
Aleksandar.

Thanks Aleksandar!
Will try and let you know.

Thanks once again.