11-10-2010 06:50 AM
Hi,
Filenames listed in Diadem File browser are sorted alphabetically.
I would like to script how to load files in search results sorted by date of creation not by name.
11-10-2010 07:35 AM
Hi Andre Rako,
You mentioned two different ways of loading data into DIAdem (File Browser, Search Results). Which do you mean? There's no way to affect the ordering of the files in the File Browser, because that simply shows the same order as the files are in on disk-- the same order you see when you look with Windows Explorer.
The Search Results is a different story, however. After running any query, you can order to resulting Search Results list by clicking on the "up/down" icon at the top right of any column. In your case you'll want to display the datetime as a property column in the Search Results and then click on the "up/down" (enumeration) icon at the top of that column.
If you have DIAdem 2010 or later, you can also include the ordering of the Search Results as part of the query. There is now the "up/down" icon to the left of the condition in the Condition Table (just to the right of the C1, C2, text). You can click on this icon to set the ordering to be ascending, descending, or turned off.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
11-10-2010 09:33 AM
Hi Brad Turpin,
Thank you for your fast help. I'm be abble to include and to order the datetime in the search results.
Unfortunately I use Diadem 11.0 and it doesn't include the icon to set the ordering as part of the query.
Do you have a solution !
Thank you in advance !
11-11-2010 09:58 AM
Hi Andre Rako,
I'm confused. Your original post says that you want to order the files by date, and your last post says that you have succeeded in ordering the files by date in the Search Results. That's success, right? Yet your last post also asks, "Do you have a solution!" and "Thank you in advance!". Sooo, a solution to what, exactly? You have DIAdem 11.0. If you were to upgrade to DIAdem 2010 (11.2) you would be able to specify the date ordering as part of the query. But you are already able to order the Search Results of the query by date by clicking on the date property column in the Search Results of your DIAdem 11.0.
So what else do you want to accomplish?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
11-15-2010 04:31 AM
Hi Brad Turpin,
Thank you for your attention.
My problem is "to script and to automize" the date ordering as part of my script.
It works fine "manually" under the NAvigator/Search results but in two step (query and sorting the results by date).
I see that I have to upgrade to DIAdem 2010 (11.2) to specify the date ordering as part of the "script". Isn't it ?
Best regards.
Andre Rako
AREVA Group Renewable Energy / Helion Fuelcells at Aix en Provence France
11-15-2010 09:23 AM
Hi Andre,
No, if you can sort the Search Results manually the way you want to, then you can do it that way programmatically:
SortAscending = TRUE Set ResultsList = Navigator.Display.CurrDataFinder.ResultsList Call ResultsList.Elements.Sort("DateTime", SortAscending)
DIAdem 2010 would enable you to set the sort criteria as part of the query.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
11-16-2010 03:32 AM
Hi Brad,
Thanks a lot for your attention !
The modified script integrating your advise works fine.
For your information, we also update our Diadem version to Diadem 2010.
Thanks again !
Have a nice day
Andre Rako