web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Edit Form - AllowedValues
Power Apps
Unanswered

Edit Form - AllowedValues

(1) ShareShare
ReportReport
Posted on by

I have a powerapp pointing to a sql azure table. 

The editform automatically created has textboxed for my text field which makes sense, but I would like some of them to be dropdowns with a handfull of options to pick from.

 

 

On the right pane you can edit the data elements. I am guessing I should change it to 'AllowedValues', but I can't see how to edit the list of values. Maybe I am way off here, but I can't find anything in the documentation for how to do it within a form control.

 

Please help?

Categories:
I have the same question (0)
  • Verified answer
    CarlosFigueira Profile Picture
    on at

    The 'AllowedValues' card is used when the data source itself knows what are all the possible values (for example, an enumeration column in CDM). You can, however, customize the card to change the text input control to another more suitable for your needs, by unlocking the card.

     

    Let's walk through it... I'll create an app from data from a SQL table that has a property that I want to restrict the values. Here's the edit screen for it:

    01-Form.png

    You can notice that the card has a small "padlock" indicating that it's locked and cannot be changed. With the card selected, click the '...' button and then click 'Advanced options':

    02-ChooseAdvanced.PNG

    Now click the padlock to unlock the card, to be able to change the controls used on it:

    03-UnlockCard.PNG

    You'll see that the padlock on the card name disappeared. Select the control that you want to delete (the text input). You'll notice that the advanced pane shows the control name (in this case, 'DataCardValue7') - take a note of this name as it will make it easier to correct some errors later.

    04-SelectControl.PNG

    Now delete the control. You'll notice that there will be some errors in the card, because that control was referenced by others.

    05-ControlDeleted.PNG

    Now add a new control (Insert -> Dropdown) while the card is selected (so that the control will be added as a child of the card. After adding it, click on the control name, and rename it to the name of the original control (in this example, 'DataCardValue7')

    06-InsertAndRenameDropdown.PNG

    Now go back to the advanced pane and update the 'Items' property to the list of values that you want to allow. Also update the 'Default' value to 'Parent.Default' so that it will show the current value for the record when it's being edited.

    07-UpdateItemsAndDefault.PNG

    Finally, select the card, and change its Update property to get the value from the dropdown. In this case, it's set to 'DataCardValue7.Selected.Value'

    08-CardUpdateValue.PNG

    And now your edit screen only shows the items from the "allowed values" for your scenario.

  • bsmith_itgroove Profile Picture
    39 on at

    This is great, thanks for the start.  I'm going to keep digging on this because I've already got a SQL table with controlled values to select, and want to create a data connection to draw those into the drop-down, rather than trying to update them inside the PowerApp.

  • Brian Dang Profile Picture
    3,976 on at

    Ohhhh so that's what enumeration does! I will have to try it

  • Community Power Platform Member Profile Picture
    on at

    Hi, did you figure out a way to use your SQL table?

  • Community Power Platform Member Profile Picture
    on at

    Hey @Anonymous ,
     
    1. You can import the SQL table into data source. The excel table behaves the same

    EJBriones_1-1654140779489.png

     



    2. Use the table name in the Dropdown's Items Property

    EJBriones_0-1654140749831.png

     

    3. Select the card and change the Update property to TableName.Selected.ColumnName

    EJBriones_2-1654140846059.png

     

    Hope it works

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard