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
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

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