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

Dropdown value not showing

Hi Reader,

 

I'm having a column called year (which is a single line of text) but from powerapps I've added it as dropdown as shown below

Sharuk_0-1626089636191.png

and updated the items property, update field of the data card and everything is working fine

but when i save the form and try to edit the form in edit mode. the value was not showing in the dropdown as shown below

Sharuk_1-1626089779125.png

it is only fetching the title value but not the year value in the edit form mode. how can we handle this ?

15 REPLIES 15
RusselThomas
Microsoft
Microsoft

Hi @Sharuk  ,

In your edit form you may want to check that the Default: property of the dropdown is set to ThisItem.Year

Kind regards,

RT

Sharuk
Helper V
Helper V

Hi @RusselThomas , thanks for quick reply

the default property was set thisitem.year and it throwed me an error stating that expected record value

RusselThomas
Microsoft
Microsoft

Hi @Sharuk ,

What is the Items: property of your dropdown when people can select a year?

Is it just a list of years in text format? i.e. ["1999", "2000", "2001".....]

If so, then it should work - but if it's something else then you may want to check by collecting the data and taking a look at it.  Just add a button, set it's OnSelect: property to ClearCollect(myDataSource), run/click it and then go and look at the Year column by viewing the collection.  If you see values like 1999 or 2000 in there, it should work.  If you see something else, let me know.

Kind regards,

RT

Sharuk
Helper V
Helper V

Hi @RusselThomas 

my datasource is single line of text in sharepoint 

Sharuk_0-1626092497926.png

 

in powerapps. i've changed the control type to allowed values

Anonymous
Not applicable

I also ran into that issue, and don't recall seeing the issue in the past, but resolved it. I had to add the default value of the card, as the default value of the dropdown.

 

digidot_1-1626199823897.png

 

 

RusselThomas
Microsoft
Microsoft

Hi @Sharuk ,

Hopefully @Anonymous 's solution works for you - I've tried adding my own form, converted Title to Allowed Values, setup the Allowed Values as a list of years and set the default.  Please note, the card Default: property should be set to ThisItem.Year - the dropdown default should ideally be set to Parent.Default and the dropdown should be inside the card as a child of the card in order for the Parent designation to work.

(If the dropdown default is set to ThisItem.Year it should still work, as both the card and the control would be pointing to the same thing for their default, which is fine in this instance - but using Parent.Default on the control sets the control default to the card default and saves you having to look in two places for potential problems.)
On my side, when I submit the form the control retains the newly submitted values as expected.

If it's still not working for you, perhaps you can share the card's AllowedValues: Default: and Update: properties and the dropdown's Items: Value: and Default: properties?

Kind regards,

RT

Anonymous
Not applicable

Hi Russel,

I tried both Parent.Default and ThisItem.something and neither worked which surprised me because it had worked in the past. It is only a problem with dropdowns where I have defined the values in PowerApps and I'm using a text field to store the data in SharePoint. If I'm pulling the values from another source or a SharePoint list it is not an issue.

Digidot

RusselThomas
Microsoft
Microsoft

Hi @Anonymous ,

Maybe I'm misunderstanding the problem, or perhaps you can share more about your example?

In my tests - the only thing I do is override the Allowed Values with my own list of values - everything else remains as per default, and it works as expected...

eg:

Add edit form, connect it to a SPO list - we can use the Title column as our example as it's always single line of text.

Set the Title card input type to "Allowed Values"

Unlock the card and override the AllowedValues: property with your own list of values.  In this case I want years from 2000 to 2050 so I'll just use a Sequence formula to create the list of values for me;  

Sequence(50, 2000, 1)

 That's it.  Add a button to submit the form and test.  This is my result;

ddcomm1.gif

 Kind regards,

RT

Anonymous
Not applicable

Hi Russel,

 

It may be me who has a misunderstanding. What led me to this post is a problem that I was having when I created a form and put it in Edit mode. This form is opened when a user receives and email with the URL to open it. In the form I've two dropdowns that were not populating properly. The default values were set to 1, I tried to change the default value to ThisItem.something, it did not work so I tried Parent.Default and no go.

 

I thought maybe it needed a filter or a lookup since the value is stored in a textbox in SharePoint and no go. When I tried the datacard default, which is new to me it worked. Could this be a bug, or something new?

 

digidot_0-1626267792262.png

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,763)