Fields allow various pieces of information or metadata within your document to be automatically inserted into the document text. Fields will automatically update as data—for example, a date—changes.
Fields can be used to insert relevant section information. For example, adding a Name or Page Number field from the Fields panel's Document Sections to a master page's footer will automatically display the correct section name or page number, respectively, wherever the master page is applied.
Items that may be inserted as fields can be found on the Fields panel (accessed by opening the Window menu, then selecting References>Fields).
Available fields include:
Text in a document can be converted to a field, directly from a text selection or via the Find and Replace panel.
A text selection can be converted only if it does not:
Using the Find and Replace panel is useful in a document containing multiple instances of the same text—or similar text, which can be found using regular expressions—that you wish to convert
Fields with editable formatting include Date & Time, Created, Saved, Printed/Exported, and Running Header.
Field formatting can be edited, via the Fields panel or the document view.
Fields that display the date and time can be customised to display any of a wide variety of details. When editing their formatting, select Custom and enter the required details in the Pattern setting.
The table below lists items supported by the setting. Patterns can be combined as you wish, including with regular text to form longer phrases.
The Language setting affects the values shown by each pattern. For example, MMMM displays July when an English language is selected, julio for Spanish, and Temmuz for Turkish.
Symbol | Meaning | Pattern | Example value | Notes |
---|---|---|---|---|
G |
Era designator |
G GGGG GGGGG
|
AD Anno Domini A |
|
y |
Year |
y yy
|
2023 23 |
|
Q |
Quarter |
Q QQ QQQ QQQQ
|
2 02 Q2 2nd quarter |
|
M |
Month in year |
M MM MMM MMMM MMMMM
|
9 09 Sep September S |
|
L |
Standalone month in year |
L LL LLL LLLL LLLLL
|
9 09 Sep September S |
Some languages use a different spelling of the month in certain contexts, e.g. when a month is mentioned without a date and year. These spellings can be accessed using these patterns. For example, in Polish MMMM displays lipca for July, whereas LLLL displays lipiec. |
w |
Week of year | w |
27 | Consecutive instances of the symbol add a leading zero to the resulting value. |
W |
Week of month | W |
2 | Consecutive instances of the symbol add a leading zero to the resulting value. |
d |
Day in month |
d dd
|
2 02 |
|
D |
Day of year |
D DD DDD
|
1 01 001 |
Example is 1st of January. |
F |
Day of week in month | F |
2 |
Example is second Wednesday in July. Consecutive instances of the symbol add a leading zero to the resulting value. |
E |
Day of week |
E EEEE EEEEE EEEEEE
|
Tue Tuesday T Tu |
|
e |
Local day of week |
e eee eeee eeeee eeeeee
|
2 Tue Tuesday T Tu |
When the field's language is set to US English, Monday is day 2 as the week starts on Sunday, whereas for UK English it is day 1 as the week starts on Monday. |
a |
AM or PM |
a aaaaa
|
PM p |
|
B |
Flexible time periods | B |
at night | Possible values are in the morning, noon, in the afternoon, in the evening and at night. |
h |
Hour in day (1–12) |
h hh
|
7 07 |
|
H |
hour (0–23) |
H HH
|
7 07 |
|
k |
Hour number in day (1–24) |
k kk
|
4 04 |
|
K |
Hour in am/pm (0–11) |
K KK
|
7 07 |
|
m |
Minute in hour (0–59) |
m mm
|
8 08 |
|
s |
Second in minute (0–59) |
s ss
|
3 03 |
|
z |
Short/Long Timezone |
z zzzz
|
BST British Summer Time |
|
O |
Time Zone: short localized GMT Time Zone: long localized GMT |
O OOOO
|
GMT-8 GMT-08:00 |
|
V |
Time Zone: short time zone ID Time Zone: long time zone ID Time Zone: time zone exemplar city Time Zone: generic location |
V VV VVV VVVV
|
gblon Europe/London London United Kingdom Time |
|
x |
Time Zone: ISO8601 basic hm Time Zone: ISO8601 basic hm Time Zone: ISO8601 extended hm |
x xx xxx
|
+01, -0930 +0100, -0930 +01:00, -09:30 |
' |
Escape character to include literal text | 'Today is' EEEE |
Today is Tuesday | Surround literal text with apostrophes to display it alongside date and time values in a field. |
' ' |
Two single quotes produce one | 'Today''s date is' dd/MM/yyyy |
Today’s date is 03/07/2023 |
Other instances of the field are unaffected.
Instances of the field that you insert afterwards will use your preferred format.