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

Using Forall in ClearCollect creates a collection of tables. Need to have them all in a single table

Hi! currently I'm having a problem with this.

I have a gallery with 2 items. each element has a "InicioMinutos" and "FinMinutos" value.
I have a collection of ALL the posible values of "InicioMinutos" and "FinMinutos".

those values are taken from a column "Minutes" in a collection called Times



I want to have a collection of all the Times inbetween InicioMinutos and FinMinutos of each element.

So the collection should contain all the values between InicioMinutos and FinMinutos of the first element and all the values between InicioMinutos and FinMinutos of the second element.

 

This is the code I'm using

 

ClearCollect(Ocupados; ForAll(CalendarEventsGallery1_4.AllItems;  Filter(Times; Minutes >= Value(InicioMInutos.Text) && Minutes <= Value(FinMinutos.Text))))

 

 

And while this works fine, the problem is that it creates a collection of tables with 2 values, one for each element of the gallery.
each table with the same columns, the ones of the Times collection.

I want it to be ONLY 1 table with all the values, since I need to use values from all the elements in the gallery I HAVE to use the forall.

 
 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: Using Forall in ClearCollect creates a collection of tables. Need to have them all in a single table

Solved it using a collect inside forall and not the way it was before.

Since I need to clear the collection first also used clear. Now it looks like these:

Clear(Ocupados2);; ForAll(CalendarEventsGallery1_4.AllItems; Collect(Ocupados2;  Filter(Times; Minutes >= Value(InicioMInutos.Text) && Minutes <= Value(FinMinutos.Text))))

 

View solution in original post

3 REPLIES 3
Highlighted
Resolver I
Resolver I

Re: Using Forall in ClearCollect creates a collection of tables. Need to have them all in a single table

Solved it using a collect inside forall and not the way it was before.

Since I need to clear the collection first also used clear. Now it looks like these:

Clear(Ocupados2);; ForAll(CalendarEventsGallery1_4.AllItems; Collect(Ocupados2;  Filter(Times; Minutes >= Value(InicioMInutos.Text) && Minutes <= Value(FinMinutos.Text))))

 

View solution in original post

Highlighted
Community Support
Community Support

Re: Using Forall in ClearCollect creates a collection of tables. Need to have them all in a single table

Hi @FacundoGorla ,

I'm very glad that you've solved your problem.

Do you have any other problems?

If not, could you change your issue's status to "Answered"?

Thanks!

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Resolver I
Resolver I

Re: Using Forall in ClearCollect creates a collection of tables. Need to have them all in a single table

Oh sorry, I'll change it now.

Since we are already here I have another problem, maybe you can help me.
I need to insert the EventID of a calendar event into an item of a SP list.

The app is basically a calendar management app and it creates the events as a calendar event and as an item of a list.
Is there a way to inmediately take the eventid and put it in the SP list item that is creating almost at the same time?

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,617)