My user table has boolean ‘isActive’ field. In postgres the column is with value as t or f.
I am using modal for creating new record. This works fine if i remove ‘isActive’ from insert query but fail if this field is selected with 500 error.
This is payload for request -
email:umeshxxxxxx@gmail.com
password:1
first_name:
last_name:
date_signup:
isActive:t
I tried all values for checkbox like t, ‘t’, 1, 0
Am I forgetting any step for checkbox configuration. (The create form is generated by generator)
regards
Notum
March 13, 2023, 4:59pm
2
Use BOOLEAN type in PostgreSQL instead of T/F.
It is boolean in postgresql. I made table in wappler datasource and it is default type generated.
This is checkbox configuration in form -
<input class="form-check-input" type="checkbox" value="t" id="inp_isActive" name="isActive">
Notum
March 13, 2023, 5:40pm
4
Value of checkbox should be 1.
Probably doing something wrong but I have x3 Custom Switches and non of them are passing a vaule
input class=“custom-control-input” type=“checkbox” id=“inp_cat_b” name=“cat_b” dmx-bind:value=“1”
Any ideas?
Could you post a screenshot of the insert step and the error from XHR in dev tools:
You can easily debug issues related to server-side processing such as - form not sending email, record not inserting or updating, query not showing data etc.
The first thing you need to do is to open the server connect settings. They are located in the Workflows Panel > Server Actions:
[Screenshot 2021-09-27 at 10.02.35]
And enable the Debug Mode:
[Screenshot 2021-09-27 at 10.03.08]
Click Save:
[Screenshot 2021-09-27 at 10.03.26]
In your browser, open the Developer tools. If you don’t k…
Thanks @Sorry_Duh , enabling server side debugging get me the real issue. It was my bad, the issue was not with boolean but blank ‘signup-date’ field. Adding now() in SC solved this issue.
I don’t want to give value in date field but want to keep it blank, How can I do this?
Thanks and regards
2 Likes
{{null}} will save null value in date field.
All issues are solved now.
Thanks @Sorry_Duh and @Notum
2 Likes