-
Validation on delete in Editable List component
Hi Team
How do we return an error dialog back to the client while doing validation on delete in an editable list ?
So in the update query section we call our analytic say deleteId which does some validation whether the user is allowed to delete the id or not.
If the user is not allowed, we want to show an error dialog back to the clientThe analytic throws an exception but that does not get propagated to the client as an error dialog
{[dgAdd;dgUpd;dgDel] /this sample requires keyed table: / table's key matches 'Key' in this dialog / exampleQueries::
id xkey ([] id:
int$();name:symbol$();note1:
symbol$()); /exampleQueries upsert(0i;
dummy;`); if[count[dgUpd]>0;`screenerFilters upsert flip dgUpd]; if[count[dgDel]>0; deleteId[dgDel[`id]]; /generate unique ids for new items if[count[dgAdd]>0;`screenerFilters upsert flip dgAdd]; }
Log in to reply.