On a SharePoint list where I customized the form using Powerapps:
Anyone knows a way around this ? I would like to do things every time a form is displayed even if I don't refresh the page but just go from one list item to another...
Solved! Go to Solution.
I believe this is a bug and I can reproduce it in my environment. I think I have a work around. I tried this in my environment and it seem to work. Move your variable to the OnVisible property of the screen then add "Navigate(FormScreen1, ScreenTransition.None)" to the OnNew, OnEdit and OnView properties of the SharePointIntegration control.
OnView Example: ViewForm(SharePointForm1); Navigate(FormScreen1, ScreenTransition.None)
By adding the Navigate() it appears to trigger the OnVisible property which will then reset your variable.
@dinusc, @v-monli-msft, @v-xida-msft or @v-micsh-msft,
Can you verify that this is a bug and if so, send it to the product team?
I believe this is a bug and I can reproduce it in my environment. I think I have a work around. I tried this in my environment and it seem to work. Move your variable to the OnVisible property of the screen then add "Navigate(FormScreen1, ScreenTransition.None)" to the OnNew, OnEdit and OnView properties of the SharePointIntegration control.
OnView Example: ViewForm(SharePointForm1); Navigate(FormScreen1, ScreenTransition.None)
By adding the Navigate() it appears to trigger the OnVisible property which will then reset your variable.
@dinusc, @v-monli-msft, @v-xida-msft or @v-micsh-msft,
Can you verify that this is a bug and if so, send it to the product team?
Hi @R3dKap,
Could you please share a bit more about your scenario?
I have made a test and the issue is confirmed on my side.
There are some things to keep in your mind when you customize forms:
"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"
More details about the things that you need to keep in mind when customizing forms, please check the following article:
In other words, the OnStart or OnVisible property could only be fired once when you edited your list (Just when you edit your list firstly), when you clicked the "Cancel" button, it just hide the custom list form rather than close the custom list form.
As an alternative solution, you could consider take a try to initialize/set a global variable within the OnEdit property of the SharePointIntegration control:
Set OnEdit property of the SharePointIntegration control to following formula:
EditForm(SharePointForm1);Set(VariableA,false)
Set the OnSelect property of the Button control to following formula:
Set(VariableA,true)
Best regards,
Kris
Oh boy ! You maide my day ! Thank you so much... It works fine !
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
195 | |
52 | |
41 | |
39 | |
35 |
User | Count |
---|---|
263 | |
86 | |
71 | |
69 | |
66 |