Display Retention Expiration in SharePoint Document Library Column

%3CLINGO-SUB%20id%3D%22lingo-sub-1872516%22%20slang%3D%22en-US%22%3EDisplay%20Retention%20Expiration%20in%20SharePoint%20Document%20Library%20Column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1872516%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Everyone!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20used%20to%20use%20Content%20Type%20to%20drive%20retention%20for%20our%20documents%20but%20moved%20away%20from%20that%20and%20now%20use%20the%20Retention%20Label%20options%20in%20SharePoint%20so%20that%20staff%20can%20assign%20the%20correct%20retention%20policy%20for%20a%20document%20in%20a%20SharePoint%20Library.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20we%20used%20the%20Content%20Type%2C%20there%20was%20an%20Expiration%20Date%20column%20that%20would%20display%20the%20expiration%20date%20for%20each%20file%20in%20the%20library%20and%20the%20user%20could%20sort%20on%20that%20column.%26nbsp%3B%20Unfortunately%2C%20the%20Retention%20Label%20option%20does%20not%20have%20an%20expiration%20date%20column%20to%20display.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20only%20have%202%20retention%20labels%20for%20staff%20to%20choose%20from%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20Business%20General%20(delete%20file%20after%205%20years%20from%20the%20last%20Modified%20Date)%3C%2FP%3E%3CP%3E2.%20Contractual%2FLegal%20(delete%20file%20after%2010%20years%20from%20the%20last%20Modified%20Date)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20thinking%20that%20I%20could%20add%20a%20calculated%20column%20to%20hold%20the%20expiration%20date%20and%20display%20it%20to%20the%20user%20in%20the%20SharePoint%20Library.%26nbsp%3B%20Unfortunately%2C%20a%20calculated%20field%20cannot%20reference%202%20fields%20to%20come%20up%20with%20the%20value.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20Retention%20Label%20equal%20%22Business%20General%22%20add%205y%20to%20Modified%20Date%3C%2FP%3E%3CP%3EIf%20Retention%20Label%20equal%20%22Contractual%2FLegal%22%20add%2010y%20to%20Modified%20Date%3C%2FP%3E%3CP%3EOtherwise%20leave%20blank%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20something%20else%20that%20we%20can%20do%3F%26nbsp%3B%20JSON%20perhaps%3F%26nbsp%3B%20Is%20there%20an%20even%20better%20way%20to%20do%20this%20(BI%20Report%20on%20all%20Document%20Libraries%20on%20a%20single%20site%20displaying%20the%20expiration%20date%20in%20a%20sortable%20column)%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1872516%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFiles%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

Hello Everyone!

 

We used to use Content Type to drive retention for our documents but moved away from that and now use the Retention Label options in SharePoint so that staff can assign the correct retention policy for a document in a SharePoint Library.

 

When we used the Content Type, there was an Expiration Date column that would display the expiration date for each file in the library and the user could sort on that column.  Unfortunately, the Retention Label option does not have an expiration date column to display.  

 

We only have 2 retention labels for staff to choose from:

 

1. Business General (delete file after 5 years from the last Modified Date)

2. Contractual/Legal (delete file after 10 years from the last Modified Date)

 

I was thinking that I could add a calculated column to hold the expiration date and display it to the user in the SharePoint Library.  Unfortunately, a calculated field cannot reference 2 fields to come up with the value.

 

If Retention Label equal "Business General" add 5y to Modified Date

If Retention Label equal "Contractual/Legal" add 10y to Modified Date

Otherwise leave blank

 

Is there something else that we can do?  JSON perhaps?  Is there an even better way to do this (BI Report on all Document Libraries on a single site displaying the expiration date in a sortable column)?

 

Thanks!

0 Replies