Submitted by gregory on 2017/04/03 01:34
Various problems surrounding the use of SQL and of list of values pop-ups have been introduced by a recent IQ version - but I'm not sure which one, sorry.
 
If I create a new IQbase and create fields Classification (text) and ClassKey (type = List of items pop-up, Field containing the pop-up value = Classification), the pop-up list is shown as empty even when I populate the field Classification with several values.
 
In my longstanding main IQbase, I have various SQL-derived fields and pop-up lists. One such field, called KindVal, has type = SQL query (advanced),
select kind as KindVal from Kind order by left(kind,255) with Entry must be in list.
 
This fails in use:
 
Cannot show the list.
The query: select kind as KindVal from Kind order by left(kind,255) asc
could not be executed.
If the SQL references an IQ grid, this grid must be set to be visible to
other applications (Grid Properties > Options)
 
Other fields, defined as List of items pop-up, also fail in a way similar to the SQL-derived field.
 
Please accept my apologies - I spotted this problem some while ago but have been working round it rather than reporting it as I should have done.
 
<EDIT> This is a serious problem for me. Help! The issue is complicated by the fact that it seems that the problem affects some fields but not others. This or a related problem is exacerbated in v96b: see below.</EDIT>
In version 96b, I can no longer select a value from a fixed list pop-up.
 
A field Priority is defined as Text with Fixed list pop-up specified as Editor. In version 96b, it is no longer possible to choose a value for this field. Pressing F2 has no effect.
 
New items are assigned the default value for the pop-up field, but this cannot then be changed using the pop-up - pressing F2 has no effect.
 
This problem is almost certainly connected to the new facility to paste values. If as a workaround I copy an existing value for this field on another item and try to paste it into the new item, the following behaviour occurs. I copy the existing value from another item. When I try to paste it, I am informed that the clipboard contains 2 lines (which it does not) and I am given the options in the italicised text:
 
Clipboard contains 2 lines
What do you want to do ?
1- Paste 1 lines into selected cells
2- Paste all lines into selected cells, creating items if necessary
(1 items will be created)
3-    Cancel
 
Choosing option 1 works, in that the (single) copied value is correctly pasted into the field.
 
There is a probably unrelated bug, longstanding, in the implementation of fixed list pop-ups, list of items pop-up and SQL query. That is that, regardless of the fact that Entry must be in list is ticked, IQ permits any arbitrary value to be assigned.
 

Comments

Hi Mark,
 
2 separate issues here:
  1. Fixed list pop-up list was broken in v0.9.96. Fixed
  2. Your SQL-based pop-up list was dependent on a grid which had a column pointing to a deleted field. Removing the column fixed the issue.
    Grids now automatically remove such columns. Also, using the new pop-up list "List of item pop-up" is simpler and more efficient. It should do the job in most cases
 
Pierre_Admin
IQ Designer
 

gregory

2017/05/01 17:25

In reply to by Pierre_Admin

1. Fixed list pop-up list: confirmed fixed in v0.9.96c. Thanks.
2. Grid based on a grid is occasionally useful but was unnecessarily complex in the documented case. In addition, it introduced a problem. A field TagVal in a grid used by the failing grid was deleted and somehow the grid did not update. This prevented generating the SQL query for that grid. Since the SQL query was not generated, the pop-up list based upon it could not load. Version 0.9.96c automatically removes columns for fields which no longer exist.
3. The use of SQL was in any event not necessary in the reported problem. SQL which defines a grid based upon another grid is implemented as a database query dependant upon another database quesry - slow, and more fragile. Instead, editor=List of item pop-up: values from Kind, Filter by IsKind works, is more efficient and less fragile.  SQL-based solutions are useful for data coming from another database and when you want to fill more than one field in one shot, and when you have special sorting requirements. Otherwise, the newer List of item pop-up should do the trick all the time.
 
Thanks again, Pierre.
 
Mark GREGORY, Hull, England- GMT +0/+1; EST +5

gregory

2017/05/01 17:29

In reply to by Pierre_Admin

One problem remains, but is expensive to fix. That is:

 
There is a probably unrelated bug, longstanding, in the implementation of fixed list pop-ups, list of items pop-up and SQL query. That is that, regardless of the fact that Entry must be in list is ticked, IQ permits any arbitrary value to be assigned.
Mark GREGORY, Hull, England- GMT +0/+1; EST +5

gregory

2017/05/01 18:09

In reply to by Pierre_Admin

"Grids now automatically remove such columns":
 
v96c reports:
 
"
Missing field
 
Grid showed the field Paper title in a column but this field no longer exists. Column will be removed.
"
 
This improvement makes it less likely that a grid defined in terms of another grid will fail when the underlying grid is changed.
 
Mark GREGORY, Hull, England- GMT +0/+1; EST +5