Page 1 of 1

Creating Dynamic Select Boxes in Genie

Posted: Wed Jun 25, 2008 11:57 am
by Profound Logic
Q:
How can I dynamically change select box data based on specific criteria?

A:
If you have played with select boxes in Genie, you should already know that you can attach any of them to an i database file. But if you only want to retrieve the data that belongs to the current user, selected customer, etc.

Genie provides a convenient way to subset the data with its “choices selection criteria” property. This property maps to a WHERE clause in an SQL statement. Sometimes, a simple expression like “COMPANY = 1” is all you need, but often times you want this expression based on some information on the screen. Here is what you can put into the “choices selection criteria” property to implement this:

Script: “COMPANY = “ + get(“D_6_3”)

Here, D_6_3 is the id of the element that contains the company number.

Pretty simple.

Re: Creating Dynamic Select Boxes in Genie

Posted: Thu Jun 25, 2015 1:48 pm
by Scott Klement
This technique changed when enhanced security mode was added. If you are running with enhanced security mode (and you should be, it has been the default since version 4.5, and is important for security purposes) you should use the technique explained at the following link, instead:
http://www.profoundlogic.com/docs/displ ... urity+Mode