- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2023 09:40 AM
I am very new to all of this. I want to use a flow to send email that has information from a number of database records. Currently I have a Look Up Records action and then a For Each action that sends an email based on some data in each record. So, this might send 10 emails. I don't really want to send the email until I have read a number of records (based on a condition -- maybe a value of 0 in a given field. So, what should I do in my For Each action instead of sending mail? Do I have some kind of a script that writes to a variable and then use the variable when I want to send mail? What is the best way to accomplish this? Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2023 09:06 AM
OK - I have figured this out. The correct line for the script is:
return fd_data.flow_var.issuetext += fd_data._2__for_each.item.issue + ';'
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2023 09:36 AM
The first issue is solved; looking at logs show it actually works. But for the second issue, I can't get the scripting right. I have 2 Flow Variables: issueType and issueText. In the Set Flow Variables step (under For Each, so it happens 5 times), I set both variables each time.
For issueType, I do:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2023 09:06 AM
OK - I have figured this out. The correct line for the script is:
return fd_data.flow_var.issuetext += fd_data._2__for_each.item.issue + ';'
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2024 04:32 AM
what was your solution for??
Issue 1: It doesn't seem like the For Each is iterating through all 6 records, though it indicates that it does. From the execution, it looks like it's only doing one record, and it only looks like it's logging one record. And it doesn't seem like the same record. In the run, it says Set Flow Variables 1 and Log 1. I thought it would do it 6 times