Automatic Flow that Updates List

I have a ‘ParkComplianceList’ – which tracks location compliance based on the ‘ComplianceList’.

I have a ‘ComplianceList’ – which tracks the compliance of one or more systems at each location in the ‘ParkComplianceList’.

I have written an automatic flow that kicks off when an item is created or edited in the ‘ComplianceList’.

The ‘ComplianceList’ has hundreds of items at dozens of locations.

I am using the location alpha code as the unique ID for query purposes between the two lists (and as varParkName in the flow).

Each alpha code may appear once or many times in the ‘ComplianceList’. Each alpha code ONLY appears once in the ‘ParkComplianceList’.

The ‘ComplianceList’ has a ‘ComplianceStatus’ column, the contents of which is either ‘Compliant’ or ‘Noncompliant’.

The ‘ComplianceList’ has “EngineCompanyPark” and “ActiveEngineCompany” columns, the contents of which are “Yes” or “No”.

The ‘ParkCompliaceList’ has a ‘ComplianceStatus’ column.

Flow Action – whenever there is action in the ‘ComplianceList’ query the list and…
If EngineCompanyPark = “Yes”
If ActiveCompany = “Yes”
If ComplianceStatus DOES NOT = “Noncompliant”
‘ComplianceList’ – ComplianceStatus = “Compliant” else “Noncompliant”

enter image description here