6

I have a SharePoint list-integrated Power Apps form. I have a multi-select combobox called DataCardValue4 (which is hidden) that comes from a choice on the SharePoint list.

I need to put the selected values of this combobox into a collection when the form is edited.

On SharePointIntegration, on Edit, I have:

ForAll(DataCardValue4.SelectedItems, Collect(colVehiclesRequested,ThisRecord.Value));

This works fine when the user opens the form and puts it in edit mode manually. Unfortunately, I have a Power Automate flow which gives a link that opens the form in edit mode directly.

When the form is opened in edit mode, DataCardValue4.SelectedItems is empty at the time of SharePointIntegration on edit.

Is there another way to do this? Is there another place to put this further down the lifecycle so it will work properly?

I guess I'm kind of looking for the document.ready version of a Power Apps-integrated form.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Bryan Dellinger
  • 4,724
  • 7
  • 33
  • 79
  • To be clear, you're talking about a SharePoint list form that is customized via PowerApps (e.g. on the SharePoint list page, you click PowerApps -> Customize Form)? Or are you talking about a form built entirely in PowerApps that just connects to a SharePoint list independently (e.g. a canvas-app form – TylerH Nov 30 '21 at 21:50
  • @TylerH that is correct, a SharePoint list form that is customized via PowerApps – Bryan Dellinger Dec 06 '21 at 13:19
  • In that case, I would probably recommend asking this on SharePoint.SE instead, or perhaps even the [Power Apps Forums](https://powerusers.microsoft.com/t5/Power-Apps-Community/ct-p/PowerApps1). It's not super likely you'll find a SharePoint Admin with experience using Power Apps on them here (who is watching these tags, at least). – TylerH Dec 06 '21 at 14:58

2 Answers2

0

I'd try to put your formula into the Screen.OnVisible property with some conditional wrapping. This would make sure it (also) runs when it is opened directly.

mmikesy90
  • 783
  • 1
  • 4
  • 11
0

I had the same issue, I added the code in the App.OnStart

Jona
  • 1