IsNullDefault()

Lets you create default values for empty fields in Smart Capture forms. This function is helpful for inserting data from Smart Capture forms into Data Extensions.

The IsNullDefault() function has two parameters:

  • nonNullValue (string): Required. The value to return when a Smart Capture form field isn’t null.
  • nullValue (string): Required. The value to return when a Smart Capture form field is null.

To use the function, pass the values that you want it to return if the field is filled or empty, respectively.

This example inserts data into a Data Extension based on input from a Smart Capture form.

If the "tier" field in the Smart Capture form is filled, the example code inserts the value from the form. If the field is empty, the code inserts the value "Basic".