cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ehabzag
New Member

Unrecognized column when Update Gallery field

Hi, 

I have a clone collection "OrderCollection" from "Menu" Data verse Table, with added column "Quantity"

 

 

ClearCollect(OrderCollection, 'Menu');
AddColumns(OrderCollection, "Quantity", 0);

 

 

I have a Gallery with "OrderCollection" DataSource, Quantity is visible in the Gallery.

I need to update the quantity once a button is pressed

Icons.JPG

I am using patch function

 

 

Patch(
         OrderCollection,
          LookUp(OrderCollection, ItemId = ThisItem.ItemId),
          {
              Quantity  : ThisItem.Quantity + 1
          }
)

 

 

But i get the below error message:

 

error.png

 

If i use any other field, it is working perfectly, please help me and let me know what i am missing here.

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-liwei-msft
Community Support
Community Support

Hi @ehabzag 

 

The reason for the problem is that when you use AddColumns the new data is stored in a virtual table.
You can create a new collection to save the data after AddColumns.
Set the Gallery's Items property to the new collection.

vliweimsft_0-1670226902047.png

 

Best Regards,

Levi

 

View solution in original post

2 REPLIES 2
v-liwei-msft
Community Support
Community Support

Hi @ehabzag 

 

The reason for the problem is that when you use AddColumns the new data is stored in a virtual table.
You can create a new collection to save the data after AddColumns.
Set the Gallery's Items property to the new collection.

vliweimsft_0-1670226902047.png

 

Best Regards,

Levi

 

Thanks @v-liwei-msft 

It is now working perfectly

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,245)