Deleting a list after the dropdown answer changes

0
Hi everyone,   I have a dropdown menu which displays objects of an entity in a list depending on the answer. This list is created in a microflow, which is triggered by the change of the dropdown answer.  The problem is that after changing the dropdown answer a second time, the previously created list does not disappear but is only extended by the new list. That's why I placed a delete object at the end of the microflow after the commit, but this resulted in no list being displayed at all. Even using a "clear list" did not change anything.   Here is the Microflow:   Could someone maybe help me ? :) 
asked
3 answers
1

Hello Anna Kneidl,

 

Okay if i understand it right you have a handover where you need to add questions to based on the project type. 

The questions that you want to ask are associated with the projecttype and when you create a handover you create the questions for the handover and associated them to the handover. 

But in your case you want to change the projecttype of the handover and want to delete the old questions associated with the handover and add the new questions based on the changed project type.

 

What you need to do is to work with three possible lists here:

 

1. HandoverQuestionsOld = Handover 1 -* Questions(Start of the flow) these you want to delete

 

2. ProjectTypeQuestions = ProjectType 1-* Questions(questions associated to the template) based on these you want to create the questions

 

3. HandOverQuestionsNew = Handover 1-* Questions(End of the flow) these you want to create 

 

In your flow you have the last two lists, ProjectTypeQuestions = ChecklistQuestionsList and HandOverQuestionsNew = ChecklistQuestionsList_2 

 

What you need to add at the start of the flow is retrieving the already existing questions associated with the handover and delete this retrieved list, this is list 1. HandOverQuestionsOld

 

Hope this helps,

 

Good luck!

answered
0

Hello Anna,

 

Based on your flow I think you need to retrieve the existing question list and delete these questions before you add the new set of questions. To be sure of this can you please add a screenshot of the create action in your loop and maybe also a screenshot of your domain model, because maybe it also has to do with how your domain model is designed and more specifically your associations. 

 

Hope this helps,

 

Good luck!

answered
0

Hi Jelle,

 

thank you for your answer. :)

Here is a screenshot of the create action of the loop an a screenshot of the domain model.

image.png

image.pngimage.png

 

I also tried to add a retrieve list at the end of the microflow, but it was not selectable.

image.png

answered