Filename Expressions

This feature is part of release 24.3

Introduction

In version 24.3 a new property FilenameExpression is introduced that allows the user to dynamically determine the filename of an export by using metadata expressions. The structure of these expressions is the same as for . You can find more info there.

Because filenames require pure strings, we introduced a new expression method F that flattens lists into a string. See for the formal definition.

The evaluation result does not need to contain the extension of the file. The system will automatically append the extension if it is absent. For example, the evaluation result My title will be automatically changed to My title.jpg for a JPG file.

Rules

Level

Case

Effect

Example Expression

Example Output

Level

Case

Effect

Example Expression

Example Output

Top

SimpleField

String

R('Descriptive.Title')

My title

Top

Others

 

Not allowed

R('Descriptive.Authors')

 

Sub

Child of MapField

String

R('Structural.Versioning.Status')

HEAD

Sub

Child of MultiItemField

Join the values into a string using dashes

F('Descriptive.Authors.Photographer')

Alice-Bob-Cedric (multiple values)

Alice (single value)

Sub

Child of ListField

Join the values into a string using dashes

F('Descriptive.Keywords.Keyword')

Alice-Bob-Cedric (multiple values)

Alice (single value)

Sub

Other

Not allowed

R('Internal.Browses.Browse')

 

Complete example

  • Input

    • Title: Handleiding 243

    • Author: Alice, Bob

    • Originale filename: Handleiding_243.pdf

  • The rule can be written in 2

    • Multiple Spel: #{R('Descriptive.Title')} - #{R('Descriptive.Authors.Author')}

    • Single Spel: #{R('Descriptive.Title') + ' - ' + R('Descriptive.Authors.Author')}

  • Output: Handleiding 243 - Alice-Bob.pdf

Â