cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AT_AlanTse123
Advocate I
Advocate I

Editform not working - Type of DataValue card cannot change from Text input to Drop down menu

Hi all,

I am beginner for develop power apps for retrieve the information from sharepoint list - "Cable" and let user to view detail and enable to edit . It has 3 screens, browse screen, detail view screen and edit screen.

In browse screen, there has the drop down menu for user to choose the cable type. It will filter and shown, user can press to view the detail information( detail view screen).

In Detail view screen, it has the edit button that redirect to edit screen for user to edit screen.

I want to change the location datavalue card from textinput to Drop down menu (yellow highlighted in edit screen photo)for user to choose and then update the list. Is it able?

If OK , how to set the drop down menu?

 

Browse screen:

AT_AlanTse123_0-1660207436942.png

detail view screen:

AT_AlanTse123_2-1660207584468.png

edit screen:

AT_AlanTse123_3-1660207756299.png

 

 

Thank you very much for your help.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@AT_AlanTse123 

  1. Unlock the location card on the Edit form.
  2. Hide the textinput box inside. 
  3. Add a dropdown control that contains the locations, for example named, Dropdown1
  4. You can use either of 3 options for the Items property of Dropdown1
    1. Make a separate list of locations, (I prefer this one as you can then easily add new locations to the list)
    2. Hard code it ["Location1","Location2", etc], or
    3. if you already have all the locations in your list, Sort(Distinct(Cable,Location)).
  5. Make its Default property: Parent.Default
  6. Click on the Card itself and go to its Update Property.
  7. Delete the reference to the textinput box in the Update Property
  8.  Replace it with: Dropdown1.Selected.Value or if you have used option3 above, use Dropdown1.Selected.Result

Your form will now save the selected value in the dropdown to your list when you submit the form. 

View solution in original post

4 REPLIES 4
Drrickryp
Super User
Super User

@AT_AlanTse123 

  1. Unlock the location card on the Edit form.
  2. Hide the textinput box inside. 
  3. Add a dropdown control that contains the locations, for example named, Dropdown1
  4. You can use either of 3 options for the Items property of Dropdown1
    1. Make a separate list of locations, (I prefer this one as you can then easily add new locations to the list)
    2. Hard code it ["Location1","Location2", etc], or
    3. if you already have all the locations in your list, Sort(Distinct(Cable,Location)).
  5. Make its Default property: Parent.Default
  6. Click on the Card itself and go to its Update Property.
  7. Delete the reference to the textinput box in the Update Property
  8.  Replace it with: Dropdown1.Selected.Value or if you have used option3 above, use Dropdown1.Selected.Result

Your form will now save the selected value in the dropdown to your list when you submit the form. 

hi @Drrickryp,

 

Thank you very much for your help. It is work.

 

May i know that when i submit the form, it update the value successfully and back to detail view screen but it will always show that the detail of first item of browse screen, how to fix it? Can i refresh the detail view screen after the form edited?

 

Thank you very much.

Drrickryp
Super User
Super User

@AT_AlanTse123 

If you want the gallery to always show the newest record make its Default property

First(Sort(Cable,ID, Descending))

Ok, thank you very much for your help.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,146)