Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Preconditions

How to…?

How to…?

...

In this document, we are going to focus on “Variable” control under the pages. This feature give us the chance to establish conditions that we can print on screen using other controls simply refering to the variable as parameter.

How to setup a “Variable” control in page?

First, we need to create a new page or select anyone previously created in the application.

Under page details, expand the “General Information” section

...

This control, unlike the previously created ones, needs to be setup on the “Variables” tab under the “General Information section. Click “New” button

...

A popup will be prompted to setup the “Variable” control

...

Fill in the name and select the type. This dropdown offers to possibilities:

  • Local: In this case, the variable only can be used under the page where you are located.

  • Global: Variable can be used in all the pages from the Project’s application.

Click “Data Binding” tab

...

In this section, we can establish default value for the variable. On the example, using the ampersand, we are going to make that the value persist every time that the page is refreshed. Otherwise, we can set an specific value like “1” and this should be retrieved on loading screen.

NOTE: Wayfast offers the ability to link the value from any dataset created in the project.

Turn to “Layout” tab

...

Set the “Order” to 0 and click “Accept” button to save the changes.

...

New variable is displayed under “Variables” tab

How to include a variable under any other control?

Now that we have the variable generated, we need to take into consideration that this a “Local” variable type so it can be used in the same page.

Turn to “Controls” section and select “Label” control

...

Click “New” button

...

Under the “General” tab, complete the required fields and focus on the “Value” field. Since this is a label, we can put a legend text and beside the fixed text, introduce the “Variable” using the ampersand like we explained in the previous steps. This reference will be retrieving the data from the variable.

Click “Accept” to save the changes and take a look about how this “Variable” control is combined with “Label” control and then preview the screen.

...

How to set any control as variable?

We already saw how to create a variable from General Information, now we are going to set a control as a variable from its creation.

If we click on “New” related to “Label” control like we used to explain in previous steps, there’s a checkbox “Add as a variable” option

...

Setting this, we can define the label as variable at the same time.

Recap

Summarizing this control, we learned how to set a “Variable” control and establish a relationship with other controls like “Labels” that require an input value. In other documents, we can learn how to use the variables through the Actions related to the project.