Versions Compared

Key

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

...

Overview

In this lesson, we are going to review how to create add a “Dropdown List” control and review how this functionality allow us to pick an option between different values created in the database through the Stored Procedures by checking values in a table or query. Also we can create a dropdown list without referring to an specific table in the database, only creating the SQL query on the fly with the options that we want to display and select. Let’s create some examples to analyze this featureto a page and different way to set its source including Stored Procedures, Prototypes or fixed lists.

Let’s get to it!

How to create a “Dropdown List” control?

In our first example, we are going to create a new control in “Free” mode. This option will allow us to establish the values on the fly without the initial setup connection to the database. Turn display a fixed list of values without using an data source like a database Stored Procedure or API.

Let’s go to the page where we are going to include this object.

...

Click on “Preview” button and new tab will display the page with the layout setting:

...

How to connect datasets to “Dropdown List” control?

In the next example, we are going to create a Dataset inside the page and then we will link this object with the “Dropdown List” control.

...

Click on “Submit” button and now we are ready to create the control

...

Info

For “Dropdown List” control the conditional statements are evaluated every time selected option changes.

Focus on “Controls” section and select “Dropdown List” option. Click on “New” button

...

Notice that the new dropdown is showing the 4 values from the dataset below the previous example that we created.

Info

You can reference Dropdown’s selected value using the ‘ID’ property and selected text using ‘Descripcion’ property. For example: &Dropdown1.ID or &Dropdown1.Descripcion

Recap

In this lesson, we learnt different ways to create “Dropdown List” controls in Wayfast. There are multiple options to create a dropdown showing data from different source. We can create an Stored Procedure and similar than Dataset, we can connect this data with the dropdown control to display different values and stored the selection from the user.

...