Reputation: 55
For example my Azure file share directory contains the following files:
abc_YYYYMMDD.txt
def_YYYYMMDD.txt
ijk_YYYYMMDD.txt
I'm only interested to get abc_YYYYMMDD.txt and ijk_YYYYMMDD.txt
Currently, I have a Get Metadata activity that gets a list of files (childItems property) inside a File Share directory.
Then I have Filter activity that has this dynamic content:
@startswith(item().name, variables('filename_filter')) OR startswith(item().name,
variables('filename2filter')))
Unfortunately, it has an error:
Position 54 'startswith' is a primitive and doesn't support nested properties
How do I resolve this if I have multiple conditions inside the Dynamic Content for Filter activity?
Upvotes: 0
Views: 1614
Reputation: 16401
Your Filter expression should be like this:
@or(startswith(item().name,variables('filename_filter')),startswith(item().name,variables('filename2filter'))
The expression doesn't support "or" directly, you should use or()
function.
I create a pipeline, using parameters to filter the filename which start with "test1" and "test2":
HTH.
Upvotes: 1