cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to make a recursive menu from Gallery on Screen in PowerApps?

Download.png

Hello. I have a problem of the following nature.

 

I need to click on the menu item to go to the submenu without leaving the current screen. Data obtained from Sharepoint.

 

In Gallery at Items worth the value:

 

Filter(Objects;'Parent'="0")

Download (1).pngDownload (2).png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Anonymous ,

Could you please share a bit more about your scenario?

Do you want to display your Main menu and Submenu within a same Gallery control?

If you want to display your Main menu and Submenu within a same Gallery control, please take a try with the following workaround:

Set the OnSelect property of the Gallery to following:

 

Set(MenuItemSelected, true);
Set(MenuItemID, ThisItem.ID)

Set the OnSelect property of the "Navigate Back" icon button to following:

 

Set(MenuItemSelected, false)

Set the Items property of the Gallery to following:

If(
   MenuItemSelected = false,
   Filter(Objects, 'Parent' = "0"),
MenuItemSelected = true,
Filter(Objects, 'Parent'= Text(MenuItemID)) )

Note: I assume that the 'Parent' column is a Single line of text type column in your SP list.

 

In addition, you could also consider take a try to create a Tablet layout canvas app on your side, then add two Gallery controls within your current screen.

Set the Items property of the Gallery1 to following:

Filter(Objects, 'Parent' = "0")

Set the Items property of the Gallery2 to following:

Filter(Objects, 'Parent' = Text(Gallery1.Selected.ID))

More details about creating a tablet layout canvas app, please check the following article:

https://www.youtube.com/watch?v=qwUt7MagAt4

 

Best regards,

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

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @Anonymous ,

Could you please share a bit more about your scenario?

Do you want to display your Main menu and Submenu within a same Gallery control?

If you want to display your Main menu and Submenu within a same Gallery control, please take a try with the following workaround:

Set the OnSelect property of the Gallery to following:

 

Set(MenuItemSelected, true);
Set(MenuItemID, ThisItem.ID)

Set the OnSelect property of the "Navigate Back" icon button to following:

 

Set(MenuItemSelected, false)

Set the Items property of the Gallery to following:

If(
   MenuItemSelected = false,
   Filter(Objects, 'Parent' = "0"),
MenuItemSelected = true,
Filter(Objects, 'Parent'= Text(MenuItemID)) )

Note: I assume that the 'Parent' column is a Single line of text type column in your SP list.

 

In addition, you could also consider take a try to create a Tablet layout canvas app on your side, then add two Gallery controls within your current screen.

Set the Items property of the Gallery1 to following:

Filter(Objects, 'Parent' = "0")

Set the Items property of the Gallery2 to following:

Filter(Objects, 'Parent' = Text(Gallery1.Selected.ID))

More details about creating a tablet layout canvas app, please check the following article:

https://www.youtube.com/watch?v=qwUt7MagAt4

 

Best regards,

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

View solution in original post

Anonymous
Not applicable

Thank's. Everything works, but not as I would like.

 

Set the OnSelect property of the Gallery to following:

 

Set(MenuItemSelected, true);
Set(MenuItemID, ThisItem.ID)

Set the OnSelect property of the "Navigate Back" icon button to following:

 

Set(MenuItemSelected, false)

Set the Items property of the Gallery to following:

If(
   MenuItemSelected = false,
   Filter(Objects, 'Parent' = "0"),
MenuItemSelected = true,
Filter(Objects, 'Parent'= Text(MenuItemID)) )

Note: I assume that the 'Parent' column is a Single line of text type column in your SP list. 

 

This solution is suitable for me, but I need to save the path when I click on the last attachment and send it to the next screen. Also, when you go to the last attachment, a blank screen opens, and you only need to select the last item with a fill.

 

Best regards,

Andrej Kopp

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (31,065)