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 / Drop down list doesn't...
Power Apps
Answered

Drop down list doesn't get data from LookUp function

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

In my app, users can use a drop down list to select a item (control name: ddl_choice_1, items = ["apples", "bananas", "strawberries"])

 

When a user selects an item from the ddl_choice_1  (Example: user selects "apples"), a patch function is used to save the value to a table in the dataverse. 

As long as the user stays in the app, the default value for ddl_choice_1 is LookUp(FruitTable, FruitID = variableID && fruitID = "1", FruitName) and it shows the previously selected choice "apples".

When the app is closed and relaunched, I have a continue screen. When the button is clicked, it sets a variable to the ID stored in the dataverse, and navigates to the screen with the drop down list.  The problem is the drop list never gets the previous choice selected even with the default value set to the LookUp function.  

 

I confirmed that data is loaded into my table, and I even made a table in the app to confirm data loads based on the LookUp on FruitID and can see the previous choices made. 

 

Is there something I am missing in regards to why the drop down list default value does not set my LookUp function?

Categories:
  • eka24 Profile Picture
    20,925 on at

    Have you tried removing &&fruitID =1 from your formula.

    If not what is the purpose of same column FruitID=Variable and FruitID=1.

     

    Also are you sure your variable is fetching the last submitted item? Can you show the code for the variable?

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Do you want users to continue the last operation after clicking the "continue" button.If so,please try:

    1\Set the "continue " button's OnSelect property to:

    Set(continue,!continue) /*continue is my custom variable*/

    Text

    If(continue,"New","Continue")

    2\Set the ddl_choice_1's Default property to:

    If(
     continue,
     Last(Sort(FruitTable,'Modified On',Ascending)).FruitName
    )

     Reference Formula:

    Last(Sort(FruitTable,'Modified On',Ascending)).FruitName

     The function of this formula is to find the value of the FruitName of the last edited record in the FruitTable.

    Best Regards,

    Bof

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard