User cannot delete account when having a pending order

I want to add something that doesn’t let the User to delete their account when having a Pending Order.

could be as something as 'When current user's order status pending is "yes". then it’ll show a error message stating that the user has a pending order.

Here is a screenshot of my workflow to delete a account.

Hi there, @mrpsgamer8… if I understand your post correctly, it should be pretty simple to do what you described, and you could do it by having two workflow events for Button Delete is clicked.

On the event you are showing in the screenshot, it seems like you could add a condition of Current User's order status pending is "no" to the event (literally on the Button Delete is clicked box itself) so it only runs when the user does not have a pending order. Then, you would add another workflow event for Button Delete is clicked, and you would add the exact opposite condition to the event. Within that event, you could have a workflow action that shows an alert that lets the user know why they can’t perform the delete operation.

Hope this helps.


i’ll give it a try since i still have to add a field to the order data type. so i have to somehow also put the status so staff can edit it when the order is received and payment is done.

i’ll give this a try tomorrow hopefully!

hello again mike.

i didn’t quiet get you on how to do it. so do you mean add a action to the button or the place that says ‘only when’.

also just a heads up. by 'pending' i mean 'not paid'. so the order data type has a field called 'Paid' which is a 'yes/no'. so would i technically say Current User's Placed Orders:each item's Paid is 'Yes/No'.

overall, the user cannot delete their account if they didnt pay for an order.

It’s really about getting the expression for the condition correct first. Then, you can put the condition where it makes the most sense from a user experience perspective. For example, you could put the condition on the button element itself to disable the button when the user has an unpaid order. After all, why let the user even click the button if you are only going to tell them they can’t perform the action after the button is clicked?

The above being said, it still sounds like your condition should be rather simple. Do a search for orders with constraints where User = Current User and Paid = no, and add :count > 0 to the end of the search expression. So, in other words, when the count of unpaid orders for the current user is greater than 0, do something such as disabling the button that lets the user delete their account.

thank you.

now i just have to add so that when the user deletes their account, every data or anything they had will get deleted.

@mikeloc just a return from the above from me.

im trying to add the Status which is Paid field in the order data type.
this will tell if the order is paid or not.

Staff will be able to keep it as Paid or Not Paid, which is the Paid = "Yes/No"

If the field is a yes/no field, try changing the Type of choices for the dropdown to yes/no.

changed it to Type of choice to yes/no.
choices source to search for Order's:each item's Paid

but no options come up.

when i click the dropdown, its blank.

You’re in a repeating group, so you shouldn’t need to do a search. It should be a field associated with the current cell’s thing. Also, your dropdown is missing the Option caption.

the repeating group is Ordered Product and the Paid field is in Order data type.

and what should be the Option Captain?

what if i do it as a Static Choice then use a workflow to set the field to yes/no?

maybe give it a try?

tried it. no chance still…

bumping this, if anyone else could help.

Remember when we went 60+ replies deep in direct messages and then still had to jump on a call to figure out what you were trying to do? Yeah, here we go again. :wink:

I’m sure this won’t work, but try setting the dropdown choices source to yes/no, and then set the choices source to Current cell's Ordered Product's Order's Paid.

well tbh…it might have to go there again :sob:

but did it right now. and do i leave the Option Caption empty?

You never leave the option caption empty when working with a dropdown because it is the option caption that defines what to show in the dropdown.

so keep it as current option is yes/no or just current option?

Try some stuff and see if it works.