Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have developed a pipeline that incorporates a conditional flow. Based on whether a specific condition is true or false, a corresponding set of activities is executed.
True Condition: Executes Set A of activities.
False Condition: Executes Set B of activities.
I have a successor Outlook activity linked to the "If" activity, which is used to send a notification in case of execution failure. However, since some activities are not executed based on the condition, the expression in the Outlook activity to check the "If" activity's output for errors throws the following error:"Property cannot be evaluated because property 'Error' cannot be selected."
My understanding is that we can only refer to activity outputs for those activities that have been executed in expressions.
Question:
Is it possible to check if the predecessor activity was triggered using expressions, so I can determine if the activity has an output?
Solved! Go to Solution.
Hi @prajwal_mahale ,
You can use the @activity function in an expression to check if the preceding activity is executed. Below is an example:
@if(equals(activity('YourActivityName').status, 'Succeeded'), 'Activity was executed', 'Activity was not executed')
In this expression, replace YourActivityName with the name of your front activity. This will check the status of the activity and return a message indicating whether or not it was executed.
If you need to check for errors specifically, you can modify the expression to check for the presence of the error attribute:
@if(equals(activity('YourActivityName').status, 'Failed'), 'Activity failed', 'Activity succeeded or was not executed')
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @prajwal_mahale ,
You can use the @activity function in an expression to check if the preceding activity is executed. Below is an example:
@if(equals(activity('YourActivityName').status, 'Succeeded'), 'Activity was executed', 'Activity was not executed')
In this expression, replace YourActivityName with the name of your front activity. This will check the status of the activity and return a message indicating whether or not it was executed.
If you need to check for errors specifically, you can modify the expression to check for the presence of the error attribute:
@if(equals(activity('YourActivityName').status, 'Failed'), 'Activity failed', 'Activity succeeded or was not executed')
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
Check out the November 2024 Fabric update to learn about new features.
User | Count |
---|---|
5 | |
5 | |
2 | |
2 | |
1 |
User | Count |
---|---|
16 | |
11 | |
7 | |
6 | |
6 |