Re: Extract email from record string
@David_MA
Hello David,
Thank you for the reply. I'm creating a Collection in my Power App. In that Collection, I'm capturing the user's email. I then Parse the JSON to get to the contents of the Collection, create a .cvs table, etc. The reason I am interested in mailing the report to the user is in case they have pop-ups blocked and are unable to view the Excel file that is returned to the app.
Here is the OnSelect of my download icon (not technically a button). I would prefer not to Collect the email address as it wants to send multiple emails (one per comment). I wrote Compose statements to whittle it down to one email and convert the array to a string, but as previously mentioned, it isn't in the format I need. I would prefer to use your suggestion as it seems much simpler, but I am not sure how to write it into the OnSelect formula so it could be retrieved at the "Send an email" step. Can you please give me advice on how to do that? Thanks!
ForAll(
galComments.AllItems,
Collect(
colComments,
{
AuthorRole: ThisRecord.'Author Role'.Value,
Title: ThisRecord.'Comment Title',
Category: ThisRecord.Category.Value,
CommentBody: ThisRecord.'Comment Body',
CustomID: ThisRecord.'Custom ID',
Email:varUser.Email
}
)
);
'OCFComments-ExcelExport'.Run(JSON(colComments,JSONFormat.IncludeBinaryData & JSONFormat.IgnoreUnsupportedTypes));
Set(varFileLink, 'OCFComments-ExcelExport'.Run(
JSON(
colComments,
JSONFormat.IncludeBinaryData & JSONFormat.IgnoreUnsupportedTypes
)
).filelink);Launch(varFileLink);
Clear(colComments);
Notify("You will receive the report via email shortly.", NotificationType.Success)