cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
LaurentF
Level: Powered On

Load powerapps screen based on sharepoint item property value

I would like to create a 3 screens workflow in a sharepoint list.

User1 create the item and fill columns A and B (using Screen1)

Userfill columns C and D  (using Screen2)

User3 fill columns E and F  (using Screen3)

 

I use a specific column named "Step", which is automatically filled with values 1, 2, 3 when User1, User2 or User3 save the form.

 

I would like the right screen to open (in Sharepointintegration.Onedit) depending on the Step value.

 

How can I do that ?

 

Thank you

 

Laurent

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Load powerapps screen based on sharepoint item property value

Hi @LaurentF,

How do you submit your form data (in Screen1, Screen2 and Screen3) within your app? Using Patch function?

I agree with @tchin-nin's thought almost. You could create three separated screens based on the following blog:

https://powerapps.microsoft.com/en-us/blog/separate-custom-forms/

I have made a test on my side, please take a try with the following workaround:8.JPG

 

9.JPG

 

10.JPG

Note: FormScreen2 and FormScreen3 are both duplicated screens from the FormScreen1 (just as mentioned within above blog I provided).

Set the OnNew property of the SharePointIntegration control to following formula:

NewForm(SharePointForm1);
Set(StepValue,1)

Set the OnEdit property of the SharePointIntegration control to following formula:

Set(StepValue,Value(SharePointIntegration.Selected.Step)+1);  /* <-- Step represents the Step Column in your SP list */ 
If(
StepValue=2,
Navigate(FormScreen2,ScreenTransition.Cover);EditForm(SharePointForm2),
StepValue=3,
Navigate(FormScreen3,ScreenTransition.Cover);EditForm(SharePointForm3)
)

Set the OnSave property of the SharePointIntegration control to following formula:

If(
StepValue=1, SubmitForm(SharePointForm1), StepValue=2, SubmitForm(SharePointForm2), StepValue=3, SubmitForm(SharePointForm3)
)

Set the Default property of the TextInput control within the Step Data card in each Edit forms (SharePointForm1, SharePointForm2 and SharePointForm3) to following:

StepValue

11.JPG

Note: Actually, the SPintegration @tchin-nin mentioned is the SharePointIntegration control.

The GIF screenshot as below:Test1.gif

More details about understanding SharePoint forms integration, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/sharepoint-form-integration

More detailsa about customizing SP list custom form, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/customize-list-form

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
tchin-nin
Level 10

Re: Load powerapps screen based on sharepoint item property value

Hi @LaurentF

 

I would use This article to find a similar solution. 

 

Instead of having 3 screens : new / edit / view, you'll have new / editstep2 / editstep3

Then you should have the same king of logic to know which form to navigate to and to submit when the save button is clicked :

 

SharePointIntegration.OnNew : Set(step,1);Navigate(NewScreen,None)
SharePointIntegration.OnEdit : Set(step,SPIntegration.Selected);Switch(step,2,Navigate(EditStep2Screen,None),3,Navigate(EditStep3Screen,None))
SharePointIntegration.OnSave : Switch(step,1,SubmitForm(NewForm),2, SubmitForm(EditFormStep2),3, SubmitForm(EditFormStep3))

 

Théo 

LaurentF
Level: Powered On

Re: Load powerapps screen based on sharepoint item property value

Hi Theo thank you for your answer, I'm going to check today.

In fact what is lacking is information regarding managing Sharepoint items and properties in Powerapps. I didn't find any place where to find synthetic information and learn.

 

Where did you find the "spintegration.selected" stuff ? Even a search on Sharepoint spintegration.selected doesn't bring back relevant articles

 

Laurent

 

Community Support Team
Community Support Team

Re: Load powerapps screen based on sharepoint item property value

Hi @LaurentF,

How do you submit your form data (in Screen1, Screen2 and Screen3) within your app? Using Patch function?

I agree with @tchin-nin's thought almost. You could create three separated screens based on the following blog:

https://powerapps.microsoft.com/en-us/blog/separate-custom-forms/

I have made a test on my side, please take a try with the following workaround:8.JPG

 

9.JPG

 

10.JPG

Note: FormScreen2 and FormScreen3 are both duplicated screens from the FormScreen1 (just as mentioned within above blog I provided).

Set the OnNew property of the SharePointIntegration control to following formula:

NewForm(SharePointForm1);
Set(StepValue,1)

Set the OnEdit property of the SharePointIntegration control to following formula:

Set(StepValue,Value(SharePointIntegration.Selected.Step)+1);  /* <-- Step represents the Step Column in your SP list */ 
If(
StepValue=2,
Navigate(FormScreen2,ScreenTransition.Cover);EditForm(SharePointForm2),
StepValue=3,
Navigate(FormScreen3,ScreenTransition.Cover);EditForm(SharePointForm3)
)

Set the OnSave property of the SharePointIntegration control to following formula:

If(
StepValue=1, SubmitForm(SharePointForm1), StepValue=2, SubmitForm(SharePointForm2), StepValue=3, SubmitForm(SharePointForm3)
)

Set the Default property of the TextInput control within the Step Data card in each Edit forms (SharePointForm1, SharePointForm2 and SharePointForm3) to following:

StepValue

11.JPG

Note: Actually, the SPintegration @tchin-nin mentioned is the SharePointIntegration control.

The GIF screenshot as below:Test1.gif

More details about understanding SharePoint forms integration, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/sharepoint-form-integration

More detailsa about customizing SP list custom form, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/customize-list-form

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

LaurentF
Level: Powered On

Re: Load powerapps screen based on sharepoint item property value

Excellent ! It seems so easy when it's done by an expert 🙂

 

I just have to add a button on the view form, which navigate to the edit form (because at each step, the user view and validate infos filled by the user at previous step).

 

Thank you so much 🙂

 

Laurent

LaurentF
Level: Powered On

Re: Load powerapps screen based on sharepoint item property value

With Powerapps every modification leads to surprises...

 

I wanted the 2nd user to start with a view screen of what User1 has entered, in order to validate it. So I duplicated Formscreen1, renamed to ViewForm1andValidate.

I changed the default mode to "View" and I  added a button (with no action) to ViewForm1andValidate

 

To start easy, I just changed the SharepointIntegration.onview from "Viewform(Createform)" to "Viewform(ViewForm1andValidate)", saved and published.image.png

 

 

But when I click on an existing item in my list, instead of showing the ViewForm1andValidate form in View mode, it shows the ViewForm1andValidate form in edit mode.

And if I click "Cancel" and click on "New item", it shows me also the "ViewForm1andValidate" form in edit mode and not the "CreateForm" (The SharepointIntegration.onnew is still set to "NewForm(CreateForm)")

 

What can happens ? Is there a browser cache issue ?

 

Thank you for any help. I'm stucked ans really disappointed with the complexity of developping with Powerapps. 

 

Laurent

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,580)