cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SharePointAU
Advocate II
Advocate II

Display Drop Down Options In Edit Mode When Saved from Another Data Source

I have an app that needed to have a custom form on "New" submissions. I have accomplished this by using Patch(), and I am using SP lists to populate drop downs in the form. For example I'm using a list of "Members" to populate an "Assigned To" drop down. On save the value is saved to a single line text column.

 

My issue is when the user comes back to edit the form, I cannot figure out how to populate the "Assigned to" drop down. NOTE: the edit menu is using the "edit form." As previously stated the "new" submissions are using "Patch()."

 

The reason I chose to use the "Edit Form" instead of a custom like with "new" is because I needed the users to select from a gallery when they return in order to populate the Edit Form with the correct data.

 

Any advice as to how to make this work? - ALSO, if there is a better way please feel free to let me know.

1 ACCEPTED SOLUTION

Accepted Solutions
Meneghino
Community Champion
Community Champion

Hi @SharePointAU

I normally like to create custom forms, and usually use one form for both new and edit.

Please see here for an example:

https://baizini-it.com/blog/index.php/2017/09/28/powerapps-101-create-your-own-forms/

View solution in original post

6 REPLIES 6
Meneghino
Community Champion
Community Champion

Hi @SharePointAU

I normally like to create custom forms, and usually use one form for both new and edit.

Please see here for an example:

https://baizini-it.com/blog/index.php/2017/09/28/powerapps-101-create-your-own-forms/

This is really good!

I'm actually going to be using this for future templates. I really appreciate it. 

 

But how do you handle drop downs from lookup columns, choice columns, or in my case i'm using another list to populate a drop down. However, when I save it to the list I'm having to save it as a single line of text. So when I got back to edit the form, it doesn't appear that I'm able to use the drop down since the list item only knows the text value of what was selected.

 

 

 

 

Hi @SharePointAU

I am not sure I fully understand the issues you are having with drop downs, but they should work with SP lists as well.

The trick is to use the correct column to display the text (via the Value property), and using the correct expression for the Default property so that the selected choice is shown.  Patching to the list is a bit more complex but there are posts out there on this.

 

I have tried to use drop downs the following ways:

 

1. SP List Column: Choice

    - These do not show up in the list of columns to choose from when adding the data source to the dropdown
    - They I'm only able to populate the drop down with text fields

 

2. SP List Column: Lookup

    - These do not show up in the list of columns to choose from when connecting the drop down to a data source

 

3. Separeate SP List Column: Title

    - I created a list just for these options in the drop down. 

    - I am able to view these options, select the correct one, and use patch to save to the list (as text)

    - I am not able to tell the drop down which option is selected on the current (ThisItem.ID) when editing the form because all the

      selected item has available is the text that was saved.

 

I'm trying to use #3 because it seems like it's the most flexible, and #1/#2 do not seem available.

 

Do you have an example of how you make something like #3 work? 

I have figured this out. I was making it more complicated than it should have been. I was also unaware that PowerApps was smart enough to know the Text matches the Text in a Drop down from a different list.

 

So I have set the drop downs the below, and it works great.

 

If(NewRecord, "Not Started", LookUp(AllTickets.AllItems, ID=AllTickets.Selected.ID, RepairStatus_text))

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,523)