Hi,
Looking for more help/advice.
So, I have an "App" that is connected to a sharepoint list. User can update the list and attach images.
For the user to upload the image im using "Add Picture" and then in that function its getting updated to SharePoint list and changed to base64 using below formula.
Patch(
'Generator Inspection',
LookUp('Generator Inspection', ID = Gallery4.Selected.ID),
{
'Generator Changeover Switch':Substitute(
JSON(
UploadedImage1.Image,
JSONFormat.IncludeBinaryData
),
"""",
""
)
}
);
I have proved it works it works as below you can see the data in the list and I have also pullled that data into the app with the "Image" function and it displays the image as it should.
Where I'm getting stuck now is, embedding that image into an email once a button is pressed. Below is the code I am using to send the email. The email sends okay, but what ever I try, the image will not appear in the email.
Set(varChangeSwitch,(Gallery4.Selected.'Generator Changeover Switch'));
Office365Outlook.SendEmailV2(
"email address", //yes, I have removed my email address for this form :)
"Test", //Subjsect
"<img src=" & varChangeSwitch & ">");
Solved! Go to Solution.
Hi,
Thanks for that, he clearly explains everything.
But it didn't solve my issue. But I figured it out!!.
When I was setting the base64 string from the data card as a string(in the below code), I was pointing it to the whole data card and not the text value in that data card🙈.
Once I corrected that, it worked no problem. Silly me. I really should stop and have a look at what I'm doing from time to time 😂😂.
Set(varChangeSwitch,(Gallery4.Selected.'Generator Changeover Switch'));
Office365Outlook.SendEmailV2(
"email address", //yes, I have removed my email address for this form :)
"Test", //Subjsect
"<img src=" & varChangeSwitch & ">");
If I remember correctly, to get the image to show you need to strip out the "data:image/jpeg;base64," header to get to the actual base64 data. Some images end up with "png" instead of "jpeg" in the header
Hi,
Thanks for replying but no joy with your suggestion
I manually put the base64 string into the email instead of a variable to try also - no good.
I put the base64 string into an online base64 - image converter to prove to myself the data string is okay - and it was.
I even created a new app just to test the email with the string to see if my app got somehow corrupted. Same result.
By any chance am I doing something silly with the email formula?
After looking I think you do want the whole string. The email call looks correct. You may need quotes around the base64 string. I would watch this video - Shane lays out everything.
Hi,
Thanks for that, he clearly explains everything.
But it didn't solve my issue. But I figured it out!!.
When I was setting the base64 string from the data card as a string(in the below code), I was pointing it to the whole data card and not the text value in that data card🙈.
Once I corrected that, it worked no problem. Silly me. I really should stop and have a look at what I'm doing from time to time 😂😂.
Set(varChangeSwitch,(Gallery4.Selected.'Generator Changeover Switch'));
Office365Outlook.SendEmailV2(
"email address", //yes, I have removed my email address for this form :)
"Test", //Subjsect
"<img src=" & varChangeSwitch & ">");
User | Count |
---|---|
257 | |
108 | |
90 | |
51 | |
44 |