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

Update File Properties - Dynamic Document Library - Property setting for Runtime Library Variable

Hi,

 

Am having issues using Update file properties as follows. Say I have an existing data coming from either a list / document library / etc with custom columns ColA, ColB

 

ColA ="Fred"

ColB = "Bloggs"

 

This gets added to a created file.

 

I need to add these as metadata to a library, and the library must be set at runtime, simply because it is set based on certain actions in the workflow, meaning that the file could end up in any of say 50 libraries in a site. The library name at runtime is included in a variable:

 

TargetDocumentLibrary

 

So, I need to use Update File Properties to update the properties of the created file.

 

Against an explictly set library at design time allows me to set the relevant properties (columns); so I am able to assign the above variable content accordingly. This means I use Library Name and select from its drop down list. For example:

 

uploadfileprops0.gif

 

But. If I set the library name so TargetDocumentLibrary (which has the correct named library because I was able to use Create file using that variable) then the action looks like this:

 

uploadfileprops1.gif

 

No column names - I can only set ID! Where is the possibility of setting specific metadata on the library name. Using the other method would mean me having to set 50 conditionals - not wise!!!

 

Please help.

 

Regs

 

Geoff

 

4 REPLIES 4
v-bacao-msft
Community Support
Community Support

Hi @GeoffE,

 

As mentioned in the error message, it is not possible to use the variable to configure the Library Name field.

Here you need to specify the Library Name, or at least a fixed value, not a Variable.

Because the action in the connection needs to get the corresponding field through the Library.

Another workaround is to update the properties of the file through Send http request to SharePoint, but considering that different libraries have their own properties and too many case, it is quite difficult to operate.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the info.

 

Neither of these are solutions am afraid. Seems that MS flow lacks the basic functionality to target a document library at runtime, pretty fundamental if a document library needs to be targetted based on a condition which can only be set at runtime. Its pretty unconstructive and impractical to construct a 50 level deep condition for each library. 

 

I've noticed some uservoices on this one so I'll tag my comments.

 

Regs

 

G

Anonymous
Not applicable

Hi, 

 

I have the same issue, i think there is now not a solution for this problem. Still reusable workflows are still not really supporterd. I made a template and copied it for every library 😞

DanyElHoyek
Advocate IV
Advocate IV

I am pretty late on my reply here, using the update action still lack this functionality. You can find an alternative by using  "Send Http request to SharePoint" to update the document needed. Something as:

 

SendHTTPRequest.png

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,219)