Welcome to Microsoft Q&A platform and thanks for raising your question here.
As per my understanding, you are trying to validate if the output of a variable is present in the list of items of array coming out of the script activity or not. Kindly let me know if my understanding is incorrect.
You need to convert the output of script activity into array instead of array of json i.e. :
{
" OUTPUT_DAYS": "2023-07-13"
},
{
" OUTPUT_DAYS": "2023-07-14"
}
needs to be converted to ["2023-07-13","2023-07-14"]
Also, the set variable activityconcat pipeline date
is not needed if you try the following solution.
Please try the below approach and see if it helps:
- Create another variable say
appendedvar
with array datatype.
- After script activity, use a foreach activity and set the sequential option as true. Provide this expression in Items of Foreach:
@activity('Script1').output.resultSets[0].rows
- Inside foreach, use
append variable
activity , and provide this expression in value:@item().OUTPUT_DAYS
- Now, outside foreach , use the set variable activity to validate the presence of variable output in the appendedvariable array using this exp:
@contains(variables('appendvar'),variables('PipelineTriggerDate'))
Hope it helps. Kindly accept the answer if it's helpful. Thankyou