May 17, 2007, 04:10 PM
FernandoHTML parameter screen and where
I have a WF HTML screen that works well. It allows the users to pick a field, then an operation, then to type in a value. The fex then uses all this info to build a where statement.
I can build as many of these (3 elements) as a wish, however I have over 100 fields that the users can chose (that many potential where statements).
What is a better way of allow the users to dynamically build as many where's as the want?
Fernando - WF 7.13
May 18, 2007, 04:27 AM
Alan BFernando
My approach would be along the sort of 'wizard' line.
Have a listbox for the fieldnames, one for the operators, a text entry, and an ADD button which drops the 3 elements together with appropriate syntax, via js, into a combobox.
The users can build up many criteria and you can use the combobox values directly in the focexec. The users could select an item from the combobox and edit it or delete it, again via js.
May 18, 2007, 09:50 AM
gregvAnother consideration, Fernado, is to put the fields in meanigful groups so that
if the user selects one field of the group then they can be blocked from selecting
other fields that are not needed. Such as selecting Zip or City and State but not all three, or selecting
Email or Employee Id (customer id?) but not both.
Also, even though there is no limit to the number of WHERE statements in a focexec there is
a limit to the size of all the test values. This includes any multi-select values.
From Tech Support:
"Currently the buffersize to contain test values is 16,000 bytes for all
WHERE statements against a FOCUS database or relational table.
NOTE:The buffersize for an IF statement is 32,737.
The buffersize for non-FOCUS and non-Relational files is 3,200 for WHERE or IF statements."
I hope this helps.
Greg
May 18, 2007, 10:00 AM
Alan BVery good points to note Greg.
The size of the where clauses can be checked within js before submission so as to avoid errors when running.
A starting point for grouping in a select is the optgroup tag, which allows a heading type label in a select.
May 23, 2007, 09:00 AM
FernandoTexasStingray, Alan, and Greg,
Thanks for the input. I have started to build the interface to dynamically build the WHERE.
Right now I have it so the user picks the field, operation, and value and then adds to a list box that builds the where statement.
Will work with the users to get the visuals right and to make sure I cover the majority of what is needed.
Hey Texas you have: Accross Attributes and it should be Across Attributes (one c not two).
Fernando