sections in the article
This article goes into more detail about the different formulas of the Configuration module, available in Print 2.0.
About the Configuration module in Print
Print 2.0 currently contains four standard modules, as well as modules available as add-ons. Each module serves a separate Print operation.
The Configuration module is part of the standard functionality and is where you create a publication dataset. When setting up the configuration of your publication you can add Fields which can be further compiled using formulas.
How to apply a formula to compile Field data
When you need to compile the data of a specific Field, you can apply one of the available formulas.
To apply a formula to a Field
do the following:
- Click under the Field.
the Formula drop-down list opens. - Choose the Formula you want to apply, and configure it accordingly using the formula's pop-up window.
Some formulas might allow you to add multiple instances by clicking ADD. - Click SAVE
Your formula is applied.
The available formulas in more detail
There are several available formulas that you can use to compile Field data.
Expand each formula to see more details.
AddTitle
This formula adds the Field name in front of the data value. After the Field name, a chosen character will appear can appear as a separator. You can define this separator by typing it in the Separator area while configuring the formula.
If you want to include the data of the Field itself, you need to add the Field twice.
Example | Result in .xml |
---|---|
Name: ProductLongDescription Separator: = |
<en_ProductLongDescription>Product Long Description=Two-button jacket in woven fabric. |
BooleanFormula
This formula turns a Boolean value into a predefined text. When an inriver Boolean field is true or false, this formula turns it into a text, based on your definition of the True and False parameters.
Example | Result in .xml |
---|---|
True: Washable False: Not Washable |
<en_ProductDescription><Washable>Washable</Washable></en_ProductDescription> |
ChildFilter
This formula allows you to filter output fields based on a value from ChildEntityField
. In practice, this is useful when you want to get resources based on metadata that is available on the resource in inriver. You need to define the Field which contains the value that the filtering will be based on, as well as the expected Value.
It is possible to use multiple filters, by clicking ADD. The resource will be available in the .xml file only when both metadata fields have the correct data value.
Example | Result in .xml |
---|---|
Field: Resource.ResourceType Value: I (the key for Images, in Control Center) |
Only resources with type 'Image' appear. |
Field: Resource.ResourceType |
Only resources with type 'Image' and angle 'Front' or 'Back' appear. |
Concatenate
This formula allows you to concatenate multiple fields together. You can determine what characters should be used as separators between values. You can also apply both a prefix and suffix.
Example | Result in .xml |
---|---|
Content: ProductName (without formula) |
<ProductName>Como Armchair in Fabric</ProductName> |
Content: ProductNumber (without formula) |
<ProductNumber>C002</ProductNumber> |
Content: ProductName (with formula) |
<ProductName>NEW - Como Armchair in Fabric - C002 - SALE</ProductName> |
CVLKey
This formula allows you to use the CVL keys instead of the actual data.
Example | Result in .xml |
---|---|
Content: ProductMaterial (without formula) |
<ProductMaterial>Synthetic</ProductMaterial> |
Content: ProductMaterial (with formula) |
<ProductMaterial>S</ProductMaterial> |
Decimal Formatter
This formula allows you to determine the number of decimal digits after the decimal separator.
Example | Result in .xml |
---|---|
Content: Price (without formula) |
<Price>890.9</Price> |
Content: Price (with formula) |
<Price>890.90</Price> |
FieldTitle
This formula allows you to use the name of the Field in your publication.
Example | Result in .xml |
---|---|
Content: ProductSupplier (without formula) |
<ProductSupplier>HM</ProductSupplier> |
Content: ProductSupplier (with formula) |
<ProductSupplier>Supplier</ProductSupplier> |
Join
This formula allows you to collect the values, when multiple outputs are possible, separated by a Separator of your choosing.
Example | Result in .xml |
---|---|
Content: Item.ItemName Separator: -- |
<en_ItemName>Hood Jacket - blue --Hood Jacket - blue--Hood Jacket - blue</en_ItemName> |
Prefix
This formula allows you to add text before a field value.
Example | Result in .xml |
---|---|
Content: ProductName (without formula) |
<ProductName>Como Armchair in Fabric</ProductName> |
Content: ProductName (with formula) |
<ProductName>NEW Como Armchair in Fabric</ProductName> |
RemoveIfEmpty
This formula allows you to ignore all other formulas, and have the Field not appear in your publication if there are no values for it in inriver.
Example | Result in .xml |
---|---|
Content: ProductShortDescription (without formula) |
<en_ProductShortDescription/> |
Content: ProductShortDescription (with formula) |
<nl_ProductShortDescription>100%organische mestsof</nl_ProductShortDescription> |
Select
This formula allows you to show values from predefined link Positions.
Example | Result in .xml |
---|---|
Content: Resource.Url (without formula) |
<Url>https://partner.asset.com/api/assetstorage/123_fd32</Url> |
Content: Resource.Url |
<Url>https://partner.asset.com/api/assetstorage/123_fd32</Url> |
Suffix
This formula allows you to add text after a field value.
Example | Result in .xml |
---|---|
Content: ProductName (without formula) |
<ProductName>Como Armchair in Fabric</ProductName> |
Content: ProductName (with formula) |
<ProductName>Como Armchair in Fabric SALE</ProductName> |
Take
This formula allows you to show a certain amount of values, as defined by the Number of items parameter. The formula returns items that are not empty.
Example | Result in .xml |
---|---|
Content: Resource.Url (without formula) |
<Url>https://partner.asset.com/api/assetstorage/123_fd32</Url> |
Content: Resource.Url |
<Url>https://partner.asset.com/api/assetstorage/123_fd32</Url> |
Unique
This formula allows you to show only unique values.
When using the Unique formula with other formulas, make sure to add it first.
Example | Result in .xml |
---|---|
Content: Item.ItemColour (without formula) |
<en_ItemColour>Blue</en_ItemColour> |
Content: Item.ItemColour (with formula) |
<en_ItemColour>Blue</en_ItemColour> |
Wrap
This formula allows you to place data between predefined characters or text, using the Character definition.
Example | Result in .xml |
---|---|
Content: Item.ItemSize (without formula) |
<ItemSize>Extra small</ItemSize> |
Content: Item.ItemSize |
<ItemSize>!Extra small! !Small! !Medium! !Large! !XL!</ItemSize> |
Applying several formulas at the same time
You can use multiple formulas, but you need to take into account the order in which they are applied.
Expand each combination of formulas to see more details.
Some combinations and orders will not work.
CVLKey/AddTitle/Wrap
Order | Valid | Result in .xml |
---|---|---|
CVLKey/AddTitle/Wrap | ✓ |
<ProductStatus>!Product Status: RP!</ProductStatus> |
CVLKey/Wrap/AddTitle |
✓ |
<ProductStatus>Product Status: !RP!</ProductStatus> |
Wrap/CVLKey/AddTitle |
✕ |
<ProductStatus>Product Status/RP</ProductStatus> |
Wrap/Join , Join/Wrap
Order | Valid | Result in .xml |
---|---|---|
Wrap/Join | ✓ |
<ItemNumber>!A301! !A302! !A303! !A304!</ItemNumber> |
Join/Wrap |
✓ |
<ItemNumber>!A301, A302, A303, A304!</ItemNumber> |
CVLKey/Wrap/AddTitle/Join , CVLKey/Join/Wrap/AddTitle
Order | Valid | Result in .xml |
---|---|---|
CVLKey/Wrap/AddTitle/Join | ✓ |
<ItemColour>Colour: !BL! !BL! !BK! !BK!</ProductMaterial> |
CVLKey/Join/Wrap/AddTitle |
✓ |
<ItemColour>Colour: !BL, BL, BK, BK!</ItemColour> |
Wrap/Join/CVLKey/AddTitle |
✕ |
<ItemColour>Colour: BL</ItemColour> |
CVLKey/Join/Wrap , CVLKey/Wrap/Join
Order | Valid | Result in .xml |
---|---|---|
CVLKey/Join/Wrap | ✓ |
<ProductMaterial>Material: !S, K, N, W!</ProductMaterial> |
CVLKey/Wrap/Join |
✓ |
<ProductMaterial>Material: !S! !K! !N! !W!</ProductMaterial> |
Join/Wrap/CVLKey |
✕ |
<ProductMaterial>Material: S</ProductMaterial> |
Comments
4 comments
Will there be a wiki page on how to create your own formula?
Hello Daniel,
Not sure on what you mean with: Create your own formula.
What kind of formula would you have in mind which is not currently supported?
Hi!
I'm talking about creating your own formulas from code.
Each customers Inriver system is unique, we will need to be able to build or own formulas, from time to time.
Hi,
Definitely, I understand the unique aspect.
As I see it, you prepare the datasets in the Print 2(with current available formulas) and then you are able to manipulate the data further with formulas in EasyCatalog in Indesign.
What kind of formula would you have in mind which is not currently supported via the formulas in Print 2 or further down the line in EasyCatalog Indesign?
I will also enquire further with PM and DEV team if any plans for: creating your own formula?
Cheers,
Andrei
Please sign in to leave a comment.