Skip to Content
0

Mapping Question - create node if condition met

Oct 26, 2017 at 11:43 AM

46

avatar image

Im reading in a .csv file into a fcc. Im doing the mapping and i want to not create a new line if a condition is met.

1.png

I've go the below data to be mapped, but i only want to create a newhireline node if the department does not = C004

The issue is the C004 is embeded at the end of a string.

I've tried using Endswith and other if statements but i cant quite get it to ignore records with C004 and include all those that do not equal C004.

What would be the best way to approach this?

THanks

1.png (25.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Evgeniy Kolmakov Oct 26, 2017 at 12:31 PM
0

Hi George!

Regards, Evgeniy.


Share
10 |10000 characters needed characters left characters exceeded
Raghuraman S Oct 26, 2017 at 12:29 PM
1

Hello George,

If am not wrong your XML field value for Division should be like testcompany2(a004),testcompany2(C004),testcompany2(b002).

Try the below approach

Sample Input and Output:


capture.png (11.2 kB)
capture1.png (14.3 kB)
capture1.png (14.7 kB)
Share
10 |10000 characters needed characters left characters exceeded
George Applegate Oct 26, 2017 at 01:35 PM
0

Hi Evgeniy

Ive tried that, but it doesnt seem to work, it still brings across records with (C004) in the text. Odd.

I also was not aware i could bring all the other fields into the header mapping like that. See screen shots 1 & 2.

1.png2.png

Thanks

George.


1.png (68.9 kB)
2.png (66.5 kB)
Show 5 Share
10 |10000 characters needed characters left characters exceeded

Hi George!

Wouldn't you please provide an example source XML, after FCC conversion?

And yes - adding another target fields to particular field's mapping can be very helpful. For example, if you need to assign the same constant value to all of those fields.

Regards, Evgeniy.

0

To be honest, i've not even done the FCC for this, i'm merely in design phaze at present.

HAve attached my schema.xsd, rename from .xml to .xsd

0

Sorted. Removed the space at the end of the text field...

0

To avoid such kind of issues just add "Trim" function next to your field in mapping.

Regards, Evgeniy.

1

Yes, thats what i did :)

THanks for your help !!

1