cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SharePointAU
Level: Powered On

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
Level 10

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

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
Level 10

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

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

SharePointAU
Level: Powered On

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

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.

 

 

 

 

Meneghino
Level 10

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

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.

SharePointAU
Level: Powered On

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

 
SharePointAU
Level: Powered On

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

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? 

Highlighted
SharePointAU
Level: Powered On

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

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 92 members 5,376 guests
Please welcome our newest community members: