Hi
The purpose is to send an email to each requester.
I have used a QueryList to store the [IDs] into a collection = col_IDs
Now, at the For Each, I set as following;
Target collection: col_IDs
Store result in: txt_IDs
Then, I added the email to say send to Requester.
But it does only send out to the 1st and same requster!
How, do I make it so it loops for each ID in the collection and then sends email to the relevant Requester of each Item with the Ref Number, etc.?
Solved! Go to Solution.
@bimi82 try below approach:
Alternate approach is:
Hello @kunalpatel
Would appreciate if you could visuliase it, it's easier for me to understand.
Here is what I have done so far:
Now, in the For Each loop:
I am unsure what the INDEX does, and how to put it in action?
This is how it looks:
By this, it sends out 2 emails (because atm. there are only 2 entries)
and the emails are send to each Requester.
Now, what if I wanted to include the Reference number and anything else from each item?
Logically, it should look at the ID of the item and then allow me to pick anything from it.
If could send screenshots would be great.
I think I managed to get it done:
This is the workflow:
1) the Query List, stores the IDs into a collection = col_IDs
2) the For Each looks at the col_IDs and stors result into txt_ID
3) the Qeury Lis (within the Loop) filters where the ID is equals to txt_ID
4) store the prefered information into variables
5) send an email with the information out.
@bimi82 your workflow is querying the list on each item. Instead of putting the load on the system you can easily achieve the same results by collection variable and index variable.
@kunalpatel can you explain how to achieve that?
Please do a step by step with screenshots...
cheers
@bimi82 in your post where you queried your list and got IDs and Created By collections, make following changes:
I am slightly confused because the Index won;t allow me to select any variables!
Anyway, this is what I done so far:
In the QUERY LIST:
In the For Each Loop:
I am not able to set the Index to any variables.
Normally it is an Interger and it does not work ... I tried with all.
Then you suggest to add a Collection Operation within the for each loop, like this?
How do I specify what GET information I want?
Because the Index would have an array of information.
Ideally I would want to say : for each item, get me the name/surname/email etc. etc.
@kunalpatel and this approach does not use much resource, you saying?
Whereas in my solution, the query runs for each item and if there is many items then it will cause too much resource? is that what you are saying?
On other hand, when storing the output into variables and use Collection Operation then it will simply fetch the Data from the Num_Index - that is how I understand your solution.