what is that nullsub ?

hi
I began to learn the new service manager

What is code nullsub explain to

 

Example:

not nullsub($G.bg, false)

or

 

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

Parents
  • 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.

Reply
  • 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.

Children
No Data