cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
cfebvre
Level 8

Set default Choice for DropDown that references Sharepoint DataSouce in New Form Mode

Hi All,

 

I'm trying to set up a scenario wherein users can save a set of default choices for a New Form across sessions.

The form in question has a Sharepoint List as it's DataSource, and each of the dropdowns refer to a Choice column in Sharepoint.

 

I've already done this for a set of filters that sit outside any form - I created a User Setting List in Sharepoint, and reference that list for specific users in each default field for the drop down. This works perfectly.

 

But when I try to do the same thing in a form, it doesn't work. My formulas don't have any errors, and I tested the formula in a drop down that sits outside the form and it works perfectly fine, but any dropdown inside a form just returns a blank value as the default.

 

In order to get around the 'Expects Record Value' error, I have my app collect the user settings list item, and the default value references this collection - and it says it's a record, so no errors in the formula, however the default value does not show.

 

Here is a screen cap of the section of my app in question, and the formula I'm using fo the default property:

PublicationFormula.pngOne of the specific fields I'm trying to set a Default value to.

 

I've also tried this formula, as another forum post suggested, with no luck. It does not accept '=' :

 

If(
    StoryViewFormName.Mode = FormMode.New,
LookUp(Choices(Acta.Publication), Value = First(NewFormUSerSettings.Result),
    Parent.Default
)
)

 

 

The drop down that says "Ovens and Murray Advertiser" is a dummy dropdown I'm using to test. As you can see it holds the correct value:

Dummy Dropdown outside of form.pngThe dummy dropdown I'm using to debug.

 

And here is the collection I'm referencing:

Referenced Collection.pngThe collection I'm referencing.

 

Keep in mind, I haven't got all the records set up yet for each user, I'm just testing at this stage, so it is an incomplete collection.

 

What has me stumped is that, as I say:

  • I have no errors in the formula.
  • I've converted the values I want to set as default into a Record Value (not Text).
  • And I can reference the collection record in a dummy dropdown outside the form and it works fine.
  • None of the Sharepoint Choice fields have any Default value set in the Sharepoint List itself.

So, what else could be wrong?

Or can a New Form with Sharepoint Choice fields as a Data Source simply not store default values?

 

Cheers in advance.

1 REPLY 1
Eelman
Level 10

Re: Set default Choice for DropDown that references Sharepoint DataSouce in New Form Mode

@cfebvre 

In the Editor, select your drop down, then in the RHS panel click "Edit" and check that "Result" is selected. I've had something similar happen to me when I've replaced input fields with dropdowns inside Forms, PowerApps will sometimes selects its own reference column.

 

Maybe this is the issue?

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,647)