cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Bug: Navigate() causes blank emailed Collection

This is weird! Bug was very tricky to track down as it ONLY happens to non-authors. 

 

Issue: 

- Navigate function emails (non-author) users a blank Collection

 

App design:

- App is designed to send an HTML email of completed Form fields upon submission of Form.

 

- Submit button OnSelect:

UpdateContext({varSpinner: true});
ClearCollect(
    colEntireForm,
    {
     <EVERY FORM FIELD CAPTURED>
    }
);
SubmitForm(reportOut_form)

 

- Form OnSuccess: NOTE: When the Navigate() function below is commented out, user receives email fully populated!

Office365.SendEmail(
    Office365Users.MyProfile().Mail,
    "Daily Report",
    htmlEmail.HtmlText, 
    {IsHtml:true}
);
UpdateContext({varSpinner: false});
Navigate(success, ScreenTransition.None) <--NOTE: When this is commented out, users receive email with all fields populated!!!!!>

 

- htmlEmail HTML Text control: 

 

 

"<h3>Daily Report for " & name.Text & "</h3>" &

"<b>Results:</b>" &

"<br> <br>" &

"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse; text-align:left'>" &
    "<col width='400'>" &
    "<tr style='background-color:#efefef'>
        <th>Measure</th> <th>Value</th> 
    </tr> 
    <tr>" &
        Concat(colEntireForm,
            "<td>" & "field1: " & " </td>
             <td>" & field1.Text & " </td>
    <tr>" &
            "<td>" & "field2: " & " </td>
             <td>" & field2.Selected.Value & " </td>
    <tr>" &
<!--Etc for all form fields--> <tr>" & "</tr> <tr>") & "</Table>"

The CRAZY part of this:

  • When I added a user to the app with Edit perm's and they opened the app in Preview-mode, complete the Form, submit, NO ISSUES!
  • The issue does not appear for me either as the app author... Any ideas?
2 REPLIES 2
Community Support Team
Community Support Team

Re: Bug: Navigate() causes blank emailed Collection

Hi @ericonline,

 

Did you mean that when you remove below part of formula the issue is gone?

Navigate(success, ScreenTransition.None) 

 

I also noticed that you have missed a ";" in front of this formula.  So the formula should be:

UpdateContext({varSpinner: false});
Navigate(success, ScreenTransition.None)

Please try to add it and test again.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: Bug: Navigate() causes blank emailed Collection

Hi @v-monli-msft

 

RE: "Did you mean that when you remove below part of formula the issue is gone?

  • Yes. Removing the Navigate() function alleviates the problem

RE: "...missed a ";" in front of this formula."

  • In the production code, the Navigate() function is commented out becuase of the bug.
  • In the forum post code, I removed the comment slashes ( " // " ) but failed to add the " ; ". 
  • I edited the forum post code to be accurate.

Any further thoughts on this bug?

 

Thank you

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,771)