Hi, hope you are doing great!
I am working on a PowerApps. I am using a ‘Gallery’ to capture information filled by user.
+ Button at right top, makes gallery visible and can further add more rows by clicking on + button.
Formula on 'On Select' property of + button -
Collect(
NewCollection,
{
CItemSerialNumber: Text(Last(NewCollection).CItemSerialNumber + 1),
drpActionItem: "",
txtOtherActionItem: "",
txtDescription: "",
drpStatus: "",
txtNotesActionTaken:"",
txtClosureOwnerName: "",
dteClosureDate: ""
}
)
Requirement : Gallery size is static. After clicking on + button, gallery is visible at bottom. If, user has to add more rows that gallery looks crowded with lot of info.
Need to make gallery size dynamic. So, once user clicks than gallery should appear on top of main screen.
Appreciate your help to achieve dynamic gallery size.
Hi @AJ_vizMan ,
You can use context variables to change the Gallery position. So:
1. OnSelect of the add button:
UpdateContext({GalleryY: A Y axis value for the Gallery you want to put, GalleryH: A height value for the high Gallery})
2. OnSelect of the Cancel and Save button, add the following formula after your original formula:
UpdateContext({GalleryY: The Y axis value of the Gallery's current position, GalleryH: The height value of the short Gallery})
3. Set Y axis of the Gallery to GalleryY
4. Set Height of the Gallery to GalleryH
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.