cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

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
v-monli-msft
Community Support
Community Support

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.

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (58,247)