I currently have a Camera on my app that when clicked adds a captures a photo adds this to a collection that is then shown in an attachment control, these attachments are then send via email.
The issue i'm having is at the moment they have to select the camera control to take a photo, i'd like to change this and have button press to do it.
On Select for the camera is
Collect(
MyPics, /*create a collection to save the pic*/
{
DisplayName: Concatenate(
PhotoType_2.Selected.Value,
".jpg"
),
Value: Self.Photo,
AbsoluteUri: "",
Id: "00000000-0000-0000-0000-000000000000"
}
); Notify("photo captured", NotificationType.Success, 10000)
A shorted version of the email (i've just removed all the content from the body to show how its working without all the extra details)
Office365Outlook.SendEmailV2("aharkus@tbrown.com", "Subject", "Body",
{Attachments:AddColumns( RenameColumns(AttachmentControl.Attachments, Value, ContentBytes), '@odata.types', ""), IsHtml:true, Importance: "Normal",From:"SharePoint_NoReply@TBrownGroup.onmicrosoft.com"});
Notify("Data has been saved and emailed", NotificationType.Success); Clear(MyPics)
So i have tried to add a button that does the same as On Select for the camera but changing from self to the camera1
Collect(
MyPics, /*create a collection to save the pic*/
{
DisplayName: Concatenate(
PhotoType_2.Selected.Value,
".jpg"
),
Value: Camera1.Photo,
AbsoluteUri: "",
Id: "00000000-0000-0000-0000-000000000000"
}
); Notify("photo captured", NotificationType.Success, 10000)
But this doesn't work, it shows the picture in the attachment control but i get an error on the email button, Any ideas on what i'm doing wrong?