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

Multiple collections on OnVisible property of a Screen

Hi,

 

I have multiple collections and it doesn't seem to work as expected.

OnVisible property of the screen is

ClearCollect(rosterList,'[dbo].[vw_RosterDetails]');
ClearCollect(weeklyrosterList,SortByColumns(Filter(rosterList,StartDate <= rosterDatePicker.SelectedDate && EndDate >=rosterDatePicker.SelectedDate),"StartTime",Ascending));
ClearCollect(ItemsGrouped,GroupBy(weeklyrosterList,"Name","StartTime","EndTime","StartDate","EndDate","ContactNo","EmailId","SkypeId","Processes"));
ClearCollect(ConcatenatedProcessNames,AddColumns(ItemsGrouped,"ConcatenatedProcess",Concat(Processes,ProcessName," , ")))

 

It only displays the concatenated process which is the output of the last collection and no other data is displayed.

 

Thanks in advance.

4 REPLIES 4
KrishnaV
Super User III
Super User III

Hi @rsanya,

 

That is expected, when I look at your code I see you are using this onVisible of the screen:

You are using rosterDatePicker.SelectedDate this will be blank always onVisible property of the screen.

ClearCollect(rosterList,'[dbo].[vw_RosterDetails]'); // This should give you result
ClearCollect(weeklyrosterList,SortByColumns(Filter(rosterList,StartDate <= rosterDatePicker.SelectedDate && EndDate >=rosterDatePicker.SelectedDate),"StartTime",Ascending)); // Chnage filter condition
ClearCollect(ItemsGrouped,GroupBy(weeklyrosterList,"Name","StartTime","EndTime","StartDate","EndDate","ContactNo","EmailId","SkypeId","Processes")); // This should work
ClearCollect(ConcatenatedProcessNames,AddColumns(ItemsGrouped,"ConcatenatedProcess",Concat(Processes,ProcessName," , "))); // This should work


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 

 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

@KrishnaV  all the collections gives me the output but at the end it displays result only for the last collection. As in it displays only the processes and no other data.

Hi @rsanya ,

 

I am confused, you are telling me gives output and says only the last collection. may I know what you see when see the collection in view menu?

click on View-> collections -> check eacj collection and see what is the value for each collection.

 

Share me the screenshots to help you better.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Hi @rsanya ,


I just want to follow up with you on this issue to see is it resolved or still you see any challenges.

If you see any challenge/need further help let me know I am always happy to help.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

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