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

Select Gallery Item to view Ticket Details

When I select a ticket, which is associated with a gallery called TicketsGallery. The OneSelect event goes to the new screen that views the ticket details.

 Capture.PNG

In the Editor, I am able to see the TicketsGallery.Selected.________. When I run the app itself, the ticket's details dont show and this is due to the error in the picture. Capture.PNG What am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous,

 

I have an icon in the gallery that has the navigating OnSelect value. 

 

Though, I have fixed the problem. What I needed to do was to create a new Gallery and delete my old one for it to work..... Thanks for everyone that commented on this post!

View solution in original post

10 REPLIES 10
Daemagor
Helper II
Helper II

This is what it looks like when you are in the editorThis is what it looks like when you are in the editorThis is what it looks like when you run the AppThis is what it looks like when you run the App

Anyone have an idea why this isnt working?

Anonymous
Not applicable

It is quite hard to understand what problem you are having maybe more screenshots would help to troubleshoot.

 

This is what I understood.

You have 2 screens 

Screen 1 has gallery which shows Tickets.

 

You have an OnSelect which navigates to Screen 2 to show details for selected ticket. Now is this OnSelect inside the Gallery? Because if it is not then TicketsGallery.Selected would not have a value.

 

On your second screen (Ticket details screen) how are you displaying the info? Are you using Form to do it? In second screen if you add label anywhere and write TicketsGallery.Selected.ID (Or any other column) does it display?

 

@Anonymous

 

"You have an OnSelect which navigates to Screen 2 to show details for selected ticket. Now is this OnSelect inside the Gallery? Because if it is not then TicketsGallery.Selected would not have a value."This is the On select for the gallery on screen 1This is the On select for the gallery on screen 1

 

 

 

"On your second screen (Ticket details screen) how are you displaying the info? Are you using Form to do it? In second screen if you add label anywhere and write TicketsGallery.Selected.ID (Or any other column) does it display?"

 

I am displaying the info in a form called TIcket_Details with the datasource correct. In the Item, I have Display_tickets.selected and it will display that error. But when I make a label and have Display_tickets.selected.id works

 

Hi Daemagor,

 

I assume that this documentation about PowerApps Forms could be a reference for you, you could check the part “Build an app from scratch” for more details:
https://powerapps.microsoft.com/en-us/tutorials/working-with-forms/

 

According to your description, I would suggest you use the Navigate function without transferring value from the gallery screen to the detail screen. Just simply navigate from the gallery screen to detail screen.


On your second screen, please set the Display form’s Item property as Gallery1.Selected.


Then when you select an item on the Gallery and navigate to the detail screen, the details of the selected item will be shown on the detail screen.


Please try it on your side and feel free reply if you need more help.

 

Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yamao-msft,

 

That does not work. This is exactly what I have and it's giving me the error I has posted above. I have also stored the selected value into a variable, passed it to the other view and that still doesnt work.

  1. Screen1: Gallery has navigate to Screen2 and sends over stored selected value for more testing
  2. Screen2: Form has the correct datasource and the item is Gallery1.Selected

This does not work.

But like I have said, if I use a label and not a form, Gallery.Selected.____ works.

 

I have no idea why this isnt working, it should be working...

OnSelect value on Screen1 GalleryOnSelect value on Screen1 GalleryDatasource for the Screen2 FormDatasource for the Screen2 FormItem for the Screen2 FormItem for the Screen2 Form

Idk if this makes a diffrence but heres the code for the Item value for the Gallery on Screen1

If(AdminAccess = true,
	If(IsBlank(TextSearchBar.Text), 					
		SortByColumns(
			If(TicketView = "All", 
				Tickets_1, 
				
				If(TicketView = "Waiting",
					Filter(Tickets_1,TicketView in Status.Value),
					
				If(TicketView = "Testing",
					Filter(Tickets_1,TicketView in Status.Value),
					
				If(TicketView = "High", 
					Filter(Tickets_1,New_Priority.Value=TicketView),
							
				If(TicketView = "Medium", 
					Filter(Tickets_1,New_Priority.Value=TicketView),
								
				If(TicketView = "Low", 
					Filter(Tickets_1,New_Priority.Value=TicketView),
									
				If(TicketView = "Critical", 
					Filter(Tickets_1,New_Priority.Value=TicketView),
										
				If(TicketView = "Assigned", 
					Filter(Tickets_1,Worker.DisplayName=UserLoggedIn.Text),
									
				If(TicketView = "A", 
					Filter(Tickets_1,Group.Value=TicketView),
												
				If(TicketView = "B", 
					Filter(Tickets_1,Group.Value=TicketView),
											
				If(TicketView = "C", 
					Filter(Tickets_1,Group.Value=TicketView),
												
				If(TicketView = "D", 
					Filter(Tickets_1,Group.Value=TicketView),
										
				If(TicketView = "E", 
					Filter(Tickets_1,Group.Value=TicketView),
																
				        Filter(Tickets_1, Status.Value=TicketView)))))))))))))),
			"ID", If(SortDescending1, 
				Ascending, 
				Descending)
		),
		 If(IsNumeric(Value(TextSearchBar.Text)),
			SortByColumns(Filter(Tickets_1, ID = Value(TextSearchBar.Text)), "ID", If(SortDescending1, Ascending, Descending)),
	!IsNumeric(Value(TextSearchBar.Text)),
			SortByColumns(Filter(Tickets_1, TextSearchBar.Text in Name.DisplayName || TextSearchBar.Text in Title || TextSearchBar.Text in Worker.DisplayName), "ID", If(SortDescending1, Ascending, Descending))
		)
	),
	If(IsBlank(TextSearchBar.Text),
		SortByColumns(
			If(TicketView = "All", 
				Filter(Tickets_1, Name.DisplayName = UserLoggedIn.Text), 
				
				If(TicketView = "Waiting",
					Filter(Tickets_1,TicketView in Status.Value,Name.DisplayName = UserLoggedIn.Text),
					
				If(TicketView = "Testing",
					Filter(Tickets_1,TicketView in Status.Value,Name.DisplayName = UserLoggedIn.Text),
					
				If(TicketView = "High", 
					Filter(Tickets_1,New_Priority.Value=TicketView, Name.DisplayName = UserLoggedIn.Text),
							
				If(TicketView = "Medium", 
					Filter(Tickets_1,New_Priority.Value=TicketView, Name.DisplayName = UserLoggedIn.Text),
								
				If(TicketView = "Low", 
					Filter(Tickets_1,New_Priority.Value=TicketView, Name.DisplayName = UserLoggedIn.Text),
									
				If(TicketView = "Critical", 
					Filter(Tickets_1,New_Priority.Value=TicketView, Name.DisplayName = UserLoggedIn.Text),
										
					Filter(Tickets_1, Status.Value=TicketView, Name.DisplayName = UserLoggedIn.Text)))))))),
			"ID", If(SortDescending1, 
				Ascending, 
				Descending)
		),
		If(IsNumeric(Value(TextSearchBar.Text)),
			SortByColumns(Filter(Tickets_1, ID = Value(TextSearchBar.Text), User().FullName = Name.DisplayName), "ID", If(SortDescending1, Ascending, Descending)),
			SortByColumns(Filter(Tickets_1, StartsWith(Name.DisplayName, TextSearchBar.Text), User().FullName = Name.DisplayName), "ID", If(SortDescending1, Ascending, Descending))
		)	
	)
)
Anonymous
Not applicable

Just to clarify, when you say that you are navigating to another page through an OnSelect, do you mean for instance you have an icon or label that is clickable in each row of the gallery that is taking you there? Like how by default the gallery has arrows after each entry?

@Anonymous,

 

I have an icon in the gallery that has the navigating OnSelect value. 

 

Though, I have fixed the problem. What I needed to do was to create a new Gallery and delete my old one for it to work..... Thanks for everyone that commented on this post!

View solution in original post

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (46,966)