what is that nullsub ?

I began to learn the new service manager

What is code nullsub explain to



not nullsub($G.bg, false)



nullsub(different.from.contact in $file, false)=true

  • It means nullsub(v1,v2) this function will return with v1 if it's not null, if v1 is null then it'll return with v2.


    nullsub(different.from.contact in $file, false)=true this will be true if "different.from.contact in $file" = "true"


    not nullsub($G.bg, false)  this should be a condition for something, it will be true when $G.bg=null.

  • A nullsub evaluates the first parameter, and if it does not have a value, substitues the second parameter to evaluate the expressions.


    nullsub(different.from.contact in $file, false)=true

    If different.from.contact in $file is Null, substitute false for it and evaluate the expression, else just compare against the saved value for diferent.from.contact

    If different.from.contact in $file is not NULL, then the statement will evaluate:

    different.from.contact in $file=true

    If different.from.contact in $file is  NULL, then the statement will evaluate:

    false=true    (result is false)


    Another use would be:

    service.recipient in $file=nullsub(service.recipient in $file, contact.name in $file)

    In this example, if the user has not populated the service reipient field, but has populated the contact.name field, the contact.name will be copied to the service.recipient field..

    But if they have specified a recipient, it would not overwrite the existing data.