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
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
it is only fetching the title value but not the year value in the edit form mode. how can we handle this ?
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.
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.
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?
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.
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...
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;
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?