Problem in deleting record

Hi @Dave - thanks for these tips.

Am I correct in thinking you use the uniqueRef field as an extra field, just for the purposes you describe - in addition to the record ID/key field? If so, for your ‘real’ IDs do you use the standard auto-increment columns or UUIDs for example?

I’ve thought about using UUIDs for keys, but there are quite a few pros and cons to consider.

1 Like

How do you send the cookie back to the server as $_COOKIE?
(sorry, haven’t done any programming with cookies before until Wappler. :smiley: )

In app connect define the cookie in the cookie manager

This will allow you to set the value within dynamic events

image

Then define the cookie in the server connect action to access the value

image

Forgot to mention, the value is available in app connect via the picker also

image

Thanks @Hyperbytes. I was able to set them and trying to query my table using the cookie variable and set it to Required in Server Connect. When I try to update it is giving me an Error 400 saying the variable I used in my query is required. I will try to check this again, I am thinking I may have missed some steps.

No worries mate.

Yes this is an extra field. In-fact I have two such fields most of the time, and the auto-increment field as standard which helps with indexing.

1 Like

Thanks again. Some food for thought.

1 Like

Hello, zitroware

Did you ever resolve this issue, I’ve got the same error occurring.

Anyone who saw my previous post, please ignore it, out of habit i set $_SESSION not $_COOKIE hence the error

I have no errors (now) with this process

I set the session manager in app connect

image

I set the cookie in the click action of the form button (i just set it as a static value but it could be dynamic)

I the read the cookie in server connect with required set in validation

All works as it should.

Hi @Patrick_T_Day, no it is not yet resolved. My workaround is I am using a Custom Query instead of the built-in Delete query. The weird thing is I am using exactly the same delete statement and it only works with the Custom Query. :smile:

Adding a screenshot just in case:

Thank you that did the trick

1 Like

Hi @Teodor, @George, can you also please check on this? We can still use a Custom Query for the delete, but it is still a bug I guess.

Thanks.

this seems to be a bug in the asp.net implementation of the database delete.
@patrick will fix it in the next update

This is indeed a bug in the delete, it doesn’t parse the expressions correctly. Will have it fixed for the next update.

this is now fixed in Wappler 2.1.6

This topic was automatically closed after 4 days. New replies are no longer allowed.