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 / Set Default value of C...
Power Apps
Unanswered

Set Default value of Choice Dropdown in Edit Form to be equal to an assigned variable

(0) ShareShare
ReportReport
Posted on by 44

Here is the front page of my lab supply ordering app:

 

goldentrophy25_0-1699483684920.png

 

It's intended to be used for three different labs, each gated by their respective permissions.  Each button sets the "SelectedLab" variable to one of "Harry", "Hermione", and "Ron".  Inside the lab supply ordering app, there is a form to add new orders.  During this ordering process, I want to set the "WhichLab" data card of the Edit Form to be equal to the "SelectedLab" variable, and then set its visible property to "False" so that they cannot change the "WhichLab" data card - all so that everything is gated by permissions.  I've attached a picture of my "Add New Order" Edit Form below.

 

goldentrophy25_1-1699483863095.png

 

I am having trouble getting the Default property of the "WhichLab" data card value to be equal to the "SelectedLab" variable that is applied through navigating to the Edit Form.  My WhichLab data card is a Choice column in a SharePoint list.  I was able to accomplish this for the "RequestBy" data card, which has a default value of User().FullName, but I think because the WhichLab column is a Choice column, I am having more issue.  Does anybody know the solution?

Categories:
  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @goldentrophy25 

     

    Set the Default property of the WhichLab data card to

    {Value: SelectedLab}

    The SelectedLab variable should hold a value that matches one of the choices in the WhichLab dropdown. If the variable value doesnt match any of the choices, the dropdown will not have a default value.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • goldentrophy25 Profile Picture
    44 on at

    goldentrophy25_0-1699484536500.png


    This did not do anything for me.  I did run through setting the "SelectedLab" variable again and I am confident that my "SelectedLab" variable matches the choices in the dropdown list.

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    You are using a SharePoint Choice field maybe try this:

    If(
     EditForm1.Mode = FormMode.New,
     LookUp(
     Choices('YourSharePointListName'.WhichLab),
     Value = SelectedLab
     ),
     Parent.Default
    )

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • goldentrophy25 Profile Picture
    44 on at

    goldentrophy25_0-1699485042158.png


    This is also not working.  I included the error message to the right to hopefully assist with troubleshooting.

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Looks like SelectedLab is not  the same type as Value. 

    Maybe you need to specify the Value from SelectedLab:

    SelectedLab.Value

     If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • goldentrophy25 Profile Picture
    44 on at

    That does not resolve the issue either - I end up getting the same exact error.  It would be nice if you were trying these solutions out in a demo test on your end before posting them if they don't end up working correctly...

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    For your information that what I was doing and it is working at my side. 

     

    SpongYe_0-1699486197938.gif

    Reminder we are spending our free time solving problems and not all problems needs to have a demo test.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • goldentrophy25 Profile Picture
    44 on at

    I did not mean to come off as rude - I just felt you were focusing on rapid-fire solutions rather than making sure they are tailor fit to the situation.

     

    I looked over your screen video capture and I don't think this is properly replicating what might be the problematic aspect of my situation which is the SharePoint choice column in an Edit form.  A standalone dropdown with its own "Items" property embedded does not behave the same way.

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

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard