cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Question - create node if condition met

former_member233999
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor
0 Kudos

Hi George!

Regards, Evgeniy.

Answers (2)

Answers (2)

former_member186851
Active Contributor

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:

former_member233999
Participant
0 Kudos

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.

former_member190293
Active Contributor
0 Kudos

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.

former_member233999
Participant
0 Kudos

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

former_member233999
Participant
0 Kudos

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

former_member190293
Active Contributor

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

Regards, Evgeniy.

former_member233999
Participant

Yes, thats what i did 🙂

THanks for your help !!