Page tree

Versions Compared

Key

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

...

Code Block
create table cf_demo_values (id INTEGER NOT NULL, name CHARACTER(50) NOT NULL, is_active boolean);

Our "choices" dropdown is configured as follows

Image Added

It uses the SQL to load the values

Code Block
select id, name, is_active from cf_demo_values

Important note is that we actually load the values for all 3 columns, while only first 2 columns are used directly when showing the values in the dropdown.

However... we need these values from a 3rd column into our dataset to use then later in a filter (in ConfiForms Field Definition Rule)

Warning

Important!

When SQL is loaded into ConfiForms the names for columns which have underscore (_) in their names are removed

So, in our case the column "is_active" becomes "isactive"

This is very important when you use it in a filter later, see below

Then form in the view mode looks like this

Image Added

And this is how it looks in the design mode

Image Added

Let's see how the 2 last macros (Field Definition Rules) are configured