Solved

Signature control | Status code 400

  • 19 September 2022
  • 5 replies
  • 67 views

Userlevel 4
Badge +11

📖 It would be nice if the documentation were expanded to explain how to set up the signature component. 

Signature control

 
I have 2 columns signature and signature_file with data type NVARCHAR(MAX). Column "signature" with a domain with user interface control "Signature". The other column "signature_file” is used as storage column.  

 

❗When placing a signature in the Universal GUI I get a bad request error message. 

Request Method: PATCH | Status Code: 400

 

icon

Best answer by Vincent Doppenberg 21 September 2022, 14:07

View original

This topic has been closed for comments

5 replies

Userlevel 7
Badge +11

Hi Dennis,

The signature control outputs a PNG image, so you should at least use a VARBINARY field instead of NVARCHAR. Does this fix the problem?

Userlevel 4
Badge +11

Hi Jasper, 

I changed the column where the data should be stored (signature_file) to VARBINARY(MAX). 

VARBINARY(MAX)

What data type and control do you recommend for the field where the user will capture his signature? Now it's als VARBINARY(MAX) without control. 

 

Unfortunately, this did not fix the problem 🙄. Uploading a .PNG file from the Windows GUI also results in NULL values. 

Userlevel 6
Badge +4

Hello Dennis,

If you click one of the requests with a 400 status code and then navigate to the Response tab, do you see an error reason there?

Userlevel 4
Badge +11

Hi Vincent, 

🚩Invalid value 'signature-signature-bf6ae27e-cb39-46de-a11a-1dc4e61de136.png' for property 'signature'.

Userlevel 6
Badge +4

Hello Dennis,

The signature column should be (n)varchar, as this is where the file name will be stored. The signature_file column should be varbinary, as this is where the file data will be stored. Your domain with the signature control type is really just like another domain with a database storage configuration. The only difference is the control type used to upload/download/display the file.

I hope this helps.