Using the File Name Expression
Editor
10/08/2018 - Updated several
screenshots due to new [+Literal] button.
07/31/2017 - Updated several
graphics/screenshots in the exporter section.
The File Name Expression Editor is a
standard edit box where the formula for the individual file names
in the .ZIP file is constructed. You can type or edit the
expression by typing and selecting. As changes are made in the
"Expression Formula" box, the data in the "Sample Expression
Evaluation" box is updated in real-time to show the effect of the
currently constructed formula. If the formula cannot be evaluated,
the Sample Expression Evaluation box will read: "** UNABLE TO
EVALUATE **". Once the formula becomes valid, the value will change
back to the actual data.
Using
the Database Field Picker
Using
the Formula Function Picker
Building Complex File
Name Expressions
The Database Field Picker box provides you with a
list of the available vMedia index fields. Each field is listed
with the long description, so remembering the internal field names
is not necessary. Only fields that are commonly used are presented;
the internal fields from tables which are not relevant are
excluded, allowing you to select meaningful fields in your
formulas.
-
To access the File Name Expression Editor,
click the gear icon to the right of the Exported Media File Name
Expression field:
-
In the Expression Formula box, either place
the insertion bar in the location where the field should be
inserted, or highlight the text that should be replaced by the
field.
-
Click in the Database Field Picker and using
either the arrows, mouse, scrollbars, etc., move the highlight bar
on top of the desired selection.
NOTE: New
[+Literal] button: Click to bring
up a sub-dialog which allows you to:
-
Type in a literal string of
characters.
-
Select from a group of symbols in
a dropdown list that is to be inserted at the chosen insertion
point in the literal.
-
When Insert is selected the
following happens:
-
The literal is enclosed in
quotation marks.
-
If the insertion point in the
expression formula is inside a function the quoted literal is
inserted as-is. Otherwise the quoted literal is pre-pended with a
plus sign prior to being inserted.
NOTE: New
[+] buttons: The two new
[+] buttons that appear underneath
each picker are linked to each selection list. When a selection is
made from the corresponding list, the plus button for the list
becomes active.
-
When the user clicks on the
[+] button, the selected list item is
inserted into the expression formula.
-
The same insertion rule applies
as with the Literal function, namely:
-
Click the [+] button or double click with
the mouse.
-
The selected field will be inserted or replaced;
also, the focus and insertion point will be placed in the
Expression Formula box immediately following the inserted
field.
The Formula Function Picker allows you to manipulate data in
the vMedia database fields selected for the expression. For
example, the Document Description (CMT) field will insert
the full character length of the field, regardless of how long the
actual data is. This could result in a field in the expression that
is padded with many spaces. The Remove trailing spaces from a
string function will trim the field to the size of the actual
data.
Procedure
-
In the Expression Formula box, either place
the insertion bar in the location where the function should be
inserted, or highlight the text that should be replaced by the
formula.
-
Click in the Formula Function Picker and
using either the arrows, mouse, scrollbars, etc., move the
highlight bar on top of the desired selection.
- Click the [+] button double click with the mouse. The
selected formula will be inserted or replaced, and the focus and
insertion point will be placed in the "Expression Formula" box
immediately following the formula name, with the first parameter
highlighted.
NOTE: With
many functions, the first parameter in many cases is a field, so
you can follow directly with a field selection from the "Database
Field Picker". The "Sample Expression Evaluation" box will update
with live data to show the results of the selection.
-
Once the Expression Formula is set, click
[Save] to save the current formula and return to the caller.
If [Cancel] is selected instead, all changes to the
Expression Formula will be discarded.
The Expression Editor can be used to create
complex file name expressions through a combination of field names
from the Field Picker, functions from Formula Function
Picker, plus operators typed into the editor window. For
example, multiple fields can be included in the expression
separated by underscores, dashes or spaces, and literal characters
can be included such as numbers and letters.
The two [+] buttons that appear below each picker are linked
to each selection list. When a selection is made from the
corresponding list, the plus [+] button for the list becomes
active.
-
When you click on the [+] button, the selected list item is inserted into
the expression formula.
-
The same insertion rule applies as with the Literal
function, namely:
Literals can be enclosed in double quotes, single
quotes, or square brackets. The combinations can be mixed as long
as they are paired.
Do not use any invalid characters:
|
The following characters are
valid:
|
\ back slash
|
# pound
|
< left angle
bracket
|
% percent
|
> right angle
bracket
|
& ampersand
|
* asterisk
|
{ left curly bracket
|
? question mark
|
} right curly bracket
|
/ forward slash
|
$ dollar sign
|
: colon
|
@ at sign
|
| pipe
|
|
; semicolon
|
, comma
|
-
To concatenate two fields, insert a + between
them.
-
To insert an underscore, dash or space type the
character enclosed in quotes. (Or use the [+]
button.)
-
Literals can be enclosed in double quotes, single
quotes, or square brackets. The combinations can be mixed if they
are paired.
For example:
["It's a boy", exclaimed
Robin.]+" Good luck, I replied!"+ ' And then she walked
away...'
To create a file name that is the document
description (without extra spaces), an underscore, the document
date, an underscore, the forwarder file number (without extra
spaces), a dash, and the number 1 this would be the expression
formula:
TRIM(CMT)+"_"+DTOS(DDATE)+"_"+TRIM(FWFILENO)+"-"+"1"
The functions used were "Remove trailing spaces
from a string" for the Document Description and the Forwarder
File number, and "Convert a date to a string YYMMDD" for the
Document Date, plus the typed + to concatenate the fields and the
literal underscores, dash, and the number "1", all in quotes.
Related Topic
Group and Compress
Media
|