cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Update property error on combobox

Hello,

 

I am trying to do the following and it seems so simple but got stucked. Any help is greatly appreciated. Thanks in advance!

 

  1. I’d like to be able to select an item on “Promo on” (image 1). Based on that selection, it should cascade to combobox “Promo_on_ItemsCategory” (image 2).
  2. If you look at the “Items” property on combobox “Promo_on_ItemsCategory” (image 3), I am trying to use different sql tables(views) based on “Promo on” selection.
  3. Now, I have an issue in “Update” property (image 4). I’m not sure what to do at this point. 

 

 

image1.pngimage2.pngimage3.pngimage4.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Update property error on combobox

My current theory is because each of your SQL tables has a different column name. See post 10. Column names Product, Product_Category and Product_SubCategory should all be the same name your_column_name.

Then the update code would become
ComboBoxPromoItems.Selected.your_column_name

Of course you’d have to update your Switch() function to reflect this as well.

View solution in original post

18 REPLIES 18
Highlighted
Super User III
Super User III

Re: Update property error on combobox

@baller72 

My thought is you are taking the correct approach but you are selecting the wrong field in your Update property.  The highlighted code below is the problem.

 

ComboBoxPromoItemsCategory.Selected.Value

 

Try typing this in the Update property and wait for the auto-populate suggestion to appear.  What do you see?

 

ComboBoxPromoItemsCategory.Selected.

 

Pick the option from the list that makes the most sense

 

img1.png

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

 

Highlighted
Helper I
Helper I

Re: Update property error on combobox

Thanks for replying! There is nothing after selected. No auto-populate.

image5.png

Highlighted
Super User III
Super User III

Re: Update property error on combobox

@baller72 

Is it possible that you are using a Dropdown instead of a ComboBox?  That's what it looks like in Image4.

 

img1.png

 

If you are using a dropdown control the following code should be put in the Update property of the datacard

 

DropdownPromoOn.SelectedText.Value

 

In summary, I think you are using a dropdown control called DropdownPromoOn, not a ComboBox named ComboBoxPromoItemsCategory.

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

Highlighted
Helper I
Helper I

Re: Update property error on combobox

 

@mdevaney 

 

I am using a combobox. 

 

image6.png

Highlighted
Super User III
Super User III

Re: Update property error on combobox

@baller72 

Thank you for confirming that you are using a ComboBox.

 

The next thing I'd like to do is take a look at the data being generated by your code in Image2.  Can you please do the following?

 

1.  Place a button on the Screen temporarily.

 

2.  In the OnSelect property of the button copy the code from your Image2.  Then wrap it in a ClearCollect() funciton.

 

ClearCollect(tempCollect,your_code_goes_here)

 

3.  On the top menu of PowerApps click on File.  Then on the left side menu click on Collections.  Then click on the collection called tempCollect.

 

4.  Take a screenshot of the collection and post it here on the forum.  This will provide more info to me.

 

 

Highlighted
Helper I
Helper I

Re: Update property error on combobox

@mdevaney 

 

Just to make sure; here's what I've done.

 

ClearCollect(TempCollect,
Switch(DropdownPromoOn.Selected.Value,

"Specific Items", Sort('[dbo].[Product_Distinct_Items]', Product, Ascending),

"Categories", Sort('[dbo].[Product_Distinct_Category]', Product_Category, Ascending),

"Sub-category", Sort('[dbo].[Product_Distinct_SubCategory]', Product_SubCategory, Ascending)))

 

 

image7.png

Highlighted
Super User III
Super User III

Re: Update property error on combobox

@baller72 

Normally you would see a table beside the collection name.  To me that's an indication there is no data to populate, usually the result of an incorrect formula.

 

Thanks for also posting your code.  I'm looking now.

 

img1.png

 

Highlighted
Super User III
Super User III

Re: Update property error on combobox

@baller72 

I assume this table in your database is a one-column table with the header being Product_Category?

 

"Categories", Sort('[dbo].[Product_Distinct_Category]', Product_Category, Ascending)

Super User III
Super User III

Re: Update property error on combobox

@baller72 

I feel like the problem could be occuring because the resulting table from your Switch statement could have 3 different column names:

 

"Specific Items", Sort('[dbo].[Product_Distinct_Items]', Product, Ascending),
"Categories", Sort('[dbo].[Product_Distinct_Category]', Product_Category, Ascending),
"Sub-category", Sort('[dbo].[Product_Distinct_SubCategory]', Product_SubCategory, Ascending)

 

Maybe if you renamed the resulting Table's column so that it was always the same name (myColumn) like so...

 

"Specific Items", 
	RenameColumns(Sort('[dbo].[Product_Distinct_Items]', Product, Ascending),
	"Product","myColumn")
"Categories", 
	RenameColumns(Sort('[dbo].[Product_Distinct_Category]', Product_Category, Ascending),
	"Product_Category","myColumn")
"Sub-category",
	RenameColumns(Sort('[dbo].[Product_Distinct_Category]', Product_SubCategory, Ascending),
	"Product_SubCategory","myColumn")

 

You could write this code in the Update property of your Datacard

 

ComboBoxPromoItemsCategory.Selected.myColumn 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (9,832)