web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Save a file to Sharepo...
Power Apps
Unanswered

Save a file to Sharepoint and make read only

(1) ShareShare
ReportReport
Posted on by 27

We have a model driven app that users enter information into.

Using that data we want to create a file and save that file to Sharepoint and then using power automate, share that file via an approvals workflow, but the file must be READ ONLY.

 

The original file saved on sharepoint must not be editable.

 

We have built the model driven app.

We have built the approvals flow.

 

We need some ideas about how to create the file using the data from the model driven app (which is stored in Dataverse) and then how to make the file read only when saved on Sharepoint.

 

We already have a canvas app, built into the model driven app, so I'm thinking a new button on the canvas app, that:-

1. extracts the data components and creates a file

2. saves the file to sharepoint

3. Sets a flag to say the file has been created and cannot be created again, without some super user override

4. starts the approval flow with a link to the file on sharepoint.

 

Is this possible, or does anybody have a better solution to offer?

 

Thanks in advance...

Categories:
I have the same question (0)
  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    just wondering what type of file are you creating in sharepoint is it a word doc of some kind?

  • DeadmanWNC Profile Picture
    27 on at

    Yes that's the theory...

    Take a snap shot of the data stored in the record, save it to a word doc or PDF and then send that file to the approval flow.

    We are concerned that the data in dataverse could be changed after it was submitted for approval, plus not all our users have access to dataverse. 

    So putting the data into a word doc, resolves the licence issue.

  • Verified answer
    AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    I see your thought process which does make sense. Have you populated word documents with power automate before? as i feel the best way to restrict the document is by using the template you make to restrict editing. What you describe is possible if you do that. You can also restrict the sharepoint site aswell.

    So essentially if i was you i would first identify my trigger e.g. is it when the dataverse record is created on the model driven app or is it when a certain field says this. (then i would use a when a record is created or modifed trigger) or is it triggered differently.

    next i would build my word template and add all the plain text controls 

    https://tahoeninjas.blog/2020/03/13/generate-word-documents-from-a-template-using-power-automate/

    tahoe ninjas above cover a lot of what you need to know if you are unsure with word templates. 

    for the plain text controls just a tip from me do this:

    AJ_Z_2-1641384793596.png

     

    essentially hide bounding box i think it looks a tad tacky and make the content not editable. then restrict editing for the rest of the template

     

    AJ_Z_3-1641384823751.png

    then populate the doc in flow and save it to a specific place in sharepoint make the site permissions read only / no changes allowed

     

    when the new file arrives use that to trigger the other flow maybe? or trigger the other flow as the next step

    let me know if we are on the same page with this thought process

  • DeadmanWNC Profile Picture
    27 on at

    This looks like it might do the trick - I don't know much about Sharepoint, so I need to find somebody within the organisation that can help, but this is a great help many thanks - so far....

  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    Happy to help 🙂 let me know if there are any further questions

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard