Thanks to this forum my very first app is nearly ready for people to test, the only thing left is to be able to send the data in a form in a calander request to someone. I've had a look at sending emails via Flows but it never seems to send or I dont have the options when I try to create the Flow.
Firstly is being able to send email/calander requests in a PowerApp only available if you use Flows or is it even possible to send an email with only using PowerApps. The data that I want to send will be in the form that I'm clicking to create a ticket..
Kind Regards
James
Solved! Go to Solution.
As the Help says, the parameters for SendEmail are: Office365.SendEmail(adress, topic, body), all strings
In my example, ThisItem.BestEPost refers to a field with the email address I want to send the email to
"Din beställning till IT-avdelningen har behandlats" is the topic
The next parameter is a concatenation of the body: First I have some initial text, then I add a field (using the &-operator), some more text, the name of the user, a new line, some more text and two more new lines. Then it gets interesting - by using Concat I loop through a gallery (gOnskeRader.AllItems) and add fields from each row in the gallery to the body of the email.
At the very end I add two more blank lines and a greeting to top things off.
"Beställningen du skickade " & ThisItem.Bestallningsdatum & " har nu blivit inlagd i beställningslistan av " & User().FullName & "." & Char(13) & "Du beställde:" & Char(13) & Char(13) & Concat(gOnskeRader.AllItems; Anvandare & " " & Avdelning_Plats & " " & Benamning & " " & Antal & Char(13)) & Char(13) & "Mvh" & Char(13) & "IT-avdelningen"
So, in the topic or body (or both), you just have to string together what you want the topic/body to say.
NB - You might run into trouble just referencing the Datacard, fopr instance DataCardValue21. Instead it might be better to reference the vaue of the datacard, DataCardValue21.Value as has been reported elsewhere.
Good luck!
It is very doable to send an email from within PA. I have done that, but not a calendar request. You send an email by using the Office365.SendEmail function and you can use fields from your gallery or collection, see my example below:
Office365.SendEmail(ThisItem.BestEpost; "Din beställning till IT-avdelningen har behandlats"; "Beställningen du skickade " & ThisItem.Bestallningsdatum & " har nu blivit inlagd i beställningslistan av " & User().FullName & "." & Char(13) & "Du beställde:" & Char(13) & Char(13) & Concat(gOnskeRader.AllItems; Anvandare & " " & Avdelning_Plats & " " & Benamning & " " & Antal & Char(13)) & Char(13) & "Mvh" & Char(13) & "IT-avdelningen")
I use the function Concat to loop through a gallery to add information for each row and Char(13) to force a new line.
The Office365 object also has a function called CalendarPostItem, but the guide, found here https://powerapps.microsoft.com/en-us/tutorials/connection-office365-outlook/, doesn't give any details as to how to use it. Maybe that's a possibility, but you'd have to do a bit of research on how to use it.
Best of luck!
EDIT - I found a link to a discussion about the CalendarPostItem here: https://community.powerapps.com/t5/PowerApps-Forum/Writing-an-Event-to-Outlook-Calendar/m-p/51818
Hi there,
Many thanks for the info I've been playing around and I've got the standard parts setup for a basic form :-
Office365.SendEmail(DataCardValue19, DataCardValue20, DataCardValue21); ResetForm(Form1)
That returns the correct information so far, but I've got more fields and I can't work out how to add those fields to the email?
Within your example :-
Office365.SendEmail(ThisItem.BestEpost;
What is this doing and what information do I need to put there in my line?
Any help most welcome 🙂
As the Help says, the parameters for SendEmail are: Office365.SendEmail(adress, topic, body), all strings
In my example, ThisItem.BestEPost refers to a field with the email address I want to send the email to
"Din beställning till IT-avdelningen har behandlats" is the topic
The next parameter is a concatenation of the body: First I have some initial text, then I add a field (using the &-operator), some more text, the name of the user, a new line, some more text and two more new lines. Then it gets interesting - by using Concat I loop through a gallery (gOnskeRader.AllItems) and add fields from each row in the gallery to the body of the email.
At the very end I add two more blank lines and a greeting to top things off.
"Beställningen du skickade " & ThisItem.Bestallningsdatum & " har nu blivit inlagd i beställningslistan av " & User().FullName & "." & Char(13) & "Du beställde:" & Char(13) & Char(13) & Concat(gOnskeRader.AllItems; Anvandare & " " & Avdelning_Plats & " " & Benamning & " " & Antal & Char(13)) & Char(13) & "Mvh" & Char(13) & "IT-avdelningen"
So, in the topic or body (or both), you just have to string together what you want the topic/body to say.
NB - You might run into trouble just referencing the Datacard, fopr instance DataCardValue21. Instead it might be better to reference the vaue of the datacard, DataCardValue21.Value as has been reported elsewhere.
Good luck!
Many thanks for the input it seems to work like a charm via email... now onto the Calendar 🙂
Glad I could help, @JamesOxton!
Good luck with the calendar, I haven't used it yet! If you find a solution, post it here!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
202 | |
187 | |
80 | |
50 | |
38 |
User | Count |
---|---|
304 | |
249 | |
123 | |
73 | |
55 |