The Text Expression functionality allows you to use texts and values of the Features from your configuration to compose texts on the text field of a Feature. These texts can be used in later stages, for example on the quotation document or in other applications.
Text Expressions
The text expression functionality allows you to use texts and values of the Features from your configuration to compose texts on the text field of a Feature. These texts can be used in later stages, for example on the offer document or in other applications.
Context
You sell different Boat models. One of those is the Maria Model tugboat. The last step is to add a Text Expression to the calculations Feature. You want to create a dynamic text that automatically takes over the value of designated Features. In this case, you want to generate a text in which you can specify the Square meters of the Deck Size children Features to use later on your quotation.
Adding Text Expression
First, let’s look at how you add a Text Expression to a Feature. To add a Text Expression, Follow the steps below.
-
Open Elfsquad
-
Go to the Formulas Model
-
Click on the cog icon of the calculations Feature
-
Click on the pencil under the Text Expression
-
Click on add Variable
When you have added a variable, you can see that the formula editor differs from the formula editor you’ve already worked with. Let’s go over the functionalities that are showing and what they are for.
- Tag: This is the name used in the final text expression. By default this is variable1 but it can be changed as desired.
- Type: This is the type that the variable should refer to. A Feature can be chosen or a complete Configuration Model.
- Subtype:
- Feature: Under Subtype you can determine whether the Feature field (such as Description) or a Feature Property should be returned in the Text Expression.
- Configuration: When type Configuration is selected, then Subtype cannot be selected (default Field).
- Field:
- Type - Feature: At Field - You can determine what feature the variable has to take his information from. This will be in combination which property you want to take over with your expression.
- Type - Configuration: When a configuration is chosen at the type field, you can only choose which property the variable has to take over from the Configuration Model. This is not on Feature level, only on Configuration level
- Selected: This function can be enabled when Type: Feature is selected. When this function is switched on, the text in a text field (which is not editable) is only added at the moment the Feature is selected in the Configuration Model.
- Children: This feature can be enabled on the Feature type. When this function is enabled, the text of the Children of the selected Feature is added to the Text Expression.
Formulate Text Expression
We want to show the customer the total surface of the ships deck. To formulate a Text Expression, Follow the steps below.
-
Open the formula editor
-
Set up the following variable
-
Type to Feature
-
Subtype to Field
-
Under Field we select the Calculations Feature
-
In the next colom, we will select Configuration value, as we want to retrieve the value of the feature
3. Add the following text in the formula editor: The total surface of the ship: @variable1 m2.
4. Click on save
With this Text Expression, you created a dynamic text that will take over the Feature value from the Calculations Feature. When you change the WIDTH or Length Features. The value in the Text under Calculations takes over the value of this Feature.
Configuration Name - Text Expression
A last function we're going to look at is the Configuration Name. Because you can also generate a configuration Name based on the choices the user makes during Configuration. This offers new possibilities with creating a Quotation document with a configuration name determined on the user's choices during configuration. If you want to know more about Text Expressions, you can always look at our Documentation page.
To add this to your model, follow the steps below:
-
Open Elfsquad
-
Open the model you want to put a Text Expression on
-
Click on the "Configuration Name" next to Preview Changes
In this field you can determine, through Text Expressions what the name of your configuration will be, based on the choices of the user. For example:
This is the end of the formulas module. We’ve looked at multiple different ways to implement formulas into your Configuration Model. It is up to you to get the most out of these. If you want to know more about different formulas. You can check our documentation page on formulas
Opmerkingen
0 opmerkingen
U moet u aanmelden om een opmerking te plaatsen.