Computed Attributes with Formulas
We have recently added a new powerful type of attribute called computed attributes. This means that when creating a new attribute you can toggle whether it will be a computed attribute or not. This has plenty of amazing uses.
You can concatenate text which allows you to:
- Dynamically create descriptions of other attributes like Length, Width and Height.
- When you need to export into a certain format, you can concatenate the data but also add in carriage returns and special key words. For example, “Feature:” or “Length”.
- The formulas will act on an individual language level, so for the French channel they will concatenate the French text.
- Can create a formula for label/value pairs, this means label and value are both dynamic.
For example, this:
Will become this:
You can also do mathematical operations. These values will change dynamically then as the data changes, and you don’t have to manually compute them each time. For example, sales price might be calculated like:
Computed attributes can also retrieve and display the URLs for images or files associated with each product.
For example, a computed text attribute with the following formula
[Image1] & CHAR(10) & [Image2] & CHAR(10) & Image3]
would return the URLs for the three images on three separate lines.
This is useful if certain exports require image URLs in this format.
You’ll find a guide to all our functions here.
More functions are going to be added to the formulas soon, so keep an eye out!