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

How to insert multiple records in a collection where one of the columns is Screen Names.

Good day.

I am trying to build a collection from OnStart which stores CompanyName, MenuType and then the screen value (as used in the navigate command). Based on some reading that I have done I should be able to do this as follows:

Collect(Col_ScreenNavigate,
	{CompanyName : "Company1" , MenuType : "NewStaff" , Screen : SCR_1},
	{CompanyName : "Company2" , MenuType : "NewStaff" , Screen : SCR_2})

The issue seems to be specifically linked to trying to insert more than one record. If I only insert 1 record it works fine, I have even tried consecutive collect statements separated by semicolon but this also does not work so it seems that a collection can not have more than one screen name stored in it unless it is save as text. The reason for this collection is that I want one central place where I can control the navigation of multiple buttons so that when I add records I do not need to update each button.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi yes I tried this but still got an error. I have now found the issue, I realised that in the actual app one record was storing the navigation to a screen and the second record was storing the navigation to a form. When I fixed this and made them both screen records everything worked. 

View solution in original post

2 REPLIES 2
JordanDeVan
Advocate I
Advocate I

I don't see why this wouldn't work. I copied this and pasted it in my app and it seems to work. Have you tried exiting the editing session and coming back in?

Hi yes I tried this but still got an error. I have now found the issue, I realised that in the actual app one record was storing the navigation to a screen and the second record was storing the navigation to a form. When I fixed this and made them both screen records everything worked. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,417)