I have a list with inventory items and there's a column for owner. I'd like to send each owner a single email with list of the items they own. Also, I'd like to include multiple columns of information for each item.
firstly, use a Query List action to query for all owners and store the result in a Collection variable.
Then use a Collection Operation actions to remove duplicates.
Next, use a For Each to iterate through each own in your collection variable.
Inside the for each, this is where you will have multiple Query List actions to get all the items for a specific owner and start building up the email using the Build String action. Once you are done, you can use the Send Notification action to send that email.
First of all thanks for your posts and contributions. I have also read some of your personal blog-posts in the past (i.e. regarding reusable workflows) and they are very useful.
I have also arrived on my own to your suggestion. However, when it comes to the Query List action inside the "For Each", I am having a hard time filtering for the specific owner. Ideally I want to query (filter) all items which pertain to an owner (in this case, I'm using the column RM - which stands for Relationship Manager). My thinking led me to believe that the RM name must equal the Owners collection variable (which already removed duplicates) coll_RMs.
However, I get the following error:
The execution returned an unexpected error.
Exception from HRESULT: 0x80131904
Any ideas what am I doing wrong?
I have posted more information on my workflow on the following thread: Single Email - Multiple List Items
I meant to say, "Hi Vadim"
Hey Ruben ,
replace col_RMs with an actual typed in value and see if that works. If it does, compare it to whats in your column/variable.
It's probably a particular structure of data that is causing the issues.
Thank you for suggesting that approach. First, I have been using item_RM (person-group variable) instead of the col_RM because that is the first one is where the col_RM "for each" action is stored in. Second, when replacing item_RM by an actual typed in value (persons or groups are read AD\user), the query still returns nothing. Strange!
The solution that I'm going to test is using a "text" field for the RM's instead of the "person or group". That way the query works since I already tried the filter. I will just need to see how to adjust the final bits so that the emails get sent to each.
Well, things are getting really strange. I have added a column to my list called "RM name". I have also added a "Query User Profile" action to the nintex workflow. The Query User Profile action gets the Last Name of the "RM" column and stores it in 'item_RMname' variable) A history log confirms that the last name is obtained in the following format: "Cohen Pellico". I have ensured that the values in my new column "RM name" (text) reads in such format (i.e. Cohen Pellico again).
Subsequently, when I use the Query List action to filter all items where column "RM name" equals (or 'contains') variable "item_RMname", I get no results at all. However, if I type in "Cohen", I do get the results.
I have no idea why is this happening but it seems to me that variables do not work in Query List filters. Have you experienced this before?
I have nearly the same request, but my "who" column is contains muliple values.
Here is what my list looks like:
I need to send an email 3 days before the due date to the persons in the "Who" column BUT only for the tasks where they appear. I would like to send only one mail which will display all the tasks the person has to complete instead of one mail per task.
Example: 3 days before "02/25/17", the site workflow is supposed to send a mail to each person in the "who" column.
I assume the mail is sent to person1:
Please complete the following tasks before 02/25/17 :
Now the mail is sent to person3:
Hope it is clear!
Thanks for your help
PS: I have an on-premise version
Given the complexity, an alternative solution could be:
Store your tasks in a list.
Create a webpart page that uses a 'current user filter' so that any user who visits this page can only see their tasks. You will need to investigate how to connect the 'current user filter' to the "WHO" field from the task library webpart that you need t add. You can display the tasks with the due dates here.
Create a workflow with 1) query list: to store all task owners in a collection variable. 2) collection operation to remove duplicates. 3) For Each "WHO" 4) send email with a link to the webpart page & state that tasks due deadline is about to expire.
Alternatively, inside the foreach, you may be able to calculate which is the closest deadline (date) and save it in a variable and use it in your email. Not sure how to do it tho.
Retrieving data ...