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 selected Value
Power Apps
Unanswered

Dropdown selected Value

(0) ShareShare
ReportReport
Posted on by 21

Hi Everyone,

 

I have a problem today with value in editform.

 

I want to save some value from edit form to global variables.

 

onselect valid inter.jpg

In card of the editform I use dropdownxxx.SelectText.value to update the record, and this is working fine. 

But when I try to use the same expression (dropdownxxx.SelectText.value) out of the card, the value is empty.

 

I don't understand why, you can see in the first attached picture the value is empty, but when I do it in the update value of the card, I have the good value (see second attached picture).

bcharpentier_0-1665151122443.png

 

Can anyone knows why ?

 

Thank's for reply.

 

 

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @bcharpentier 

    There are some very specific reasons why you are seeing what you are.  They are based on some problems you have in your formulas.

     

    First - the use of SelectedText should be avoided because it is a deprecated property!  You should be referring to your dropdown with Selected.Value (and the use of .Value is completely dependent on the Items property of your dropdown - so it might not be .Value!)

     

    However, that is not where the issue you are seeing comes in.  The problem is that your Submit button should ONLY have this formula in it:  SubmitForm(EditForm2)

     

    In your scenario, you are then navigating and collecting variables (for some reason).  However, how do you know first that the form submitted properly?  So you would be navigating away from the form even if it failed.  This is not a good user experience!

     

    Next, SubmitForm does not "wait".  That means that SubmitForm kicks off asynchronously.  So the rest of the formula may or may not happen after the submit is complete.  Usually SubmitForm is quick, but you cannot rely on it.

    This is why the Form offers an OnSuccess and OnFailure action.  In those actions, you can place the formulas you want to occur in those respective situations. 

     

    Now - the real core of your issue, the Item property of the Form and the mode of the form is going to determine what is actually IN the form after it submits.  So, if that does NOT provide the last submitted record, then your DataCard values will have all reset to the current record (not necessarily the last submitted record - again - depends on your Item and mode).

     

    So, the suggestions are this:

    1 - Change the Submit to:  SubmitForm(EditForm2)  only!

     

    2 - In the OnSuccess action of your EditForm2, set the following formula:

    Set(varCurrentRecord; Self.LastSubmit);;
    
    Navigate(Accueil)

     

    The variable varCurrentRecord will have every value from your form available to you.  So, if you want the Machinerie value elsewhere in your app, then just refer to:  varCurrentRecord.Machinerie  

    Same for others like the Date - Text(varCurrentRecord.Date; ShortDate)

    In other words, there is no need to create so many variables for your data.  It can all be in one and much easier to maintain and easier to type in!

     

    I hope this is helpful for you.

  • bcharpentier Profile Picture
    21 on at

    @RandyHayes  Many thank's for all your explications. 

    Feedback to tell you it works fine, and all of your explication will help me to ameliorate my App.

    Thank's 🙂

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 993

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 545

Last 30 days Overall leaderboard