You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Git Issue: Boolean Form Submission Error in Business Forms Panel 4.8.0 with Grafana 11.1.0
Summary
When using the Business Forms Panel (v4.8.0) in Grafana (v11.1.0), submitting a boolean field with a value of false results in an error. This issue arises due to the undefined value being sent in the update statement for false.
Steps to Reproduce
Set up a Grafana dashboard with:
Two form panels for numeric inputs.
One form panel using a "Radio group with boolean options".
Connect the form panels to a PostgreSQL database.
Ensure the database field for the boolean is initially set to false.
Perform the following actions:
Set the boolean form to true and submit: ✅ Submission succeeds.
Set the boolean form to false and submit: ❌ Submission fails.
Observed Behavior
When setting the boolean field to true, the update statement correctly sends true as the value.
When setting the boolean field to false, the update statement sends undefined, resulting in an error.
Expected Behavior
The update statement should send false when the boolean field is set to false, as displayed correctly in the "Update Confirmation Window".
Environment
Business Forms Panel: 4.8.0
Grafana: 11.1.0
Database: PostgreSQL
Additional Notes
The issue seems to originate from how the form panel processes and serializes boolean values during submission. The discrepancy between the "Update Confirmation Window" and the actual update statement may offer a clue.
Request
Can this behavior be verified and addressed? If additional debugging or testing is needed, please provide guidance.
Thanks
The text was updated successfully, but these errors were encountered:
@mikhail-vl I set the "Custom Code" (Initial Request) field to empty but still the same issue.
I tried it with both "Custom Code" fields but the error with "undefined" won't be solved.
Meanwhile I am using a workaround: isactive=case when '${payload.isactive}'='true' then true else false end
I check if it is true and update the table with true, else with false. But I am sure it would be much more convenient if the radio group return was either true or false.
Git Issue: Boolean Form Submission Error in Business Forms Panel 4.8.0 with Grafana 11.1.0
Summary
When using the Business Forms Panel (v4.8.0) in Grafana (v11.1.0), submitting a boolean field with a value of
false
results in an error. This issue arises due to theundefined
value being sent in the update statement forfalse
.Steps to Reproduce
false
.true
and submit: ✅ Submission succeeds.false
and submit: ❌ Submission fails.Observed Behavior
true
, the update statement correctly sendstrue
as the value.false
, the update statement sendsundefined
, resulting in an error.Expected Behavior
false
when the boolean field is set tofalse
, as displayed correctly in the "Update Confirmation Window".Environment
Additional Notes
The issue seems to originate from how the form panel processes and serializes boolean values during submission. The discrepancy between the "Update Confirmation Window" and the actual update statement may offer a clue.
Request
Can this behavior be verified and addressed? If additional debugging or testing is needed, please provide guidance.
Thanks
The text was updated successfully, but these errors were encountered: