You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[!TIP] This formula pattern ( ... SharePointDatasourceName.Selected ) works for the Item property of a form. See the customization section below for a formula pattern to set the value of a SharePoint record.
45
+
* **OnSuccess** - Once the item is created or saved successfully, the form is reset and SharePoint hides the form.
46
+
47
+
```powerapps-dot
48
+
ResetForm(SharePointForm1); RequestHide()
49
+
```
44
50
45
51
* **SharePointIntegration** - The control responsible for communicating user actions between SharePoint and Power Apps.
46
52
@@ -99,7 +105,6 @@ The **SharePointIntegration** control has the following properties:
99
105
## Customize the default form
100
106
Now that you have a better understanding of the default generated form and the **SharePointIntegration** control, you can change the formulas to further customize the forms. Here are some things to keep in mind when you customize forms:
101
107
102
-
* To create separate custom experiences for creating, showing, or editing an item, set the **OnNew**, **OnView**, or **OnEdit** formulas of the **SharePointIntegration** control to set variables or navigate to different screens.
103
108
104
109
* Use the **OnSave** formula of the **SharePointIntegration** control to customize what happens when a user clicks or taps **Save** in SharePoint. If you have multiple forms, make sure to submit the changes only for the form currently being used.
105
110
@@ -112,6 +117,26 @@ Now that you have a better understanding of the default generated form and the *
112
117
113
118
* The properties for the **SharePointIntegration** control may not be available in **OnStart** or **OnVisible**, and those events execute only once while the list is loaded. You can use **OnNew**, **OnView**, or **OnEdit** formulas to run logic before the form is shown to the user every time.
114
119
120
+
## Commonly identified issues in working with the Sharepoint Integration Object
121
+
The SharepointIntegration.Selected value, when set to a Collection on the OnView property, does not show the latest value. The recommended way to fix this is to use the SharepointIntegration.SelectedListItemID and then do a lookup on the table to get the selectedRecord.
122
+
sample:
123
+
124
+
### OnView:
125
+
126
+
* Instead of :
127
+
```powerapps-dot
128
+
Set( selectedItem,
129
+
SharePointIntegration.Selected );
130
+
```
131
+
* Use:
132
+
```powerapps-dot
133
+
Set( selectedLookupItem,
134
+
LookUp( testSharepointIntegrationObject,
135
+
ID=SharePointIntegration.SelectedListItemID ) );
136
+
```
137
+
138
+
Collection Variables are not reset on closing the PowerApp form and the state is persisted for the entire session. Therefore if there are any use-cases where the variables need to be reset, clear the variables in the OnView property of the sharepointIntegration Object.
139
+
115
140
### See also
116
141
117
142
- EditForm, NewForm, SubmitForm, ResetForm, and ViewForm functions - [form functions in Power Apps](functions/function-form.md)
0 commit comments