Skip to main content
December 26, 2021
Question

null/ blank value check for a process variable (pv)

  • December 26, 2021
  • 1 reply
  • 0 views

This code for check the process variable "gap" Boolean is not working.

My sample rule is:

if(
rule!APN_isBlank(ri!gap),
if(
like(ri!text,"*GAP*"),
ri!gap=true(),
ri!gap=false()),
ri!gap)

I need to check if the pv- gap (boolean) is null or empty, then I have to populate the gap as with checking on the like function

Else I need to just display the gap (true/ false) as it is which is not null.

Problem: Here when I give null/ empty value for "gap", then the true part is executed. It says simply false, even when the like function gives true value (text contains words "gap"). Please help me to execute this scenario. 

1 reply

stefanhelzle0001
Brainy
December 26, 2021

Next time, please!

You have a level 1 certification and should know that assignment of values in expressions does not work like this. ri!gap=true() is a comparison but not an assignment.

I modified your code assuming that you assign the output value to your pv!gap.

if(
  rule!APN_isBlank(ri!gap),
  like(ri!text,"*GAP*"),
  ri!gap
)