Computed Attributes with Formulas
Create endless possibilites 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.
The formulas can be generic for all families, or specific to certain families. For example, a sales price based off of cost price may have different percentage increases based on the type of product.
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!