cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
davidessex
Helper II
Helper II

OFFICE365OUTLOOK Sending Email issue

Hi

 

I am creating an app to help with flow of applications that come in. It has three galleries - A browse gallery with just basic applicant detail, a second galley that shows the detail collected by the Microsoft form that is connected to a sharepoint list, and a third edit gallery where staff can add any interview details etc, which feeds back into the sharepoint list. No problem - works OK.

 

I then have tried to setup a button on the detail gallery (gallery 2) where the staff member can press, and it emails the full details over to to selected email addresses, which get picked up and set up on separate stand alone systems. This is where I seem to be going wrong. I have checked and my data connector of Office365 Outlook is connected, as I set up a simple test button to check it using the onselect command: Office365Outlook.SendEmailV2("david.harvey@test.uk", "TEST", "TEST") (not my email address) which worked perfectly ok, so I know the connector is working.

 

Within the second gallery I setup a customer datacard, added a button within the datacard and added the following code in Onselect

 

Office365Outlook.SendEmailv2("david.harvey@test.uk", " New Enrolment " & ThisItem.Title & " TERMS Learner Code " & ThisItem.TERMS Learner Code & " Course to Code " & ThisItem.Course to Enrol Onto 21/22 , "<font size=10>Programme Offer Form</font><br> <b>Learner Name: </b>" & ThisItem.Title & "<br><b>TERMS CODE: </b>" & ThisItem.TERMS Learner Code, { IsHtml: true, Importance: "High" } )

 

This did not work and came up with a host of errors so I tried adding ' to the formula for the ThisItems:

 

Office365Outlook.SendEmailv2("david.harvey@test.uk", " New Enrolment " & ThisItem.'Title' & " TERMS Learner Code " & ThisItem.'TERMS Learner Code' & " Course to Code " & ThisItem.'Course to Enrol Onto 21/22' , "<font size=10>Programme Offer Form</font><br> <b>Learner Name: </b>" & ThisItem.'Title' & "<br><b>TERMS CODE: </b>" & ThisItem.'TERMS Learner Code', { IsHtml: true, Importance: "High" } )

 

This did not work either. I am really scratching my head as when I have looked online, I get the same formula.

 

HELP please!

1 ACCEPTED SOLUTION

Accepted Solutions

Ah, I think this may be that the value you are trying to fill it with is not a plaintext item - Is the course to Enrol column a complex field? Try putting a . after ThisItem.'Course to Enrol Onto 21/22' and see if it can surface a sub-property of it like Name

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

5 REPLIES 5
iAm_ManCat
Super User
Super User

let's start small - if you put a label in your gallery in the same place as the button, and point it to ThisItem. then what options are you presented with? Find the values for each for those fields you are trying to add and then copy paste each of the 'correct' names from the label text property to the pieces in your email.

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Hi. I am not sure what you mean by that. If I take the ThisItem.'Course to Enrol Onto 21/22' as an example, when I type in the ThisItem. in the formula bar I only get the option 'Course to Enrol Onto 21/22'.

davidessex_0-1654085664633.png

 

However if you look in the data car Course to Enrol Onto 21/22_DataCard1, the actual data is sitting in DataCardValue43. However if you try putting in ThisItem.DataCardValue43, it still doesn't like it either. 

 

I tried simplifying it by just showing a basic message, but just putting the Course to Enrol Onto 21/22 in the subject heading and I get this.

 

davidessex_1-1654085961296.png

 

I am really flummoxed 

Ah, I think this may be that the value you are trying to fill it with is not a plaintext item - Is the course to Enrol column a complex field? Try putting a . after ThisItem.'Course to Enrol Onto 21/22' and see if it can surface a sub-property of it like Name

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Thanks adding the  dot brought up Value in the drop down and it worked perfectly ok!

Excellent, glad I could help!

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,676)