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

Aleksandar_A
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.