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

Multiple Edit Forms - Opening specific Edit Form based on column value

Hello,

 

Rookie Powerapper!

 

I have created a Custom SharePoint Form that has multiple edit forms/screens.

 

ScreenForm
EditScreen1EditForm1
EditScreen2EditForm2

 

 

I want to open the item selected in SharePoint in the specific Edit Form based on the selected value of a dropdown in our SP List called "Action Type".

 

i.e if Action Type = "01) Start" open EditForm1

     if Action Type = "02) Finish" open EditForm2

 

I thought it would involve some kind of IF statement in the OnEdit Property of the SharePoint integration. I have viewed various similar requests and based on them have cobbled together the code below  in the OnEdit Property but it's not working with any consistency

 

 

 

 

 

Set(SharePointFormMode, "EditForm"); 
If(SharePointIntegration.Selected.'Action Type'.Value = "01) Start",
EditForm(EditForm1),Navigate(EditFormScreen1,ScreenTransition.Fade),
If(SharePointIntegration.Selected.'Action Type'.Value = "02) Finish",
EditForm(EditForm2),Navigate(EditFormScreen2,ScreenTransition.Fade)))

 

 

 

 

 

The first list item picked randomly opens EditForm2 and then all subsequent items selected for edit open in EditForm1 until the SharePoint List is refreshed (F5) and then it performs the same behaviour again.

 

Any help appreciated

 

TBE-JG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Multiple Edit Forms - Opening specific Edit Form based on column value

Hi @JGregson ,

Based on the formula you provided, I found that there is something wrong with your If formula.

 

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

Set the OnEdit property of the SharePointIntegration control to following:

Refresh('Your SP List');   // Add this formula
Set(SharePointFormMode, "EditForm");
If(
   SharePointIntegration.Selected.'Action Type'.Value = "01) Start",
   EditForm(EditForm1);Navigate(EditFormScreen1,ScreenTransition.Fade),
   SharePointIntegration.Selected.'Action Type'.Value = "02) Finish",
   EditForm(EditForm2);Navigate(EditFormScreen2,ScreenTransition.Fade)
)

Note: You should combine the EdirForm(...) function and Navigate(...) function using ";" (semicolon) operator rather than a "," (comma).

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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

1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Multiple Edit Forms - Opening specific Edit Form based on column value

Hi @JGregson ,

Based on the formula you provided, I found that there is something wrong with your If formula.

 

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

Set the OnEdit property of the SharePointIntegration control to following:

Refresh('Your SP List');   // Add this formula
Set(SharePointFormMode, "EditForm");
If(
   SharePointIntegration.Selected.'Action Type'.Value = "01) Start",
   EditForm(EditForm1);Navigate(EditFormScreen1,ScreenTransition.Fade),
   SharePointIntegration.Selected.'Action Type'.Value = "02) Finish",
   EditForm(EditForm2);Navigate(EditFormScreen2,ScreenTransition.Fade)
)

Note: You should combine the EdirForm(...) function and Navigate(...) function using ";" (semicolon) operator rather than a "," (comma).

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

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

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,651)