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!
Solved! Go to Solution.
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:
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:
Best regards,
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
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:
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:
Best regards,
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,
After I removed the SortByColumns for "Items" of the gallery, it starts to work. Thanks!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
200 | |
179 | |
67 | |
36 | |
33 |
User | Count |
---|---|
341 | |
271 | |
113 | |
73 | |
58 |