Hello,
Rookie Powerapper!
I have created a Custom SharePoint Form that has multiple edit forms/screens.
Screen | Form |
EditScreen1 | EditForm1 |
EditScreen2 | EditForm2 |
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
Solved! Go to Solution.
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,
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,
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
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
try below code with your options
Refresh('IT Asset Handover Form');
Set (SharePointFormMode, "EditForm");
If(SharePointIntegration.Selected.'Request Type'.Value = "New User",EditForm(newfrom1);Navigate(Newrequestedit,ScreenTransition.Fade),
If(SharePointIntegration.Selected.'Request Type'.Value = "Replacement",EditForm(Replacmentfromedit);Navigate(Replacementedit,ScreenTransition.Fade),
If(SharePointIntegration.Selected.'Request Type'.Value = "Return",EditForm(returnformedit);Navigate(Returnedit,ScreenTransition.Fade))
)
)
That does not seem to work. Did you make it work like this?
User | Count |
---|---|
262 | |
110 | |
98 | |
54 | |
39 |