cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MichaB12
Helper II
Helper II

display changes in a nested table

Hi,

 

I have a Collection "a" containing a table named "t" (obtained from AddColumn function that return table) which contains a column "result".

 

I have a gallery displaying all rows of collection "a", and inside, another nested gallery to display "t" rows (especially result value)

 

My problem is that I can't figure out how to update all "result" values of the nested table "t" and also how to update the display of the nested gallery.

I think that if I want to update the display I must use a collection or variable as Datasource of the galleryA. But still not sure of what to do with the update.

 

I tried something like: (in a button outside of both galleries)

 

ForAll(

GalleryA.AllItems,
Patch("a", ThisRecord, {t: ForAll(ThisRecord."t" As tRow, Patch(ThisRecord.t, tRow, {result:true}))}));
);

 

The Patch(ThisRecord.t, tRow, {result:true}) is telling me the datasource is invalid. So I guess that data sources can't work like that... But then how can I do this please? 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @MichaB12 :

The key is that we can only perform patch operations on the data source. Because "ThisRecord.t" is just a value, so "Patch(ThisRecord.t, tRow, {result:true})" is invalid.

Best Regards,

Bof

View solution in original post

3 REPLIES 3
MichaB12
Helper II
Helper II

I could fix my problem by not using patch:

 

ForAll(

GalleryA.AllItems,
Patch("a", ThisRecord, {t: ForAll(ThisRecord."t", {result:true} ) ) } ));
);

 

But I am still curious to know why the Patch is not working

v-bofeng-msft
Community Support
Community Support

Hi @MichaB12 :

The key is that we can only perform patch operations on the data source. Because "ThisRecord.t" is just a value, so "Patch(ThisRecord.t, tRow, {result:true})" is invalid.

Best Regards,

Bof

 

 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (2,707)