07-05-2022 01:49 PM
Hi,
I have the below expression but sometimes it can be NULL instead of ‘S’. Could you please suggest how to handle the NULL in the below expression?
$input0.final_document.Pipeline_Status==‘S’ && $input1.final_document.Pipeline_Status==‘S’ && $input2.final_document.Pipeline_Status==‘S’
07-05-2022 09:47 PM
You can use $.hasOwnProperty(‘input0.final_document.Pipeline_Status’) It will gives you true if value is not null.
07-06-2022 06:35 AM
@Supratim, Thanks for the inputs. My requirement is to handle both things e.g. I want to assign the value ‘S’ in mapper if it’s NULL OR its S.
How I can do it, please suggest.
($input0.final_document.Pipeline_Status==‘S’ OR NULL) && ($input1.final_document.Pipeline_Status==‘S’ OR NULL) && ($input2.final_document.Pipeline_Status==‘S’ OR NULL)
07-06-2022 10:36 PM
Hi @amit.saroha
You mean you want to fill the fields with S if it’s null?
Then you should use an if else
$input0.final_document.Pipeline_Status == NULL ? S : $input0.final_document.Pipeline_Status
07-07-2022 08:16 AM
You’re quite close:
($input0.final_document.Pipeline_Status=='S' || $input0.final_document.Pipeline_Status== null) && ($input1.final_document.Pipeline_Status=='S' || $input1.final_document.Pipeline_Status== null) && ($input2.final_document.Pipeline_Status=='S' || $input2.final_document.Pipeline_Status== null)
Or, other thing that you can try is the following:
$input0.final_document.Pipeline_Status matches 'S'|null && $input1.final_document.Pipeline_Status matches 'S'|null && $input2.final_document.Pipeline_Status matches 'S'|null