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

Dropdown default value

I have created a sharepoint list and a dropdown list with 4 values. I would like to set one of those as the default value on the dropdown list. How can I achieve this ?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support
Community Support

Hi @iioannou,

 

Could you please share more details about the error message within your app?

Do you create a SharePoint custom form using PowerApps on your side?

 

I have made a test on my side and don't have the issue that you mentioned. The screenshot as below:4.JPG

 

 

Unlock the Data Card control which contains the Combo box control, then set the Default property of the Combo box control to following formula:

If(SharePointForm1.Mode=FormMode.New,
   {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id: 0,
     Value: "Pending"
   },
   ThisItem.Status
)

I found that there is something wrong with the formula that you provided within the Default property of the Combo box control, please modify your formula as below:

If(SharePointForm1.Mode=FormMode.New,
   {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id: 0,
     Value: "Pending"
   },
   ThisItem.Status
)

Note: Change the ThisItem.Category within your formula into ThisItem.Status

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @iioannou,

 

One more thing, due to my country (CZ) I have to use ; instead of , and ;; instead of ;. So it is possible that you have to replace ; by ,.

P.

View solution in original post

11 REPLIES 11
Memorable Member
Memorable Member

Hi @iioannou,

You have to write in Default column text from SharePoint list that is being displayed as Value for your dropdown.

 

For example I have list - EmailList with two items and other columns and I display Title, where I have Petr as second item so I wrote "Petr" as Default.

DropDefault.png

 

Hope this help.

P.

I tried it but this is what I get... 

Capture11111111.PNG

 

 

Hi, @iioannou

 

You are setting it for whole datacard you have to set it just for dropdown that is part of datacard....

 

DropDefault1.png

 

You have to open it and select only dropdown item.

DropDefault2.png

 

I found a thread that is already trying to achieve you are looking for and it seems like there is solution provided.

Here - https://powerusers.microsoft.com/t5/General-Discussion/Set-default-value-for-a-drop-down-in-a-new-fo...

P.

I tried both what you suggested and what was on the link. nothing worked 😕

What do you use as source of data for your PowerApps? If it is SharePoint list, are those choices as choice column in SharePoint or not?

P.

Yes I am using sharepoint list and those are my choices

 

Pending
In Progress
Processed
Needs Review

 

I want to simply set up as default the Pending

Soso I'm also using SharePoint list in my demo for Category.

Here I have two choices

LAPTOP / PC HW problém
LAPTOP / PC SW problém

 

And in my PowerApp I replaced for Category datacard in form named "CreateTicketForm" the Default Option to this

 

If(CreateTicketForm.Mode = New;{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
   Id:1;
  Value:"LAPTOP / PC SW problém"};ThisItem.Category)

Previously there was only "ThisItem.Category" and the If is updating it to - If there is a Form named "CreateTicketForm" opened in mode New then use as default second item in choice column. In your case in should look like:

 

If(<NameOfYourForm>.Mode = New;{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
   Id:0;
  Value:"Pending"};ThisItem.Category)

PrintScreen

DropDefault3.png

P.

hi @iioannou

 

please be aware about the box type 

you create a ComboBox not a DropDown menu

 

they are different 

 

i agreed with @vecerpa in case you using DropDown menu 

Thank you - I did as per your guidance but I still have an error.. please see the screenshot Capture123123.PNG

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (69,854)