web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sending email with fie...
Power Apps
Answered

Sending email with field values not showing

(0) ShareShare
ReportReport
Posted on by 126

Hello.

 

I'm using a button to save changes to a sharepoint list and send an email. There is an if statement that checks if a filed has been changed and sends an email based on that condition. In the email the field that was changed (from empty to some value) is somewhere in the body but it returns empty. However if the value is changed back to empty a new email is sent containing the value.

 

What may be causing this?

This is the code:

Patch('UT Tickets',varRecord, Form1.Updates, Form5.Updates, 


If(varAssignedChanged = true ,{'Dags. úthlutað':Now()}),
If(varStatusCompleted = true, {'Dags. lokið': Now()}),
If(varStatusOnHold = true, {date_onHold_status: Now()}),
If(varStatusInProgressFSRE = true, {date_InProgress_status_FSRE: Now()})
);

If(varAssignedChanged = true, Office365Outlook.SendEmailV2(varRecord.'Tilkynnt af'.Email, "Mál " & varRecord.'Ticket Nr.', 
 "Kæri viðtakandi,<br>



 Mál þitt með beiðnanúmeri " & varRecord.'Ticket Nr.' & " hefur verið úthlutað til " & varRecord.'Úthlutað til'.DisplayName & "<br>

 Málið varðaði: " & varRecord.Title & "<br>



 Kveðja<br>

 UT"));


Navigate(MainScreen, ScreenTransition.CoverRight);

 

Categories:
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @314mp_M0th4 ,

     

    Please use the values that from the Form Controls, rather than from varRecord.

    Office365Outlook.SendEmailV2(varRecord.'Tilkynnt af'.Email, "Mál " & varRecord.'Ticket Nr.', 
     "Kæri viðtakandi,<br>
     Mál þitt með beiðnanúmeri " & varRecord.'Ticket Nr.' & " hefur verið úthlutað til " & 'Úthluta ðtil'DataCardValue.Selected.DisplayName & "<br>
     Málið varðaði: " & TitleDataCardValue.Text & "<br>
     Kveðja<br>
     UT")

     

    Best regards,

  • 314mp_M0th4 Profile Picture
    126 on at

    How do I do that, do I reference the datacard? I tried that but I still get blank.

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @314mp_M0th4 ,

     

    As I did in the previous reply, reference to the Data Card Values, like Text input boxes and Combo boxes in the Form. Besides, I also suspect it's due to part of your formula, so please try below instead, with adjusting the control names to your app:

    Patch('UT Tickets',varRecord, Form1.Updates, Form5.Updates, 
    {'Dags. úthlutað':If(varAssignedChanged ,Now()),
    'Dags. lokið': If(varStatusCompleted, Now()),
    date_onHold_status: If(varStatusOnHold, Now()),
    date_InProgress_status_FSRE:If(varStatusInProgressFSRE, Now())
    }
    );
    
    If(varAssignedChanged, Office365Outlook.SendEmailV2(varRecord.'Tilkynnt af'.Email, "Mál " & varRecord.'Ticket Nr.', 
     "Kæri viðtakandi,<br>
     Mál þitt með beiðnanúmeri " & varRecord.'Ticket Nr.' & " hefur verið úthlutað til " & 'Úthluta ðtil'DataCardValue.Selected.DisplayName & "<br>
     Málið varðaði: " & TitleDataCardValue.Text & "<br>
     Kveðja<br>
     UT")
    );
    
    Navigate(MainScreen, ScreenTransition.CoverRight);

     

    Best regards,

  • 314mp_M0th4 Profile Picture
    126 on at

    I can reference the form field such as this 'Úthlutað til_DataCard4'.DisplayName, but not in the way you do it. I failed to mention the form field is a drop down with single selection and selects a user card.

  • Verified answer
    314mp_M0th4 Profile Picture
    126 on at

    I got it, I have to reference the datacard value field, selected, and information to select like this : DataCardValue58.Selected.DisplayName 

     

    Thanks for your help!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard