cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cyberco01
Post Patron
Post Patron

Powerapps combo box needs to be set on every edit even though value appears on Sharepoint List

I have a combo box in my Powerapps form linked to Sharepoint List. I set the value and save. The value is saved in Sharepoint List. I open for edit and try to save the form - i am asked to re-enter the value in the combo box (as i have set required = true). 

When I select the same value and submit. it gets saved.

Kindly help why I need to enter the value of combo box on every edit. I am stuck with this and I have a review of my application tomorrow.

1 ACCEPTED SOLUTION

Accepted Solutions

Just in case anyone looks for solution :

 

I created a new list item as single text. replaced it with combo box in powerapps form and set the properties as below. This got my combo box working without errors:

 

DefaultSelectedItems set as - LookUp(Distinct(VendorsV2,Name).Result, Result = ThisItem.Title)

Items property set to - Distinct(VendorsV2,Name).Result

Update property of DataCard set to - ComboBox3.Selected.Result

View solution in original post

11 REPLIES 11
SimonPiquer
Responsive Resident
Responsive Resident

Hi!

 

What is the DefaultSelectedItems property of your combobox set to? If it is blank you will start off with a blank Combo Box.

 

 

My DefaultSelectedItems property of combobox set to - {Value:ThisItem.Title}

As of now, when the form is loaded, I get the list of vendors in my combo box.

 

For your analysis:

Update property of datacard set to : ComboBox1.Selected.Name

 

Items property of combo box set to : VendorsV2.Name

Display Fields of combo box set to : ["VendorOrganizationName"]

Search Fields of combo box set to : ["VendorOrganizationName"]

Default property of combo box set to : no value

I've tried it on my side and got it working if I set the DefaultSelectedItems to: 

 

Filter(VendorsV2, Name = Gallery1.Selected.Name).Name

Would that work for you? 

I tried - it is giving error - invalid argument type. Also can you please let me know what refers to Gallery1. 

Sorry, Gallery1 is what I used in my test to navigate to the item I wanted to edit. How do you select what item to edit?

 

Edit: Are you using this in the Sharepoint list? In that case change it to

 

Filter(VendorsV2, Name = ThisItem.Name).Name

 

On using as below and after publish. When i click +New - i get the error on opening the form - "The requested operation is invalid. Server Response: An error has occurred. Object reference not set to an instance of an object. clientRequestId: c9e47f96-4805-458b-a088-25b98d4c43cf"

 

Sorry I am not sure what that could mean. I am not getting any errors if I try to edit or if I try to add a new item. Do you get any errors when you are editing the forms in PowerApps?

 

Sorry if my earlier replies might have been misleading, I missed the fact that you were editing Sharepoint forms and not doing a standalone app. Maybe someone more experienced is able to help you out. 

No i do not get the error in the existing formula i ws using.
Someone from forums kindly help me resolve this issue for me.

 

Hi @cyberco01 

 

Please change the DefaultSelectedItems of your combobox control to Parent.Default and this will select the value automatically.
 
Hope this Helps

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (29,053)