Update Request payload issue in Business Form Panel

In the query section of the Update request payload i have added a query.

INSERT INTO customer(customername, customercity, customerdescription) VALUES (
‘${payload.customername}’,
‘$cities’,
‘${payload.customerdescription}’);

when one of the fields(eg: customerdescription) are empty and when i click submit ‘${payload.customerdescription}’ goes into the database as it is.

  customerdescription
--------------------------------
 ${payload.customerdescription}
 tt

Is there a different way to add the query or is my syntax wrong?

@amaljoseph109 Do you use custom code with validation to prepare payload?

If you do, then remove if statement, which prevent adding it to the payload.

1 Like

Thanks a lot :innocent:. This condition was there in the custom code

if (!element.value) {
    return;
  }

I removed it and now its working fine.

1 Like