cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dmclaughlin Helper IV
Helper IV

setting a default in a powerapp form for a sharepoint list choice field

I'm trying to set a default for a field in a power app form.  Below is the syntax I'm trying.  Does anyone else have the right syntax?    The field in sharepoint is a choice field with options  choose one, yes, no

4 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: setting a default in a powerapp form for a sharepoint list choice field

@dmclaughlin

I think you are very close here 🙂

 

Please try replacing this code

Value("Choose one")

 

With this code instead

{Value: "Choose one"}

 

If this does not work can you please show a little more of your screen?  I would like to know what property you are putting this code into and what control?  (e.g. ComboBox?)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Super User
Super User

Re: setting a default in a powerapp form for a sharepoint list choice field

@dmclaughlin 

I was working a little bit too fast and gave you the wrong suggestion 😋

 

Clear the Default property of any code and leave it blank


 

Then put this code in the DefaultSelectedItems property of the ComboBox 😁

If(IsBlank(DataCardValue68.Selected.Value), ["Choose one"], Parent.Default)

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

dmclaughlin Helper IV
Helper IV

Re: setting a default in a powerapp form for a sharepoint list choice field

Not sure what you need to see.. this is a snipit of the datacard and the property default and the formula.  

View solution in original post

Super User
Super User

Re: setting a default in a powerapp form for a sharepoint list choice field

@dmclaughlin 

I gave you some revised instructions earlier in the thread.  Here they are again 🙂

 

 

Clear the Default property of any code and leave it blank


 

Then put this code in the DefaultSelectedItems property of the ComboBox 

If(IsBlank(DataCardValue68.Selected.Value), ["Choose one"], Parent.Default)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

14 REPLIES 14
Super User
Super User

Re: setting a default in a powerapp form for a sharepoint list choice field

@dmclaughlin

I think you are very close here 🙂

 

Please try replacing this code

Value("Choose one")

 

With this code instead

{Value: "Choose one"}

 

If this does not work can you please show a little more of your screen?  I would like to know what property you are putting this code into and what control?  (e.g. ComboBox?)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

dmclaughlin Helper IV
Helper IV

Re: setting a default in a powerapp form for a sharepoint list choice field

I'm putting in the default property.

 

Is there a book or anything that documents all of these properties and syntax required?

 

I really appreciate your help

Super User
Super User

Re: setting a default in a powerapp form for a sharepoint list choice field

@dmclaughlin 

I was working a little bit too fast and gave you the wrong suggestion 😋

 

Clear the Default property of any code and leave it blank


 

Then put this code in the DefaultSelectedItems property of the ComboBox 😁

If(IsBlank(DataCardValue68.Selected.Value), ["Choose one"], Parent.Default)

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Super User
Super User

Re: setting a default in a powerapp form for a sharepoint list choice field

@dmclaughlin 

I've just been using the online documentation.  It doesn't answer every question but it does answer many.  Here are my 4 most used resources.

 

Controls & Properties docs.microsoft.com/en-us/powerapp
Formulas
docs.microsoft.com/en-us/powerapp
Delegation
docs.microsoft.com/en-us/powerapp
Delegation (SharePoint)
powerapps.microsoft.com/en-us/blog/sha

 

Your question here was something I had to learn by trial and error...

 

dmclaughlin Helper IV
Helper IV

Re: setting a default in a powerapp form for a sharepoint list choice field

So that last one didn't work... I attached the property and my formula.. anything look wrong to you?

Super User
Super User

Re: setting a default in a powerapp form for a sharepoint list choice field

@dmclaughlin 

Your screenshot looks the same as before.  See my instructions here: https://powerusers.microsoft.com/t5/Building-Power-Apps/setting-a-default-in-a-powerapp-form-for-a-s...

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

dmclaughlin Helper IV
Helper IV

Re: setting a default in a powerapp form for a sharepoint list choice field

Not sure what you need to see.. this is a snipit of the datacard and the property default and the formula.  

View solution in original post

Super User
Super User

Re: setting a default in a powerapp form for a sharepoint list choice field

@dmclaughlin 

I gave you some revised instructions earlier in the thread.  Here they are again 🙂

 

 

Clear the Default property of any code and leave it blank


 

Then put this code in the DefaultSelectedItems property of the ComboBox 

If(IsBlank(DataCardValue68.Selected.Value), ["Choose one"], Parent.Default)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

dmclaughlin Helper IV
Helper IV

Re: setting a default in a powerapp form for a sharepoint list choice field

You  have been a life saver

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (8,105)