The titles array
The titles
array is found in objects inside the variants
array. The objects inside the titles
array list variants of titles that belong to a
group
.
A titles
array looks similar to the following example:
"variants": [
{
"group": "Example Title",
"titles": [
{"searchTerm": "Example Title"},
{"searchTerm": "Exemple de Titre"},
{"searchTerm": "Titolo di Esempio"},
{"searchTerm": "Example Title Budget Edition", "priority": 2}
]
}
]
You can use the following keys in an object that's in a titles
array:
Key | Type | Description |
---|---|---|
searchTerm |
str |
The search term used when looking for a title in an input DAT file. |
nameType |
str |
Optional. What name type the search term is, so Retool can match it accurately against names in the input DAT file. The valid values are:
|
priority |
int |
Optional, defaults to Priorities for |
englishFriendly |
bool |
Optional, defaults to |
isOldest |
bool |
Optional, defaults to |
localNames |
obj[str, str] |
Optional. Contains the local names of a title. Add names for all available languages, including English. Language keys must be lowercase versions of languages found in the
See Local names for more information on specifying local names. |
filters |
array[obj] |
Optional. Treat some titles found by a search term differently based on
See Filters
for more information, including the valid |
How it works
Assume a DAT file contains the following titles:
Example Title (USA)
Example Title (Europe)
Example Title Budget Edition (USA)
Exemple de Titre (France)
Titolo di Esempio (Italy)
They are all the same title, just different versions or from different regions. A user in Retool loads the DAT file, and selects the following region order:
When the DAT file is processed, Retool automatically links together Example Title (USA)
and Example Title (Europe), as they have the same short name: example title
. However,
it misses the other titles, as they have different short names.
A variants
object like the following example links them all together:
"variants": [
{
"group": "Example Title",
"titles": [
{"searchTerm": "Example Title"},
{"searchTerm": "Exemple de Titre"},
{"searchTerm": "Titolo di Esempio"},
{"searchTerm": "Example Title Budget Edition", "priority": 2}
]
}
]
Because no nameType
is specified in each title object, Retool assumes the searchTerm
is a short name, and looks in the related DAT file for names that have the same short
name. When it finds those titles, it assigns the same group and short name to them,
example title
, and then Retool knows they are related.
The priority
of 2
for Example Title Budget Edition
indicates that when Retool is
processing the USA region, to select Example Title (USA) over
Example Title Budget Edition (USA) when Retool considers clone list priority. There are
other factors that might eliminate a title before Retool gets to clone list priority.
In this example, because the user has set USA first in the region order, Example Title (USA) is selected as the 1G1R title, and the others are discarded.