cancel
Showing results for 
Search instead for 
Did you mean: 

SharePoint Custom List Form: Event

As of now, PowerApps is capable of being able to replace the default SharePoint form (e.g. add, edit, view custom list record).

 

PowerApps--as an SP form--does not refresh or trigger PowerApps events (e.g. Screen.OnVisible, Screen.OnHidden, Screen.OnStart, Form.DataCard.DataCardValue.OnChange). In addition, the PowerApp form--as it exists on the SP view/webpage--does not incur a refresh when SharePoint's close-form action closes the PowerApp form.

 

What this means is that if I'm viewing a SP list for Vendors as a PowerApps form and then navigate to screen2 to view a summary of the vendor's product, and then invoke SharePoint's close-form action to close the form, the PowerApps form's session persists and floats in the background. When I subsequently invoke SharePoint's new-record or attempt to edit a new record, the SharePoint PowerApps form opens up on screen2.

 

A simple solution for this would be to have the PowerApps form restart after SharePoint's close-form action is invoked. The drawback to this would be that the user would experience extra overhead time as the PowerApps form loads.

 

Another solution would be to give PowerApps form-objects an event (e.g. OnRecordChange) for which SharePoint will trigger when it changes the PowerApps form-object from one record to another. PowerApps designers could then simply put a code to Navigate(Screen1, ScreenTransition.None) to resolve this issue.

 

 

Status: New
Comments
Level 8

 

Here is another symptom related to the lack of refresh and lack of SharePoint-related events:

 

For example, I open up my SharePoint custom list view for Vendors, click on a record, and then view the vendor record detail (which opens up a custom PowerApps form). I scroll to the bottom of the form; at which point, I close the form and intend to view another vendor record. I would intuitively expect that when I view another record, it would open up the PowerApps form at the top (e.g. showing the vendor name, etc.). The new record is displayed correctly, but instead of intuitively showing the new record's vendor name, I'm positioned at the bottom of the form--exactly where I left off on my previous viewing.

 

Some possible solutions (to be considered individually, not as an all-inclusive list):

  • There should be an automatic process that kicks the PowerApps form to the top when the record-item changes
  • There should be a new event that SharePoint kicks off when the user views, edits, or create a new record via SharePoint; or OnVisible should be redesigned to include this event
  • PowerApps form objects should have a method that kicks the form back to the top. Intuitively, ResetForm(form1) should do this, but it does not. A new syntax could be introduced, e.g. RepositionForm(form1) or a parameter can be attached to the existing form methods, e.g. ResetForm([object: form object], [optional boolean: reposition form (default: false)]).