cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OmegaCaesar
Helper I
Helper I

Possible to SubmitForm with Versioning and Content Approval enabled?

I have SP an library with several columns of metadata - notably including these required columns:

  • Multi-person columns
    • The "Owner" columns is one of these
  • Multi-person/group column
  • Keywords
  • Choice columns

I want users to be able select a file for which they're one of the Owners then edit the metadata and submit.

The SP list has Versioning and Content Approval set up and is absolutely critical.

 

The first screen is a pre-filtered Gallery where users select a file for which they're an Owner.  The next screen is a Form linked to the file they selected based on passing the ID from the Gallery to the Form.  Thus the screen initially displays all the metadata currently associated with the file.  The user can then change anything they want and click a button to submit.

 

 

The problem is when I use SubmitForm the metadata in my SP library isn't updated.  For completeness, the code is just:

 

SubmitForm([@Form__Screen_Metadata_Update__Overall])

 

Testing using OnSuccess and OnFail from the form confirms the submission fails.  Any ideas why this might be?

 

Is this because I have Versioning and Content Approval enabled?

 

I'm not sure what screenshots to post to help answer this question.

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User III
Super User III

@OmegaCaesar 

PowerAutomate is the only way to do a check out.  It is supported in the connector, but that action is only available to a flow (as far as I know).

You can certainly call a flow when you go to edit the record that would check it out and in your OnSuccess of the form submit, call a flow to check it in.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

Pstork1
Dual Super User III
Dual Super User III

From what I can tell Checkin and Checkout are not functions available through the SharePoint connector in Power Apps.  They are available in Power Automate.  That's where I've always used them.  But in regular SharePoint if 'Require Checkout' is enabled then you have to check out the file to even do updates to the metadata.

 

Let me know if you have issues with updating the multiple person columns in Power Automate.  I have been successful doing that.  but I thin you should be able to just call Power Automate to check out the file, then do the update in Power Apps, then call power automate again to check the file in.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

9 REPLIES 9
Pstork1
Dual Super User III
Dual Super User III

Versioning and Content Approval do not prevent updating metadata on a document library.  Can you provide more info on the form you are using, how it is bound to the Library/Item, what fields are on the form.  There should be some other reason that it is failing.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
RandyHayes
Super User III
Super User III

@OmegaCaesar 

Something else is causing your form to fail.  Approval and Versioning are all supported in PowerApps and forms.

Have you made any alterations to your form that might be at issue?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
OmegaCaesar
Helper I
Helper I

@Pstork1 & @RandyHayes - thanks for the quick responses!

 

I'm honestly surprised y'all don't think it's related to Versioning & Approval simply because when I want to update a file's metadata in Power Automate, I have to check the file out via the flow to do that.  I was thinking PowerApps would necessitate checking out the file to update metadata as well.

 

I removed several fields from the default form that the users shouldn't ever see or use (where I'm capturing its status in an approval workflow, a few date columns, etc.).  Just for testing purposes, I've made ALL fields optional on the SP side.

Most other changes to the form in PowerApps are ensuring the submit button cannot be clicked until the fields have data in them.

 

PowerApps - Form - Data.jpg

This is the way I've linked the data.  Selected_Document_ID is the document ID for the file selected by the user in the gallery on the previous screen.  I'm confident that's working since all the correct metadata is getting pulled into the fields.

 

I did have to unlock some of the Datacards in order to edit position and size information.  To test if it was those fields I replicated the screen with the form and deleted every field in the form except the 1 I didn't unlock.  I then re-ran the app going through that new screen but I still got a confirmed failure on the form submission.

 

I also verified that the test account running the app has edit access in SP to the file whose metadata I'm modifying.

 

What other information can I give to help diagnose this?

Pstork1
Dual Super User III
Dual Super User III

Versioning and Content Approval alone won't cause an issue.  But let me check on something else.  Is Checkout required enabled in the Library?  That would cause this kind of issue.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
RandyHayes
Super User III
Super User III

@OmegaCaesar 

You're referring to Check out control.  That is different than versioning or approval.

Not sure how that will play for the PowerApp form.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes
OmegaCaesar
Helper I
Helper I

@Pstork1 - yes checkout is required in the library.

@RandyHayes - my mistake.  I equate check out control with approval.

 

If there's a way to check-out then submit and check-in within PowerApps that would be fine by me.  If not, I can use PowerAutomate.  I'm hoping to avoid that simply because I've had difficulty getting multi-person columns to be properly updated when you have to pass person-information from PowerApps to Power Automate to then update SP.

RandyHayes
Super User III
Super User III

@OmegaCaesar 

PowerAutomate is the only way to do a check out.  It is supported in the connector, but that action is only available to a flow (as far as I know).

You can certainly call a flow when you go to edit the record that would check it out and in your OnSuccess of the form submit, call a flow to check it in.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

OmegaCaesar
Helper I
Helper I

@RandyHayes - doing some quick testing, I think you're right!  I verified that when I used my current form on a file which the user had checked out the SubmitForm succeeded.

 

And your solution is MUCH easier than what I've done in the past.  Thank you!  I'll try implementing that and see how it goes.

Pstork1
Dual Super User III
Dual Super User III

From what I can tell Checkin and Checkout are not functions available through the SharePoint connector in Power Apps.  They are available in Power Automate.  That's where I've always used them.  But in regular SharePoint if 'Require Checkout' is enabled then you have to check out the file to even do updates to the metadata.

 

Let me know if you have issues with updating the multiple person columns in Power Automate.  I have been successful doing that.  but I thin you should be able to just call Power Automate to check out the file, then do the update in Power Apps, then call power automate again to check the file in.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,059)