cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NewBee117
Advocate V
Advocate V

Line up the rows in gallery on two different screen

I am trying to use multiple screen to display columns in a gallery that won't fit in one screen. So screen 1 has ID, column B to H,  and screen 2 has ID, column I to Q. If user scrolls to row 88 on screen 1, then navigate to screen 2, the rows are out of alignment, screen 2 still shows from row 1. Page back seems to know the last scroll position. Is there a position variable I can pass along from screen 1 to screen 2. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @NewBee117 ,

Could you please share a bit more about scenario?

Do you use Gallery controls to list your data source records within your two screens?

Further, do you want to locate at corresponding row within your second Gallery when you navigate from your screen1 to your screen2?

 

Based on the issue that you mentioned, I think Default property of your second Gallery could achieve your needs. I have made a test on my side, please take a try with the following workaround:4.JPG

 

5.JPG

 

6.JPG

Within the Gallery1 in Screen1, set the OnSelect property of the ">" icon to following:

Set(CurrentItem, ThisItem);
Navigate(Screen2)

 set the TemplateFill property of the Gallery1 to following:

If(ThisItem.IsSelected, RGBA( 255, 228, 196, 1 ),RGBA(0, 0, 0, 0))    /* <-- Highlight the selected item */

Within the Gallery2 in Screen2, set the Default property of the Gallery2 to following:

CurrentItem

 set the TemplateFill property of the Gallery2 to following:

If(ThisItem.IsSelected, RGBA( 255, 127, 80, 1 ), RGBA(0, 0, 0, 0))   /* <-- Highlight the selected item */

Please check the following GIF screenshot for more details:Test.gif

 

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

7 REPLIES 7
RezaDorrani
Dual Super User II
Dual Super User II

hI @NewBee117 

 

Would be a complex scenario to implement

 

There is a VisibleIndex property in a Gallery which contains the index of the item that is being shown in the current gallery

This cannot be dynamically set

But you could use the Visibleindex property of first gallery to se the default selected row in your second gallery

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

I have "Transition, Visible and Width...", not seeing Visibleindex for the gallery. Where can I find this? Thanks.

v-xida-msft
Community Support
Community Support

Hi @NewBee117 ,

Could you please share a bit more about scenario?

Do you use Gallery controls to list your data source records within your two screens?

Further, do you want to locate at corresponding row within your second Gallery when you navigate from your screen1 to your screen2?

 

Based on the issue that you mentioned, I think Default property of your second Gallery could achieve your needs. I have made a test on my side, please take a try with the following workaround:4.JPG

 

5.JPG

 

6.JPG

Within the Gallery1 in Screen1, set the OnSelect property of the ">" icon to following:

Set(CurrentItem, ThisItem);
Navigate(Screen2)

 set the TemplateFill property of the Gallery1 to following:

If(ThisItem.IsSelected, RGBA( 255, 228, 196, 1 ),RGBA(0, 0, 0, 0))    /* <-- Highlight the selected item */

Within the Gallery2 in Screen2, set the Default property of the Gallery2 to following:

CurrentItem

 set the TemplateFill property of the Gallery2 to following:

If(ThisItem.IsSelected, RGBA( 255, 127, 80, 1 ), RGBA(0, 0, 0, 0))   /* <-- Highlight the selected item */

Please check the following GIF screenshot for more details:Test.gif

 

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

@NewBee117 

 

VisibleIndex property is read only

 

Use it to know the index position of Gallery 1 and accordingly set the Defaul propertyof Gallery 2

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi, Kris, I am not seeing any changes in my 2nd screen. See screenshots attached.

 

Steps I've done:

   1. On screen1, set TemplateFill colors  (works)

   2. On screen1, OnSelect = Set(CurrentItem,ThisItem);Navigate(scr2nd)  (works)

   3. On screen2, setTemplateFill colors (works)

   4. On screen2, set default of the gallery to CurrentItem  (Not working, does not highlight or scroll to the item.)

 

Hi, Reza, I put Gallery1.VisibleIndex in the Default for gallery2, and I got error message "Invalid formula. Expected a value compatible with 'Items'.  See attached screenshot.

 

Hi @NewBee117 ,

Could you please share more details about the formula you typed within the Items property of the Gallery1 and Gallery2?

Are they connected to same data source?

Could you please share a bit more about the CurrentItem variable in your app?

 

I have made a test on my side, and don't have the issue that you mentioned. Please make sure the Gallery1 and Gallery2 are connected to same data source.

In addition, please also take a try to modify your formula as below:

Within Gallery1, set the OnSelect property of the ">" icon to following:

Set(CurrentItem, Blank());
Set(CurrentItem, ThisItem);
Navigate(scr2nd)

 

Set the OnVisible property of the Screen2 (scr2nd) to following:

Reset(Gallery2)

Set the Default property of the Gallery2 to following:

LookUp('YourDataSource', PrimaryColumn = CurrentItem.PrimaryColumn)

Note: The PrimaryColumn represents the Primary column in your data source, which could identify one record uniquely.

 

Please consider take a try with above solution, check if the issue is solved. If the issue still exists, please consider re-create a new app based on your data source, then try above solution again, check if the issue is fixed.

 

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.

After I removed the SortByColumns for "Items" of the gallery, it starts to work. Thanks!

 

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.

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