0

I'm using PowerApps to create a custom view form for a modern SharePoint list. I have a Gallery listing items related to the selected list item. Parent / child relationship works great, but I would like the first Gallery item to be selected by default.

This works maybe once the first time. Close (or hide) the view form, select a different list item and view details, first Gallery item (and no other items) are selected.

Does it work differently in SharePoint than stand-alone apps? Tried working with context variables but they seem to lag, they don't seem to get updated properly.

Screen1.OnStart = Clear(Collection1);

Screen1.OnVisible = UpdateContext({X:Gallery1.Selected.ID})

Screen1.OnHidden = Clear(Collection1);UpdateContext({X:Blank()})

Gallery1.Default = First(Collection1);

  • The trigger is probably the problem; OnVisible is just that, on visible, not to be confused with on all form elements successfully loaded... now that would be handy. – BDC604 Jun 5 '18 at 3:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.