Submitted by gregory on 2010/08/31 05:15
I suspect a bug in the handling of pop-up lists derived from database queries.
 
According to 4.03 Field Management Dialog and 4.036 Pop-up Lists:
 
It should be possible to make pop-up field whose list of permissible values is an SQL query. In fact, it is, and I have used it for a good while.
 
The manual shows that there is also an option Entry must be in list.
 
The screenshot shows the settings for a TaskPriority field I have established:
 
 
 
The desired effect of this setting is that TaskPriority be restricted to a short drop-down list of values taken from another field, Priorities. And in fact it works - up to a point! See below:
 
 
 
Unfortunately, it is possible to set a value - but then to corrupt it:
 
 
Setting the Read-only property does not help - that simply prevents any new entry from being established.
 
Is this the expected behaviour? Or is it a bug? Should it not be possible to state categorically that the values can ONLY be the result of the (always-requeried) SELECT statement?
 
In case anyone thinks that this is not important. Lots of information needs to be classified and not just tagged... Is it a bird? Or is it a plane? No, it's Superman. The list of permitted values is bird, plane, insect and Superman - but NOT krypton or yellow, since neither krypton nor yellow should appear in the separately-maintained list of flying creatures! Nor should it be possible to mis-spell it, either when originally entered or subsequently. So planne and plain should never be permitted. Further, a specific flying creature is EITHER a bird OR it is a plane OR it is an insect OR it is Superman - but it cannot be more than one of them...
 
And here's an associated suggestion. The SQL SELECT statement is great, but a little difficult to use. Might it be an idea to have a simplified dialogue in which the user names the other field whose values are to be permitted and to generate the corresponding SELECT statement for the user? In this example, the user would then only have to specify Priorities and IQ would suggest the SQL SELECT statement:
 
select item as TaskPriority from priorities order by item asc
 
Mark
 

Comments

I guess this is a bug. I'd need to check the entered value before accepting it.
 
As for the suggestion for simpler SQL, this is a good idea
 
However, one may want to have a single grid to contain all PopUps and arrange the items this way:
  • Priorities
    • Low
    • Medium
    • High
  • ActionOn
    • You
    • Me
    • The President
  • etc
And use a different kind of SQL statements:
Select item as TaskPriorities from XXX where ItemParent="Priorities"
Select item as TaskActionOn from XXX where ItemParent="ActionOn"
 
So, I don't think there is an universal solution here...