Office365-REST-Python-Client icon indicating copy to clipboard operation
Office365-REST-Python-Client copied to clipboard

Getting File Version Custom Fields

Open samer1977 opened this issue 1 year ago • 0 comments

Hi Guys,

I know this is all about OData but I search the whole internet and could not find my answer. Its really simple , I just need to get whatever equivalent to the file ListItemAllFields ,ListItemAllFields/FieldValuesAsText but for file version. I tried something like this:


versions = file.versions.expand(["ListItemAllFields","ListItemAllFields/FieldValuesAsText","Fields"]).get()
 ctx.load(versions)
 ctx.execute_query()

but its not returning anything besides the system properties.

For files the following works and I get all fields:

 files = list_source.files.expand(["ListItemAllFields","ListItemAllFields/FieldValuesAsText"]).get()    
 ctx.load(files)
 ctx.execute_query()

Can you please help Thanks

samer1977 avatar Feb 17 '24 17:02 samer1977