Submitted by cnewtonne on 2010/09/06 12:30
I have, over the years, developed a very significant body of knowledge using listpro. it is mostly technical procedures created in what is known as 'ordered lists' using this software. Under no circumstances, the sort is altered by any other implicit or native application sort functionality.
 
I created a grid with IC using xml/opml imports of 1500 rows as a hierarchy. The native behavior I saw was not encouraging. I moved a row for a test using alt+arrows keys. When I click F5, the row got moved automatically. Repeating this move/refresh procedure did the same thing. the moved row did not stay where I wanted it.
 
Also, I have noticed that what I saw on the grid as I was moving rows and rearranging the hierarchy, even though appeared to be working as I wanted, hitting F5 showed a different story. Updates made to row text were not reflecting, sort ordered changed, and rows appearing to in different place in the hierarchy.
 
What changes or settings I need to do to ...
1) make sure the changed i do in a grid is preserved. Do I need to keep hitting F5 every time I make a change to verify.
2) make sure the hierarchy is ordered as I want it and it is never altered otherwise.
 
Thank you.

Comments

Could post a "jpg" of how you have your data in list pro?
Then I'm assuming you would like to do the same in IQ.

[quote=cnewtonne]
 
2) make sure the hierarchy is ordered as I want it and it is never altered otherwise.
 
[/quote]
 
Reference this mantis item, which is not too far away--there are item ordering enhancements in the works:  http://mantis.sqlnotes.net/view.php?id=913
 
Presently, a way to preserve a sort, is to set up a numeric "sort" field, then sort by it.
 

gregory

2010/09/06 15:49

In reply to by KeithB

Hello.
 
Adding to what others have already said. You may well have succeeded in ordering the underlying data, but your view of your data may inadvertently be being sorted. To make sure that your view of the items, the grid, is not being sorted:
  1. Display the Source / Filter / Sort bar: use <ALT>+s
  2. Check that the Sort criterion is empty and that the Sort button A->Z is not ON.
  3. Less likely to be the case, but not impossible: if the Source of your grid is an SQL SELECT statement (which will be the case if you are using the Options element of the field definition - see Manage Fields) - avoid the use of an ORDER BY phrase.
Hope this helps.
 
Mark Gregory, Rennes, France - GMT +1/+2; EST +6

I had written this earlier but got distracted by a phonecall:-
 
 
Also helpful to be aware of what is affecting the sort
 
1)  Menu: Grid >Sort criteria applies to sub-items 
if this is turned off & the items are all under one parent you can resort them manually & the resort will stick on refresh.
The default sort is by the first column '#' - so if you move an item up, it's number changes in the first column - that's how it works
I dont use this myself and dont know how sturdy / stable it is but if you never change that setting the sort should not change AFAIK (maybe wait see what the experts say though!)
 
Maybe Keith's suggestion would be safer though - I wonder could you set up a field that would copy the numbers from the first column - but only manually - so as it will stick even if the sort is somehow changed. That way you could simply ensure your sort is correct and then 'update'. Again you'd need more expert help for that - if it is possible
 
2) Alt+S shows the sourcebar, which has a sortbox on the right-hand-side - if (1) above is off, the sortbox will only affect the Top level items (on refresh they will default to this sort) If it's empty or turned off (click the A-Z button there), again the default sort is by the first column.
 
There is another sort method but it is only temporary (disappears on refresh) so it can safely be ignored here (Grid >Sortbar)
 

Hi cnewtonne,
 
I "know" you from DonationCoder. Welcome!
 
There are 2 hierarchical situations happening in very specific circumstances that will cause problems (but these can be avoided with workaround... Pierre is aware of those and the fix should come soon). Apart from that, I don't think you'll find any true bugs in sorting + hierarchical organization. I use IQ daily to manage 100s of items in pretty complex structures and everything works well.
 
[quote=cnewtonne]
I created a grid with IC using xml/opml imports of 1500 rows as a hierarchy. The native behavior I saw was not encouraging. I moved a row for a test using alt+arrows keys. When I click F5, the row got moved automatically. Repeating this move/refresh procedure did the same thing. the moved row did not stay where I wanted it.
[/quote]
 
I won't add much to what others have said. The manual explains it pretty well too. For sorting and filtering please have a look at 4. Searching and Filtering Items .
 
 
If you want IQ to record manual ordering/sorting, items need to be subitems -- like Tom said... providing you didn't turn on "Sort criteria applies to subitems." Note that Pierre recently told me that IQ would soon record manual sorting of top level items too. I don't know that's accurate, but that's what I understood. The implication is that you could either sort manually or automatically (using the sort text box).
 
 
[quote=cnewtonne]
[...] hitting F5 showed a different story. Updates made to row text were not reflecting, sort ordered changed, and rows appearing to in different place in the hierarchy.
[/quote]
 
Sorting can change as it depends on the sorting filter set in the source bar. When you press F5, all filters are reapplied.
 
However, I don't understand this part from you quote : "updates made to row text were not reflecting". All updates made to cell text should be permanent... Unless these are conditioned by some row or hierarchical equations you have set in the field management dialog.
 
 
[quote=cnewtonne]
What changes or settings I need to do to ...
1) make sure the changed i do in a grid is preserved. Do I need to keep hitting F5 every time I make a change to verify.
2) make sure the hierarchy is ordered as I want it and it is never altered otherwise.
 
Thank you.
[/quote]
 
1) Everything you enter in a cell is there and should stay there so I'm not sure what problem you encountered.
2) if you follow the rules laid out in  5. Sorting and Grouping Items, you should not have any problems.
 
If something isn't clear there, don't hesitate to say so. I'll make the necessary modifications to the manual.
 
Note : someone talked about the # column. Actually, this column is dynamic and isn't a field per se -- its more or less to help see the hierarchical structure and item's position in it. Sorting doesn't follow that column. Rather, it follows the sorting (and sorting changes are shown after a refresh... Manual or automatic, depending on your grid settings)

cnewtonne

2010/09/07 08:32

In reply to by Armando

Ok. thanks for the great feedback. Every reply has highly appreciated. This is the test that I ran to test how sort is behaving ...
 
Current app settings
----------------------------------------
This is how sort box/bar is looking ...
 
 
The grid menu options
 
This is how the list looked to start with when created.
 
 
 
I, then, moved 'child21' manually using mouse. This is how I want the list to look and stay.
 
 
 
After hitting F5, 'Child21' moved up one row. My sort was not preserved.
 
 
 
1) can someone explain this behavior.
2) what can be done to prevent it, so that manual sort is preserved.
 
Thank you.

Tom

2010/09/07 09:22

In reply to by cnewtonne

 
OK, I did a quick check here and, yes, it doesnt hold the sort - the problem here is with drag n drop:
1) If you move an item by drag n drop it doesnt keep the position after refresh - this is a bug. I hadnt noticed this (others too probably)
because I use method below to move items & I dont use no-sort.
 
For the moment try moving items like this:
When item has focus (even in edit mode) press & hold the Alt key. THen use the up/down arrow keys to move an item up/down & left/right
arrow keys to move the item within the hierarchy. If item is below another, Alt+right-arrow will cause it to become a sub-item of that item.
 
2) I notice you have context parents on - this can confuse things (it confused me here anyways in my test). If you're not using it intentionally I'd turn that off too:
You might not be able to resort items as you wish if they are being shown under context parents - I dont know is this a bug, a limitation, or just the way it is - context parents aren't really in the grid - they dont meet the grid filter requirements (source etc.), they are just shown to give you a context for the items in the grid. So maybe it's actually logical that you cant resort the items below them in the hierarchy - I dunno - I was getting confusing results anway even when moving items via Atl+Arrow keys
 
 
 
EDITED for clarity (hopefully)

cnewtonne

2010/09/07 10:16

In reply to by Tom

i disabled all options (hierarchy, context parents) and moved this row using alt+arrows. It still did not work. Hitting F5 key, moved same row back one row up. See attached swf demo.

Tom

2010/09/07 13:02

In reply to by cnewtonne

Cnewtonne, as I dont actually use this in practice I can only give you an example of where it does work and hopefully Pierre or someone might chip in and help us out with an explanation of why.
It's to do with those other options you disabled:
 
Leave Hierarchy and it's 'sub' option Full Hierarchy both on
Leave Save Item State on (this remembers the state of the hierarchy on refresh - where it's expanded, etc. It doesnt stop this from working - it just makes it easier to see where you're working.)
 
 
Using a test install and a new file with sample data I created a new 'TEST' grid with these settings & you can see the items created in the background
 
 
moving subitems item by either drag-drop or with keys works with these settings (I had missed that the Full Hierarchy option must be on - i.e. I screwed up when saying it was a drag-drop bug) **
Moving top-level-items does *not* stick - they seem to default to a sort on the ItemCreated date.
 
Sorry this is so complicated, as Armando says this is supposed to be implemented properly at some stage - it would be nice if someone could explain why it needs Full Hierarchy and Hierarchy, especially if there's a logical reason (I use both hierarchies on most of the time myself, except for the Addressbook grid. Worth checking it out in the help file/manual)
 
 
** EDIT:
I reckon I just dont have a very scientific / test-orientated mind - this also works without hierarchy selected (now that I check it)
But I know it didnt work earlier - but I unfortunately now have no idea why (that's a problem with doing quick tests) please try with these settings and let us know if it works & we'll just have to take it from there
 

Armando

2010/09/07 12:52

In reply to by cnewtonne

Hi cnewtone, I couldn't watch your screencast as it is too small on my screen.
 
I'm incapable to reproduce this problem at this point. I tried with a sample DB, with :
 
- Hierarchy ON/OFF, full or not
- Context parents ON/OFF
- Save Item State on/Off
- Filter applies to sub items ON/OFF
- Sorting applies to sub items ON/OFF (while nothing is in the sort box)
Etc.
 
It always works fine either with a sample dB , my own and with a new install.
 
Note that, as I said earlier, TLI can't retain a manual reordering of items. TLIs always follow the Iditem sorting by default OR the sort box filter.
 

Tom

2010/09/07 13:07

In reply to by Armando

[quote=Tom]
** EDIT:
I reckon I just dont have a very scientific / test-orientated mind - this also works without hierarchy selected (now that I check it)
But I know it didnt work earlier - but I unfortunately now have no idea why (that's a problem with doing quick tests) please try with these settings and let us know if it works & we'll just have to take it from there
[/quote]
 
I was able to reproduce the problem - a couple of times too - but each time I unfortunately misunderstood what was happening.
I'll try again later or tomorrow.....

Tom

2010/09/07 12:24

In reply to by Armando

I bolded the relevant text here:
[quote=Armando]
Note : someone talked about the # column. Actually, this column is dynamic and isn't a field per se -- its more or less to help see the hierarchical structure and item's position in it. Sorting doesn't follow that column. Rather, it follows the sorting (and sorting changes are shown after a refresh... Manual or automatic [sorting], depending on your grid settings)
[/quote]
[quote=Tom]I wonder could you set up a field that would copy the numbers from the first column - but only manually - so as it will stick even if the sort is somehow changed. That way you could simply ensure your sort is correct and then 'update'. Again you'd need more expert help for that - if it is possible
 [/quote]
> I wonder could you set up a field that would copy the numbers from the first column - but only manually - so as it will stick even if the sort is somehow changed [?]
 
If IQ can follow the manual sort (as Armando says above) it must have some way of knowing what that sort is ? Anyone know how that is done or is it in some manner (still) inaccessible to us ?
 

Armando

2010/09/07 12:56

In reply to by Tom

this is done at the DB (invisible...) level. Pierre can expand on the subject as I don't know the technical details. Note that as I said earlier, we should soon be able to manually reorder TLIs too.
 
The copying of the first column (#) was suggested in the past. The problem is that it would be a text field and text fields aren't sorted in the same way, so we'd have other problems. In any case, I think Pierre already has a solution for sorting issues, so let's wait for his input.

cnewtonne

2010/09/07 13:13

In reply to by Tom

Tom/Aramando et all ...
Here is a simple test to showcase my problem using a brand new db. Please play the attached zipped avi file.
 
 

Armando

2010/09/07 13:33

In reply to by cnewtonne

Ok, I see the problem. It happens in very specific circumstances.
 
When 1- you move an item from one  hierarchical level to another 2- and leave it there without moving it up or down among the other sub items , IQ chooses a default spot for it.
 
This doesn't happen if you move it up and down at least once.
 
Let's see if others can reproduce it, but I think that's the problem.

Armando

2010/09/07 13:34

In reply to by Armando

Ok Pierre was able to fix it + answer faster than I... just answered...  I should go back to bed... ;)

Hi cnewtonne,
 
Thanks to all for the detailed info. I was able to reproduce the issue and it is now fixed. v0.9.25 will be out today !
 

cnewtonne

2010/09/08 07:42

In reply to by Pierre_Admin

I'm glad I've been able to contribute to this vibrant community. Thanks for the fix. For now, I will continue to evaluate the software and share my findings accordingly.

cnewtonne

2010/09/08 12:08

In reply to by Pierre_Admin

I downloaded the latest release, it is still showing same issue. Am just being impatient?
 

Armando

2010/09/08 12:49

In reply to by cnewtonne

hehe,,, Yes, Pierre hasn't released it yet.
You'll see a post in the forum here (in the announcements section) when that happens. And...  the version number + date in the download section will change accordingly.

Pierre_Admin

2010/09/08 12:52

In reply to by cnewtonne

Yes, sorry for the delays, but just wanted to cram in a few goodies:
  1. Add field ItemHTMLWordCount. Auto-Update on save
  2. Add HomeGrid concept
  3. Add Favorites feature
  4. Add Drag-drop from search to grid

Armando

2010/09/08 13:43

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Yes, sorry for the delays, but just wanted to cram in a few goodies:
  1. Add field ItemHTMLWordCount. Auto-Update on save
  2. Add HomeGrid concept
  3. Add Favorites feature
  4. Add Drag-drop from search to grid
[/quote]
 
Wow! Pierre! You're on fire! :)

jan_rifkinson

2010/09/08 14:31

In reply to by Pierre_Admin

Wow !! Can hardly wait.