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 list default
Power Apps
Answered

Dropdown list default

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All, in my app, there is a dropdown function.

May I ask is there a way to achieve the below, 

 

Default value: ThisItem.ID

Dropdown list: ["A","B","C"]

 

ngct_0-1658492420381.png

 

In this case, I have no much idea where the ["A","B","C"] should be put.

 

Many thanks if you have any idea on this.

 

Categories:
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @Anonymous ,

     

    A dropdown receive a datasource inside its "Items" property and turn it into a list of items you can select.

     

    Your table ["A";"B";"C"] can be considered a datasource, and as such can be put in "Items".

     

    However, your solution may seem more complex than it appears here... Are you sure "ThisItem.ID" will always be either "A", "B" or "C"? 

    A record's ID in SharePoint list is usually a number, which makes me a little worried your dropdown will not give you the result you're expecting.

     

    Could you still try:

    • putting your table inside "Items" property
    • putting "ThisItem.ID" inside "Default" property

     

    We'll be happy to assist if you encounter other difficulties.

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous 

     

    Check the guide shown below:

     

    Gif:

     

    abc_7_22_22.gif

     

    Step by step:

     

    1. In Power Apps Studio, click Input -> Drop down

     

    abc_7_22_22_step1.png

     

     

    2. Items may already appear by default on upper left, but if not, click on the upper left dropdown menu, select Items from the upper left dropdown menu - this is the property of this component, and you want to be on Items right now so you can set this property's value in the next step. If it's already selected it's fine, but you may want to get familiar with how to use this dropdown menu on the upper left so you know how to set up another property for modification in the future.

     

    To do this:

     

    2a. If it's not selected, make sure to select the Control from either the tree view (left side) or by clicking it directly on the screen (right side)

    poweractivate_0-1658494511715.png

     

    2b. Now that the Control is selected, click on the upper left dropdown.

     

    poweractivate_1-1658494606772.png

     

    2c. Now, scroll if necessary in the dropdown, until you find Items and then click on it.

     

    poweractivate_2-1658494715161.png

     

     

     

    3. Now that Items has been selected in the upper left dropdown menu, In the part to the right of "fx", the formula bar, type in ["A","B","C"]

     

    poweractivate_3-1658494767046.png

     

     

    4. ALT+Click the dropdown to live-preview the dropdown, and see your dropdown items successfully there!

     

    poweractivate_4-1658494873251.png

     

     

    Check if it helps @Anonymous 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @poweractivate , thanks for that. 

    However, in your demonstration, the drop down list's default value is "A".

    Is it possible to make the default value as the current value in the data source rather than "A".

    (The current value is: ThisItem.ID)

     

    What I am trying to do is, when the user see this table, it shows the current value from datasource(SQL table), then the users can change the value using this dropdown list.

     

    Thanks.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yes, "ThisItem.ID" will always be either "A", "B" or "C".

    In my case, its not necessarily to be an "ID". 

    Just hoping to have a current column as default value and "A","B","C" on the dropdown list.

     

    • putting your table inside "Items" property
    • putting "ThisItem.ID" inside "Default" property

    The dropdown list can only show "A","B","C" still

    ngct_0-1658495178434.png

    ngct_1-1658495238729.png

     

     

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous 

     

    It should work, because when you put "B" for Default by hard coding it, it will change the initially selected value to B

    poweractivate_0-1658495426960.png

    So what I am thinking now is, are you sure ThisItem.ID gives "A", "B", or "C"?

    If it doesn't, the Default won't have any effect.

     

    For example, I put "Q" as the Default.

    Since it is not "A", "B", or "C", it will do nothing, as below:

    poweractivate_1-1658495514482.png

    It looks like it might be because ThisItem.ID is not giving A, B, or C.

     

    Check it out and see if that's the case.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have tested your method and I think it only works if Default is a hardcode value e.g "B"

    Weirdly, it won't work when I put ThisItem.ID in the Default box (ThisItem.ID is "B")

     

    Works:

    ngct_2-1658496487910.png

    Not Working:

    ngct_1-1658496445644.png

     

     

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous 

     

    In case it helps, here's a sample app, app20.msapp

     

    In mine, ThisItem.ID for Default inside of a Gallery is working for me.

     

    I am using  ThisItem.Value instead due to the simplicity of my Collection, but the principle is the same - this is just an example.

     

    Your issue could be due to any number of things, such as how the Dropdown was placed in the gallery, the data source, the fact that the data source is not actually containing anything in your case, etc. However, in case it helps, you can look at a sample app and import it yourself with a Collection simulating a data source in case it helps.

     

    The app app20.msapp is attached at the bottom of this post.

     

    poweractivate_0-1658496979360.png

     

    poweractivate_1-1658496468735.png

     

    Sample msapp

     

    I have attached a working sample msapp file app20.msapp if you would like to import a full, working example yourself for your convenience.

     

    To use the sample msapp attached, follow these steps:

     

    1) Download the msapp file attached to this post, to Desktop or a folder of your choice, by clicking on it from this post.

    2) Create a new, blank Power App Canvas App

    3) Go to File -> Open -> Browse

    poweractivate_2-1658496524022.png

     

     

    4) Navigate to location of .msapp file from Step 1, select it, and press the "Open" button.

    5) The working example msapp file should load

    6) You can try the app and check the working formula and setup as well in the app and see if it gives you an idea what might be wrong in your app.

    7) Click on Screen2 and back to Screen1 initially once or twice for best results, this is so OnVisible can be triggered so the simulated Collection can be initialized and so you can see the Gallery contents right away.

     

     

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous 

     

    Go ahead and try adding a Label right next to the dropdown in your app inside the gallery,

    and put ThisItem.ID for the Text property. 

    Post a screenshot of what is shown, it may help.

     

  • WiZey Profile Picture
    3,023 Moderator on at

    Just to check, but is your "ID" a text or something else? 

     

    The defaulting may also not work of types are incompatible.

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous 

     

    As @WiZey says, you should check on Default property where you defined ThisItem.ID

     

    I don't know what ThisItem.ID is in your case, but if you are using SharePoint's out of the box ID, then the out of the box ID will actually be a number, it will never be A, B, or C.  If that's the case, the Default set to ThisItem.ID will have no effect.


    Make sure that the actual formula that you have for Default, whether it's ThisItem.ID or anything else, is something that actually returns the value of either A, B or C. Or, you can also change the ["A","B","C"] to be more inclusive of the possibilities of what the "Default" could be.

     

    In my sample app, "ABRACADABRA", notice how sometimes I have letters like "R" in there. Letters like that have no effect and translate to "A" in my sample app because "R" is not "A","B",or"C". Similarly, a number like "1","2","3" or any other number is not "A","B",or"C" and thus you'll see the default staying at "A".

     

    Check if it helps @Anonymous.

     

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 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard