I have two tables with many to many relationship. Have done an excel import to load the data in both the tables and a microflow creates an association. I have a requirement to remove all the associations of Table A based on a value entered in table B. like for eg. Employee , Project tables. when the employee leaves the company an end date will be added. Based on that end date we have to delete/remove all the associations to Project table. Please suggest how can i achieve this. Thanks in advance.
asked
Prathibha Pandurangi
1 answers
1
You could accomplish this in a microflow as follows:
retrieve all employees with an end date that is less than or equal to today
loop through each of those employees
inside the employee loop, retrieve all projects which an individual employee is associated with
create a nested loop inside the original loop - the nested loop will iterate over projects
for each project, inside the nested loop, use a Change action. In the Change action, modify the association between project and employee. In the change action, specify that you want to remove the employee you are iterating over