Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Value ComboBox in editable table changes unintentionally to value of first item



I created an editable table TrainingCatalogue based on the following article:

But now I have some issue with one of the columns (TrainingProvider) which is a combobox and refering to another table (TrainingProviders).

Without changing anything the value of different records is changed to the one of the first record.

Can someone tell me what I did wrong?



Properties of the ComboBox:

Items: ShowColumns('[dbo].[TrainingProviders]',"ProviderName","ProviderID")

DefaultSelectedItems: Filter('[dbo].[TrainingProviders]',ProviderID=ThisItem.Provider)

SelectMultiple: False

OnChange: Patch('[dbo].[TrainingCatalog]', ThisItem,{ Provider: cmbTrainingProvider.Selected.ProviderID })

I also tried based on

Patch('[dbo].[TrainingCatalog]', LookUp('[dbo].[TrainingProviders]',ProviderID=ThisItem.Provider),{ Provider: cmbTrainingProvider.Selected.ProviderID }) -> error -> invalid argument type (Number).Expecting a Record value instead.

You can find some printscreens attached.


Not applicable

Hi @ThomasVDS 


It looks like Provider is a lookup field. If so, you need to update provider as:



{ Provider: {
'@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: cmbTrainingProvider.Selected.ProviderID,
Value: cmbTrainingProvider.Selected.TEXT // THE FIELD VALUE TO UDPATE


Also one more point, try using the ID (sharepoint ID) while updating record





@AnonymousThank you for your reply.

FYI, I am using SQL azure db as datasource.

TrainingID is the primary key of the TrainingCatalog table.

Do I need to add the TrainingID into the Patch formula?

In the TrainingProvider column I show the ProviderName, but I also have the ProviderID which is the foreign key from the TrainingCatalog table.



Not applicable

Hi @ThomasVDS 


Use TrainingID as it is key column in patch formula.



Community Support
Community Support

Hi @ThomasVDS ,

Could you plase share a bit more about the "Provider" field in your [dbo].[TrainingCatalog]' table? Does it reference values from the ProviderID TrainingCatalog table?


Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:

Set the Items property of the TrainingProvider ComboBox (cmbTrainingProvider) to following:


Set the DefaultSelectedItems property of the ComboBox to following:

   ProviderName: LookUp('[dbo].[TrainingProviders]', ProviderID = ThisItem.Provider).ProviderName


LookUp('[dbo].[TrainingProviders]', ProviderID = ThisItem.Provider)


Set the OnChange property of the ComboBox to following:

Patch('[dbo].[TrainingCatalog]', ThisItem, { Provider: cmbTrainingProvider.Selected.ProviderID})


Patch('[dbo].[TrainingCatalog]', LookUp('[dbo].[TrainingCatalog]', TrainingID = ThisItem.TrainingID), {Provider: cmbTrainingProvider.Selected.ProviderID})

Please take a try with above solution, check if the issue is solved.


Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msftI tried your suggestions but without luck

The Provider column in the TrainingCatalog table is a foreign key refering to the ProviderID in the TrainingProvider table (I am using SQL azure)


It seems that the issue is not caused by the Patch function in the on select property.

When I consult the screen with the grid and start scrolling down (even in disabled mode) theProvider column starts on updating and changing incorrectly the values. So could the issue be in the defaultSelectedItems property?

I also noticed that the records not always change to the one of the first record. I don't see the logic behind it.

It is strange to see.


Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,918)