cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

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
Community Support
Community Support

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

2 REPLIES 2
Community Support
Community Support

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

Hi ,

 

i have the same scenario but i have a home page like below , and when we click new from SP it will open this page , and depending on the option it will navigate to the screens 

jaleefpk_0-1602754423333.png

now for edit , i have 3 edit forms and i have added below script on edit property of sp integration but while clicking edit from sp list it end up in opening the home screen

 

Refresh('IT Asset Handover Form');
Set (SharePointFormMode, "EditForm");
If(
SharePointIntegration.Selected.'Request Type'.Value = "New User) Start",EditForm(newfrom1);Navigate(Newrequestedit,ScreenTransition.Fade),
SharePointIntegration.Selected.'RequestType'.Value = "Replacement) Start", EditForm(Replacmentfromedit);Navigate(Replacementedit,ScreenTransition.Fade),
SharePointIntegration.Selected.'Request Type'.Value = "Return) Finish",
EditForm(returnformedit);Navigate(Returnedit,ScreenTransition.Fade)
)

 

please help 

 

@v-xida-msft 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (13,772)