cancel
Showing results for 
Search instead for 
Did you mean: 

UDF for replace Null

Former Member
0 Kudos

Hi,

I have to write an UDF

some times source fields are passing this value format like ex: "VALIDTO: 2015-08-19 12:35:24" instead of normal data

If this type of values comes to PI then PI should replace to null value. can you please guide me about to write UDF?

Thank you

Sateesh

Accepted Solutions (1)

Accepted Solutions (1)

azharshaikh
Active Contributor
0 Kudos

Hi Sateesh,

From the query it seems you want to replace Date field with Null if input contains VALIDTO string.

You can achieve this using standard Graphical Mapping node Function.

startsWith followed by IF Else Check.

Hope it helps

Regards,
Azhar

Former Member
0 Kudos

Hello Azhar,

My field input is like below

if Vendor no = 4003430 then i pass as it is to target structure

some times Vendor no = VALIDTO: 2015-08-25 10:58:00 comes like this then I should pass 'null' value to target.

'VALIDTO: 2015-08-25 10:58:00' this is not constant

Please guide

Thanks

Sateesh

azharshaikh
Active Contributor
0 Kudos

Hi Sateesh,

In the Mapping we are not checking for the exact / actual constant string...we are just checking if the String starts with = VALIDTO

If yes the pass Null else the value as is.

Let me know what all values the String can contain

Regards,
Azhar

Former Member
0 Kudos

You right my dear Azhar.

Thanks for quick solution:)

Best Regards,
Sateesh

Answers (0)