cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kouliscon
Helper V
Helper V

SharePointIntegration different forms questions - onboarding / offboarding

Hello all,
 
I am working on a SharePoint list for Onboarding and Offboarding of employees.
 
I am using the SharePoint integration form and what I am trying to achieve is:
 
  1. NEW -> dropdown to select “OnBoarding” or “OffBoarding”
  2. Based on the selection of “onboarding” or “offboarding” it takes you to complete different fields

 

Here is what I currently I have (my screens) for SharePoinIntegration:

Screenshot 2020-10-12 135645.png

 

I would like some assistance with the:

 

  1. “OnNew"
  2. “OnCancel”
  3. “OnSave”
  4. “OnEdit”
  5. “OnView”

 

in order to achieve:

  1. "OnNew": as mentioned based on selection "onboarding" or "offboarding" to complete different fields and the form to close
  2. "OnCancel": to just close the form
  3. "OnSave": based on the selection "onboarding" or "ofboarding" to save the completed fields
  4. "OnEdit" if the selected raw is "onboarding" then to edit the "onboarding fields
  5. "OnView" : if the selected raw is "onboarding" then to view the "onboarding fields

 

thank you in advance

 

3 REPLIES 3
FabianAckeret
Solution Sage
Solution Sage

@kouliscon 

 

It's difficult to achieve that on the New button as you just have 1 Power Apps form per list. You could build your own New link to create a new entry in Power Apps and pass along your own parameters (such as your content types). However, with the ootb New button from SharePoint it's quite difficult to do that (hint: SPFx extension could help with that).

However, to edit existing items it's easy to switch between 2 forms. To do that, follow below instructions:

 

Step 1

If you'd like to adjust your New Button in SharePoint, you'd need to create so-called Content Types. There are a lot of videos/blogs on this topic. 

Simply create one, add it to your list and find out its ID before going to step 2

 

Step 2

Go to your FormNewOffboard/FormNewOnboard's Visible property and add the following:

 

 

// FormNewOffboard
If(FormNewOffboard.Selected.'Content type'.Id = "<content type id>",true,false)

// FormNewOnboard
If(FormNewOnboard.Selected.'Content type'.Id = "<content type id>",true,false)

 

 

This will hide the form based on the button you clicked. Perhaps it would make more sense to simply have ONE EditForm and show/hide fields based on the Content-Type. It would make your app faster, and less difficult to administer. 

 

And my suggestion would even be to have 2 lists instead. One for onboarding and one for offboarding. This way you could achieve everything you want, without cluttering your Onboarding list with fields only the Offboard list needs. And the other way around...

 

Let me know what you think.


Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.


Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.

thank you @FabianAckeret  for your reply.

 

I did look a bit about the "New Button in SharePoint, you'd need to create so-called Content Types" and it seems challenging...

 

concerning the forms, I made in past a SharePoing Integration three forms I followed the below instructions: 

 

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

 

so I was thinking somehow to integrate them..

 

do you have any good link for what you mention of the "New Button in SharePoint, you'd need to create so-called Content Types?"

 

thank you

Hi @kouliscon 

 

Sure.

This link should help you to create a content type and add it to your list. When adding the content type, make sure to select Item as the parent content type.

 

Kind regards,


Please click Accept as Solution if my post answered your question. Like my answer? Consider giving it a Thumbs Up. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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.

Users online (3,095)