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

SharePoint List is not loading the correct customized form

I have these customized forms in a SharePoint List:

 

CreateIssueForm (NewForm)

EditAvvikelseForm (EditForm)

EditReklamationForm (EditForm)

EditTillbudForm (EditForm)

EditForbattringForm (EditForm)

ViewAvvikelseForm (ViewForm)

ViewReklamationForm (ViewForm)

ViewTillbudForm (ViewForm)

ViewForbattringForm (ViewForm)

 

The SharePointIntegration:

 

OnNew:

 

 

Refresh(Ärenden);
Set(
SharePointFormMode,
"CreateIssue"
);
NewForm(CreateIssueForm);
Navigate('CreateIssueScreen')

 

 

 

OnEdit:

 

 

Refresh(Ärenden);
Switch(
SharePointIntegration.Selected.Innehållstyp.Name,
"Avvikelse",
Set(
SharePointFormMode,
"EditAvvikelse"
);
EditForm(EditAvvikelseForm);
Navigate(EditAvvikelseScreen),
"Reklamation",
Set(
SharePointFormMode,
"EditReklamation"
);
EditForm(EditReklamationForm);
Navigate(EditReklamationScreen),
"Tillbud och olycksfall",
Set(
SharePointFormMode,
"EditTillbud"
);
EditForm(EditTillbudForm);
Navigate(EditTillbudScreen),
"Förbättringsförslag",
Set(
SharePointFormMode,
"EditForbattring"
);
EditForm(EditForbattringForm);
Navigate(EditForbattringScreen)
)

 

 

 

OnView:

 

 

Refresh(Ärenden);
Switch(
SharePointIntegration.Selected.Innehållstyp.Name,
"Avvikelse",
Set(
SharePointFormMode,
"EditAvvikelse"
);
ViewForm(ViewAvvikelseForm);
Navigate(ViewAvvikelseScreen),
"Reklamation",
Set(
SharePointFormMode,
"EditReklamation"
);
ViewForm(ViewReklamationForm);
Navigate(ViewReklamationScreen),
"Tillbud och olycksfall",
Set(
SharePointFormMode,
"EditTillbud"
);
ViewForm(ViewTillbudForm);
Navigate(ViewTillbudScreen),
"Förbättringsförslag",
Set(
SharePointFormMode,
"EditForbattring"
);
ViewForm(ViewForbattringForm);
Navigate(ViewForbattringScreen)
)

 

 

 

OnCancel:

 

 

Refresh(Ärenden);
Switch(
SharePointFormMode,
"EditAvvikelse",
ResetForm(EditAvvikelseForm),
"EditReklamation",
ResetForm(EditReklamationForm),
"EditTillbud",
ResetForm(EditTillbudForm),
"EditForbattring",
ResetForm(EditForbattringForm)
)

 

 

 

The issue, steps to recreate:

  1. Reload the SharePoint List (page)
  2. Select an item
  3. Click Edit
  4. The NewForm is opened! It should open EditForm!
  5. Close the form
  6. Reselect an item
  7. Click Edit
  8. The EditForm is opened.

I cannot wrap my head around why this is happening, hope someone can help!

 

 

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @Maggan ,

A word of advice - these integrated forms are not designed to do what you are doing, particularly the actions on the inbuilt buttons. I have seen many posts of them not delivering what is expected. I suggest you consider a standalone canvas app - it will work much better.

They were envisaged as a single-screen mechanism to edit/view the selected record or create a new one. 

Hi @WarrenBelz ,

 

What do you mean? My forms are simply New/Edit/View-forms. Why would it not be supported to create/edit/view items through them? The OnNew should open the NewForm and the OnEdit should open the EditForm etc, right? If this doesn´t work, why would Microsoft even bother with creating a possibility for customizing forms? A standalone app is not an option, because it is important to be able to choose an item from the list. 

Hi @Maggan ,

Sorry I missed your response.

Firstly, I am a user like you, so cannot speak on behalf of MS, however I have seen numerous posts (and have experienced it myself) of those in-built controls being modified and not producing the desired results. It seems the more complex the modification, the more likely of something not working. Also the more screens you make seems to affect it.

I have a number of reasonably complex integrated forms, but I only use the inbuilt buttons for the initial screen, which does the "standard" job of viewing/editing the selected SharePoint record. I then use buttons on the forms to send the users to other screens/functions and do what they need to do - I basically treat the rest like a standalone app (and it works fine).

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,624)