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 / How to keep selected d...
Power Apps
Unanswered

How to keep selected dropdown list item when open the app

(0) ShareShare
ReportReport
Posted on by 13

Hi Everyone,

 

I have a problem when i edit a record, the dropdown list field(called USER_NAME_SPS from Onedrive) seems will refresh and get first person name, instead of get the original record from Onedrive(Pictrue 1&2). But the problem only happen on opening the app at first, when i edit another record, the dropdown list field works normally.

 

My dropdown list field is searched by a textinput box, and default the textinput box:Thisitem.USER_NAME_SPS.

And set the dropdown list's item property:Office365Users.SearchUser({searchTerm:TextInput1.Text,top:999}).

 

I tried these ways below, but they are still unworkable. Have any other solution? Thanks.

1. Set the card's default: EditForm1_3.LastSubmit.USER_NAME_SPS(Picture 3)

2. Set the dropdown's default: EditForm1_3.LastSubmit.USER_NAME_SPS(Pictrue 4)

 

Pictrue 1:Edit a record

WechatIMG3.png

 

Pictrue 2:In edit form, USER NAME's dropdown list value is not correct

WechatIMG4.png

 

Pictrue 3:

USER_NAME.png

Pictrue 4:

USER_NAME2.png

Categories:
I have the same question (0)
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Hi  @wusian1203 ,

     

    Your issue came from the LastSubmit property you used on Default property of the dropdown list.

    The LastSubmit property keeps info from the current session of the running app.

    If you check the value of LastSubmit property of your form when the app starts you will receive a empty record.

    With a empty record used as default for DropDown control, you'll get in dropdown the first item from your items property.

     

    I guess that the best way to solve it is to set the Default property of DropDown Control to:  

    First(Office365Users.SearchUser({searchTerm:ThisItem.USER_NAME_SPS}).value).DisplayName

     

    Hope it helps 

  • wusian1203 Profile Picture
    13 on at

    Hi @gabibalaban,

     

    Thanks for your reply.😊

     

    I tried your solution, set the Default property of DropDown Control like this:First(Office365Users.SearchUser({searchTerm:ThisItem.USER_NAME_SPS}).DisplayName).DisplayName.

    (I used DisplayName because I could not use "value", it will have an error message. (Picture 1))

     

    But it is unworkable again, the dropdown list still get first item.

     

     

    Picture 1

    WechatIMG5.png

     

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @wusian1203 

    So sorry, I was in a rush ... It's about Version2 of searchuser:

    First(Office365Users.SearchUserV2({searchTerm:ThisItem.USER_NAME_SPS}).value).DisplayName

     

    If you still want to use SearchUser (my thoughts is that will be deprecated soon), use:

    First(Office365Users.SearchUser({searchTerm:ThisItem.USER_NAME_SPS})).DisplayName

  • wusian1203 Profile Picture
    13 on at

    Hi @gabibalaban 

     

    Sorry for replying late

    I tried this you suggested:First(Office365Users.SearchUserV2({searchTerm:ThisItem.USER_NAME_SPS}).value).DisplayName

    But it still unworkable, the dropdown list still get first item.

     

    So I limited the submit when USER_NAME=fisrt item temporarily, can't submit success until user choose correct item.

    Thanks for your help😊

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @wusian1203 

    Use my formula without .DisplayName at the end.

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @wusian1203 

    Use my formula without .DisplayName at the end ...

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
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard