cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ejules
Advocate I
Advocate I

How to set a pre-populated default value of a Dropdown in EditScreen for a SharePoint Choice field?

Hi Everybody,

 

I'm currently trying to simply set the Default value of a Dropdown in an Edit Form (Form is opened and the Dropdown should have a pre-selection). Even though I did extensive research I couldn't find a solution for a Sharepoint choice field (as I don't know how to find the ID's of those choices and how to reference it?

I have the DropDown with the Selections from Sharepoint ("Inland", "Ausland") and would like to be the Default for a blank form to be "Inland".

  PowerApps1.JPGPowerApps2.JPG

 

Thank you so much for your help.

 

Regards,

ejules

76 REPLIES 76

Responded there. Feel free to tag me in the thread in question in the future. 👍

Hi @vwyankee After watching Laura's video and getting most of it to work, I turned to @RezaDorrani 's video here (https://www.youtube.com/watch?v=5dSk5iOgT68&list=PLTyFh-qDKAiEIVlidnhELx5BusnzlDzkR&index=55 ) because the Customer column in my SP List is a choice column, so I wanted to add a combo box drop down for the user to choose the Customer. 

I've tried to intuitively follow Reza's logic but have got stuck on the syntax since there is everything else going on with the many nested formulas. 

My screen looks like this:

GraemeNZ_0-1637828704905.png

The formula I tried to add to allow the user to search on a combination of the Ingredient Name and/or the Customer drop-down is below. The insertion I made is highlighted in yellow. The red line indicates the error underline that PowerApps is giving me.

(The green highlight is the context variable from @WonderLaura which I can use for sorting different columns, but that wasn't working for Customer, I think because Customer is a choice field.)

GraemeNZ_2-1637829148177.png

I would also like to include that if the combo box is empty, show all values.

 

Can anyone help me achieve this? Regards, GraemeNZ

 

 

Responded in the new thread you created - Filter a gallery based on combo box and text input

I had tried this to required cell, but it only lock the cell to the specific choice. When submitting, the error popped up and asking to fill up the cell, which I couldn't do that due to default setting. The text I locked was not considered as data entry but for text view only. Please assist me.

sjb2020
Frequent Visitor

can anyone help I have a form for a sharepoint list which has a choice field called "currency" this looks up the choices from another sharepoint list called "Currency List". I am wanting to default the value to EUR from my currency list which i have connected as a data source to the form and I have used the below formula in the default field but I get the attached error (expected operator) any ideas what I am doing wrong?

 

Lookup(Choices('Currrency List'.Currency Code),Value="EUR")

dynamicsgirl
Frequent Visitor

Looks like this has already been solved, but posting a short video in case it helps anyone else: https://youtu.be/owX2iLAXbQk

 

JeffHamilton
New Member

Add a Collection to "OnStart" of the app. 

For Example:

ClearCollect(RGB,
{
ID: 1,
Value: "RED"
},
{
ID: 2,
Value: "GREEN"
},

{

ID:3,

Value:"BLUE"

}

 

Set the 'Items' value to your Drop Down List Menu to the Collection

For Example;

ITEMS (of drop down list) = RGB.Value

 

In the Drop Down List Menu Advanced Options, set the "AllowEmptySelection" value to 'false' (no quote).

 

This should prevent an empty value from appearing when the app is initialized.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (6,053)