How to delete Questions / Response scales with answers

@Kimberley, you can find Answers table (grid) within Overviews, but this grid doesn’t have the “Delete” button, so you can use a scheduled task to delete Answer records.

  1. First decide which answers are linked to the question(s) you want to delete: go to the Overviews (1) > Answers grid (2) > add a column with id of the linked question (3):

  2. Then make sure you have a process for deleting records: Settings (1) > process action definitions (2) > add a new > choose a process “delete_recordscontrollercomponent” (3) > save and determine params and return values (4) > they must be visible after the determonation:

  3. Then create a scheduled task: Settings > scheduled tasks (1) > add a new > check the scheduling service (2) > set a schedule (3) > go to the process (4):

  4. Inside the process (1) > set a value (process) to the “Delete helper” (delete process) you have just defined (2) > update parameters (3):

  5. Check the process arguments: set which records you want to delete (1) > in my example I wanted to delete answers related to the questions with the id = 3 (2) > set interactive = false (3) > set auto_delete_all_casccades = true (4):

  6. Go back to the scheduled task > click on the “Register” button (1) > as soon as 2 new buttons will appear (“Deregister” and “Run now”) > click on the “Run now” (2):

  7. Check the Anwers grid > the answer records you filtered in the scheduled task must be removed.

  8. Now you can go back to the Questions grid and delete a question with id you used for filtering answers.

If you want to delete all questions > you need to delete all answers where the question is not null. Frequently used expressions (for filtering too) are here:
Expressions: Frequently Used Functions

1 Like