The error occurred in the Switch action named “Switch Type of employee”. In this switch statement, each case for one of the 3 different types of employees. The 3 employee types are: 1, Normal, 2, Manager, and 3, Partner. The waiting periods for all types are as follows. 1: 1 month (30 days), 2: 3 months (90 days), 3: 6 months (180 days). The Switch statement condition is a column from a table in an Excel spreadsheet (see Screenshot 2)
Whenever I run the flow, unfortunately it errors out and fails. In the “Switch Type of employee” action, the error message states “ActionFailed. An action failed. No dependant actions succeeded.” In all 3 cases of the switch statement, the 1st action is the same “Set variable TerminationDate” and they all have the same error message “ActionConditionFailed. The execution of template action 'Set_variable_WaitingPeriod_1' failed: an unexpected exception encountered when evaluating branching condition.”
This suggests that the error occurred in the “Switch Type of employee”, for that is where the condition is evaluated. (see screenshot 1)
Screenshot 1: the error in the test run, as it appears in Microsoft Power Automate:
Screenshot 2: the table in the "RedCompass Leavers table" Excel spreadsheet
As of today, to me it doesn’t make sense to me why the error still occurs. I suspect though that it’s something to do with the fact the Employee type values come from an Excel spreadsheet, because the similar, in fact identical action in another flow titled “Reminder to remove Microsoft E3 and E5 licenses for leaver part 1”, uses the Employee Type value from the user input form, but that has never given any error in its existence. But I am honestly not sure what else to do to fix this error.
I have searched existing posts first
I have done some searching of existing posts on the website. First I searched for "Switch statement on column in Excel table", then "An unexpected exception encountered when evaluating branching conditions.". However I couldn't find any posts that really answer how to fix the error I am getting.
Regards George
Please post a screen shot of your Flow in edit mode - be sure to show details of the switch that failed.
Hi Scott
Here is a screenshot of the actions that are mentioned in my original post:
Regards,
George
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
8 |
User | Count |
---|---|
49 | |
27 | |
23 | |
20 | |
19 |