cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sephiel
Helper II
Helper II

Value "parameter is read only" but it DOES update properly and then fails to continue?

Hey community,

 

I am creating a flow to copy files from one SharePoint library to a separate library, and it works well with simple column data. But some of the column metadata contains multi-select lookup columns. Both the source library and target library point to the same lookup list (they live in the same site). I'm working with my first multi-select lookup called "Protocol Number".

 

No matter what method I try, I get the dreaded "parameter is read only" error when trying to copy the values from one multi-select lookup column to the other one in the separate library. I have read all the posts on the methods - that some people have luck with just putting in the dynamic content as-is in the array input box, and that some people create an array variable separately and populate it with Apply to each and dump in one go.

 

The funny thing is, in my case, both of those methods DO work and update my column properly - but I still get the error, and the flow stops there, and that's not the end of my flow instructions. Can't think of any reason why the column would update properly but still throw the error and I've hit a wall - any ideas? Thanks!

 

Annotation 2021-02-10 153000.jpgAnnotation 2021-02-10 163735.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Sephiel
Helper II
Helper II

Well I bent the ear of the system admin today and we figured out how to solve it in my particular case - which was to simply copy the file! I had not thought that the Copy File API also brought all matching column info by default. So in my case, I was making it too complicated, and didn't need the array variable nor the update file properties.

That said, neither of us could really figure out the root cause of this particular read-only error, but speculated that because the metadata comes from a shared master lookup list existing in the same site, there might be a conflict somewhere in that...perhaps it is grabbing read-only metadata from the lookup while trying to patch, which wouldn't necessarily be there if it was a choice column. Leaves this on a half-baked note, but it's possible that my original process was flawed to begin with!

View solution in original post

5 REPLIES 5
annajhaveri
Super User
Super User

@Sephiel  why do you have the Update File Properties in the apply to each, can you move it outside the apply to each action, and put it below it.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
Sephiel
Helper II
Helper II

@annajhaveri it's actually not in the apply to each but it is within a condition, here's the condensed layout:

 

Annotation 2021-02-11 081808.jpg

@Sephiel , are you updating the properties of the file that is copied by Copy File action, or updating file properties of the current file on which the flow is running?

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
Sephiel
Helper II
Helper II

A mixture of both, I grab the ItemID from the Copy File action because I'm trying to add source column data to the newly copied target file. Then the remaining pieces come from the trigger properties since that is the source item.
This is a bizarre one for me, because appending the array works great, gets the values it needs, and the flow moves on. If the array is empty, flow works great. If I take out the array piece, flow works great. It's only if the array has values in it, which are correct, and which UPDATE the item list correctly, then causes the error and the flow stops.

So I can update all column data if it's not a multiple choice column easily. If create a second update properties step just for the multiple choice column, it still works but throws that error on at the end. If I only had one multiple choice column to update, that would be a good enough band aid to get the job done, but there are 4 multiple choice columns I try to update, and the flow errors out and stops at the first one.

I tried a different flow that only updates the file after it already exists, in case there was a read/write issue with the Copy File action beforehand. Same error. I'm officially stumped!

Sephiel
Helper II
Helper II

Well I bent the ear of the system admin today and we figured out how to solve it in my particular case - which was to simply copy the file! I had not thought that the Copy File API also brought all matching column info by default. So in my case, I was making it too complicated, and didn't need the array variable nor the update file properties.

That said, neither of us could really figure out the root cause of this particular read-only error, but speculated that because the metadata comes from a shared master lookup list existing in the same site, there might be a conflict somewhere in that...perhaps it is grabbing read-only metadata from the lookup while trying to patch, which wouldn't necessarily be there if it was a choice column. Leaves this on a half-baked note, but it's possible that my original process was flawed to begin with!

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA 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

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.

Users online (1,998)