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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to use Complex Dat...
Power Apps
Unanswered

How to use Complex Data Fields on Data Cards in Email Body of on button that is generating an email

(0) ShareShare
ReportReport
Posted on by 2

Hi

I have a PowerApp that is bringing and returning data to SharePoint list. I have a submit button. I would like for it to send an email where the email body contains the following fields: 1) Person Picker (DataCardValue4) which will say the name of the candidate applying 2)  two choice fields - one that will list the division (DataCardValue5) and one that will list the region (DataCardValue7) . I keep on getting errors when I try to add these three fields. The error message is about expecting Text or number fields. Any idea on how to convert these fields to text? If I put .Text or .Selected or Selected.Value or Value or DisplayName it still gives me the error. Thanks

The code is:

SubmitForm(EditForm1);

    This is to inform you that a promotions application has been submitted for " & DataCardValue4.Text & "  for the GAP of " & DataCardValue7.Text & " in the Division " & DataCardValue5 & " and Region " & DataCardValue54 & ".
Please click the link below to enter your decision (approval/denial/reviewed packet for completeness/sent back for more information).
    Please enter the name of the person that this is going to next in the form.
    You have 10 Calendar days to make your decision",  {Importance:"High"} 
)

 

 

 

Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,641 Moderator on at

    @pjs16 

    If the data cards are referencing complex fields then the main thing to remember is that these complex fields are actually tables. So, you use the table referencing techniques.

     

    Something like this may work

    First(DataCardValue4.SelectedItems).yourFieldNameHere

     

  • rpersad Profile Picture
    776 on at

    You issue is how you are retrieving your data. Firstly assuming that this is a new form you are submitting the data does not store in the Data Cards after submitting. What you can do however, is retrieve the last submitted record by using the LastSubmit function, which retrieves the last record submitted to the Data Source.

    Set('variable name', 'Form Name'.LastSubmit)

     

    Now you would retrieve the data from the variable. To get the Name of the person selected in the People Picker use the code:

    'variable name.'People Picker Column Name'.DisplayName

     

    For the two choice fields you can retrieve the data by using the code below.

    'variable name.'Choice Column Name'.Value

     

    Tip to convert a value to type text is

    Text(value)
  • pjs16 Profile Picture
    2 on at

    Thanks for all the help everyone. I ended up making concat fields and bought the data back that way and now it works perfectly.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard