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 / Dropdown value is not ...
Power Apps
Unanswered

Dropdown value is not register my new value for sending email

(0) ShareShare
ReportReport
Posted on by 162

Here is my dropdow from a form:

matthew12333333_0-1654022874584.png

It contains 'Pensions' and 'Pensions - PFI' as value.

There is the code for the email sending action I want to do when a button is clicked:

If(DataCardValue38_2.SelectedText.Value="Pensions - PFI";ForAll('Pensions - PFI';Office365Outlook.SendEmailV2(ThisRecord.Nom;"Nouvelle fiche RA1 Pensions - PFI";"Body"));
ForAll(Pensions;Office365Outlook.SendEmailV2(ThisRecord.Nom;"Nouvelle fiche RA1 Pensions";"Une fiche RA Pensions a été créée ou modifiée. Voici la description courte de la fiche: "&DataCardValue16_2.Text))
)))

But when I change 'Pensions - PFI' to 'Pensions', power apps think that the value is still 'Pensions - PFI' and it's sending a email with 'Pensions - PFI'. How can I do for my app in order to have the value up to date?

Thank you.

 

Categories:
I have the same question (0)
  • Waegemma Profile Picture
    583 Super User 2024 Season 1 on at

    Hi @matthew12333333 ,

    Those three parenthesis at the end don’t belong to this code?

  • Waegemma Profile Picture
    583 Super User 2024 Season 1 on at

    Hi @matthew12333333 ,

     

    another thought: if you replace the If-function with a

    Switch(DataCardValue38_2.SelectedText.Value ....

     

  • matthew12333333 Profile Picture
    162 on at

    There some code not important to show above

  • matthew12333333 Profile Picture
    162 on at

    Still get the value before my modification... Same issue with a datacardvalue (input). I can get the last record added in my sharePoint list but if I want to get my last modification on a existing list, it's impossible for the moment.

  • WarrenBelz Profile Picture
    154,964 Most Valuable Professional on at

    @matthew12333333 ,

    There is something else wrong here - I agree with @Waegemma  - this is a simple test of a drop-down value with branching chosen by the value selected - apart from using Selected (rather than SelectedText which is deprecated) and not needing ThisRecord- all of which is irrelevant to the issue , the code should work as expected

    If( 
     DataCardValue38_2.Selected.Value = "Pensions - PFI";
     ForAll(
     'Pensions - PFI';
     Office365Outlook.SendEmailV2(
     Nom;
     "Nouvelle fiche RA1 Pensions - PFI";
     "Body"
     )
     );
     ForAll(
     Pensions;
     Office365Outlook.SendEmailV2(
     Nom;
     "Nouvelle fiche RA1 Pensions";
     "Une fiche RA Pensions a été créée ou modifiée. 
     Voici la description courte de la fiche: "& DataCardValue16_2.Text
     )
     )
    )

    As a Text, put 

    DataCardValue38_2.SelectedText.Value

    on a label and see what it changes to as you select the items from the combo box.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 514

#2
WarrenBelz Profile Picture

WarrenBelz 419 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 295

Last 30 days Overall leaderboard