Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this example, {optional_date} refers to a column of type date and is optional. When its empty in your form, NULL is inserted fulfilling the MySQL requirement otherwise the value in the field will be inserted.

Support for NULL or Blank Values

 

NULLs are supported in the DBConnector.

Let's say you have a database query to retrieve a row from a database table and a business rule to assign the retrieved values to fields in a form/flow. If the columns in the database table contain null or blank values, the rule fails with a “Cannot set ‘value’ as “undefined’ error because nothing is retrieved for these columns in the JSON results. As a work-around, a portion of the business rule was created to check if values are being returned from columns before assigning it to a form field. This had to be done for every column value in every query.



Stored Procedures

You can also execute stored procedures via the database connector. Here is an example of a mySql stored procedure.

...