cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft
Microsoft

Combobox loses value upon patch

Hi all,

I have found this problem 'solved' here on the site but I'm unable to take those solutions and apply them to my patch function, which is why I've created this post.

 

Below is a picture of my patch function. It is working in its entirety except the combobox field (Approved Resources, top right) isn't saving the selected values when the save button is pressed (on select = patch, which is the function shown)

 

When I press patch, the values for the other non-combobox fields are saved and a new record is produced below (as intended). Note that my patch function successfully collects the values from the combobox (I can see all selections in my collection), it just doesn't show them in the field (example, "3 selected") when I press my patch button.

 

PATCH.PNG

 

If you have any insight that would be helpful. Thank you!

 

Best,

Steven

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Costanti ,

 

What are the DefaultSelectedItems property and Items property of 'Approved Resources' combo box? Please share them.

I guess the cause of the issue is from the DefaultSelectedItems property since you just patch the selected items to 'Approved' column as Text format.

Please try to modify the DefaultSelectedItems property as below:

 

Filter(<Items property>, 'Resource Name' in Split(Thisitem.Approved,","))

 

Note: just put the code in Items property into <Items property>

Test Result:

Snipaste_2020-03-10_11-55-19.png

Hope this helps.

Sik

View solution in original post

6 REPLIES 6
Super User III
Super User III

The work around I usually do is insert a hiden textbox which picks the value from the combobox. Then patch the Textbox instead of the combobox. Hope this helps

If you like this post, give a thumbs up. Where it solved your issue, Mark as a solution

Thanks! Do you have an example of the function you used?

Assuming you have a Combobox1. Insert a textbox1 and on it default of the textbox1, combobox.Selected.Value.

Then in your Patch formula, refer to Textbox1.Text instead of combobox1.
Community Support
Community Support

Hi @Costanti ,

 

What are the DefaultSelectedItems property and Items property of 'Approved Resources' combo box? Please share them.

I guess the cause of the issue is from the DefaultSelectedItems property since you just patch the selected items to 'Approved' column as Text format.

Please try to modify the DefaultSelectedItems property as below:

 

Filter(<Items property>, 'Resource Name' in Split(Thisitem.Approved,","))

 

Note: just put the code in Items property into <Items property>

Test Result:

Snipaste_2020-03-10_11-55-19.png

Hope this helps.

Sik

View solution in original post

Super helpful!

 

I had no defaultselecteditems property - but here is the items property:

Captureitems.PNG

 

Adding your function into the defaultselecteditems seems to work but when I patch, it adds another item (but that item doesn't seem to be selected?)

 

So when I have 2 items selected and patch, it changes to "3 items." But when I open up the combobox dropdown to see the items I only see the selected 2.

 

Thanks,

Steven

Oh, I misunderstood your response. This totally works! Thank you! 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (36,923)