How to delete a data type that is automatically created


I have created an automated process whereby an incident is created upon a button being clicked on my sidebar to take you to the “incidentpage” When on the incident page you are able to input the relevant information and then press create incident and the relevant data is added to the data type. This all works ok.
The problem i have is when the user goes to the incident page it creates the incident in app data with incident number field being automatically created. But if the user decides to come away from the page without updating the fields and pressing create incident, the incident remains with empty fields in my app data.

What i want to do is delete the incident if the create button is not clicked but i cannot work out how to do this.

Is anyone able to help. If you need any more info or screenshots please let me know any support is appreciated.

TLDR: you have a WF run let’s say in 20 minutes that checks if the incident is a skeleton and if it is → delete. That WF can be scheduled when you create the incident OR via a DB trigger.

NOTE there’s really no reason to create the incident until sufficient data is entered to create the incident. It’s just a lot of admin and inefficient and extra WUs. You’re probably creating it due to the page being of incident thing but that also can change…

Thanks for the reply I will try this. I have the incident created as I need the incident number to attach certain aspects of the incident to so I can have multiple’s attached. For instance I create the incident number and then I need to add 10 people to that incident I can add multiples into a repeating group.
They may not finish creating the incident so will try the WF you suggested to delete it if create incident doesn’t occur after X minutes

You don’t need the incident for that. Have a list of users in a RG on the incident page and when the incident is created at the end, simply add those users.

Essentially, have states of all fields you need for the incident, and then when creating the incident grabe the values in those states.