Hello! I'm super new to power apps and even newer to flows.
The extent on what I've done so far is create buttons that patch Sharepoint records for current users. What I'm trying to do now is send out some bulk emails to a number of users dynamically. Let's say I click on the second gallery item and move to the next screen, I'm trying to send out an email from the current user on a button press to all of the users who belong to that second section (As denoted by their Sharepoint item which has a column for session). I've tried doing this with ForAll directly in power apps but it seems a flow is needed. I'm unsure how to pass this number, which is a variable in my power apps, into the flow and filter who gets my email.
Sorry, I know this is a involved question, and I may have not worded something super well, so let me know if I can provide screenshots.
Solved! Go to Solution.
Thanks @TheNewGuyAtWork ,
You gotta love complex field types (I totally avoid them - you might have a quick read of this blog of mine ) - however try this
ClearCollect(
StudentCollection,
AddColumns(
Filter(
'WkShp Registration List',
Session_x0020_ID_x003a_Title.Id=varParentItem.SessionID
),
"EMailAddress",
Email_x0020_Address.Email
).EmailAddress
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @TheNewGuyAtWork ,
You do not need a Flow to do this - you could use a ForAll() on the Office365Outlook.SendEmailV2 connector.
What code have you tried to date?
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Share the app screen shot and elaborate
Hello, thanks for the reply, This is what I initially tried to do, but the collection was essentially just a clone of the Sharepoint list, the current user Sharepoint has their email as well as the session that they belong to as attributes. I assume that the mail connector needs a collection of just email addresses to run correctly. I had tried to filter the email addresses into a collection to do this but with no luck. Should I be using filter to do this?
Edit: The code I have tried was the ForAll with the mail connector but it was on a collection that was the cloned Sharepoint list and I was trying to access the current items email attribute.
If you collect the email addresses (assume collection colSend and field name EmailAddress)
ForAll(
colSend,
Office365Outlook.SendEmailV2(
EmailAddress,
"Your Subject Here",
"Your Body Here"
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
That seems pretty straightforward, do you know of a way I can only put the desired items into the collection from the Share point list? Like for example only emails from records that have a certain value in another column? The only way I've seen the Collect function used was on the docs page and it just grabbed everything. IE Collect(MySPCollection, ListName)
Hi @TheNewGuyAtWork ,
Example
ClearCollect(
colSend,
Filter(
ListName,
FieldName="Something"
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Here's what I'm looking at now. My first line was to make the collection then I used the clearCollect to try to filter out the table to just the emails based on an ID, I'm not sure what the error is.
Edit: after looking at the docs again I see it needs another argument before the formulas for a table, is this the name of my new table? Or do I use my collection again, I do not have a list.
Hi @TheNewGuyAtWork ,
It helps to post your code as Text also - the code below
if correct would be filtering a list (or collection) called 'Email Address' where a field in the list of complex (table) type -'Session ID:Title' has an Id subfield where this has to be 2.
I am sure that is not what you are trying to do - using that logic, what are your list and field names?
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
So essentially i'm dealing with a sizable Sharepoint list that has a lot of info. What I want to do is just grab the email field from it, when the ID is equal to a certain number. To test I just used two. The names of the columns for email and for the ID are shown in the picture. I'm doing this because I assume to use forall on a collection with the email function it just needs to be a single column collection list with just the email plain text, so I'm trying to just extract the email field on a condition. Basically I just need the stuff in the email field in the condition to use forall, unless I can run the email function on something that has many attributes and choose.
I would post the code in the picture but it appears MS is having some server issues right now and I could barley get to the page, let me know if anything else help to see.
User | Count |
---|---|
257 | |
110 | |
97 | |
52 | |
39 |