Good day,
I'm working through a request to create an email subscription list.
We have a large number of legal related documents in a document library that are tagged with a multi-value choice field.
For example, it could be any one or more of "benefits, "payroll", "tax", "other" (in reality we have dozens of tags and a document can be tagged with one or several of them)
As an example here is a test table that has three entries
"HR Manual.doc" ["benefits", "payroll"]
"Tax Numbers.xlsx" ["payroll, "tax"]
"Policy.pdf" ["other"]
I then have a subsciption list with user names and a copy of the tag field, for documents they'd like updates on:
Barry ["benefits", "other" ]
Jane ["payroll", "tax", "other"]
John ["other"]
The idea then is that Barry would never be notified on changes to the Tax Numbers document. John, would only be notified on changes to the Policy record and Jane would get a notification for all three records.
On a high level I see this working as such:
For Each User
- Get user's subscription preferences.
- Fetch the document library and filter it down to matches on the subscription preference.
- For Each document match
- - check for edits and build an email body.
- End For each
- Email out the compiled list
End For each.
I see a lot of examples on how to filter an array on one item, but I cannot find anything on filtering an array with another array.
Any suggestions are welcome.
Regards,
Barry
Solved! Go to Solution.
Hi @BKHolmes ,
From your description, you want to determine if the corresponding categories are equal and then send the file.
You could configure your Flow by following the instructions below. The main thing to do is to use variables to get the category value contained in each item/file property.
Then iterate through the list and Library to compare.
Image reference:
Details of Apply to each:
Details of Apply to each 3
Details of Condition:
Hope it helps.
Best Regards,
Hi @BKHolmes ,
Could you illustrate your needs with screenshots?
I am afraid that although you have provided a lot of descriptions, I have not figured out your needs.
In addition to filtering an array with another array, it seems that you need to use two Apply to each, like:
Best Regards,
@v-bacao-msft Please find an example flow attached that should help illustrate what I'm trying to do.
Hi @BKHolmes ,
From your description, you want to determine if the corresponding categories are equal and then send the file.
You could configure your Flow by following the instructions below. The main thing to do is to use variables to get the category value contained in each item/file property.
Then iterate through the list and Library to compare.
Image reference:
Details of Apply to each:
Details of Apply to each 3
Details of Condition:
Hope it helps.
Best Regards,
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
33 | |
15 | |
13 | |
13 | |
6 |
User | Count |
---|---|
40 | |
30 | |
25 | |
11 | |
11 |