2023.06.30 04:43 AM
I have a Data Grid component with Edit mode enabled, users can only update cells, not add or delete.
In my user defined update function, which upserts the users entry, I have put in some validation checks before the upsert to ensure the values are within a given range.
If the validation fails, I return an `ERROR_MESSAGE symbol, and this prompt the Dashboard to display an
error message in Red which says "An error occurred executing the update query: Error text: t"
Is there a way for me to to replace the "t" with a message corresponding to the validation check that failed?
Thanks
2023.07.02 01:11 PM
The solution I found for this problem was to open the file below
dash/www/modules/Datagrid_9fde571/main.js
And replace the line
r=function(e){this.showMessageSubmitError(e[0])}.bind(this) [First character being returned]
with
r=function(e){this.showMessageSubmitError(e)}.bind(this)
Now when I submit an edit to the Data grid cell, and force the update function to fail (with a mock validation check), the error message returning is showing the full error message.
If someone else has a better solution please let me know
2023.06.30 05:24 AM
If I modify my update function like below, where when the if statement is true it hits an undefined variable
"BadValueInputted" then the error message on screen just shows the first character of the missing variable, the "B", so the Error message appearing on screen is " "An error occurred executing the update query: Error text: B".
Is there a way to display the full text and not truncate?
2023.07.02 01:11 PM
The solution I found for this problem was to open the file below
dash/www/modules/Datagrid_9fde571/main.js
And replace the line
r=function(e){this.showMessageSubmitError(e[0])}.bind(this) [First character being returned]
with
r=function(e){this.showMessageSubmitError(e)}.bind(this)
Now when I submit an edit to the Data grid cell, and force the update function to fail (with a mock validation check), the error message returning is showing the full error message.
If someone else has a better solution please let me know
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.