01-08-2014 12:42 PM
I am using a dataplugin to add both group and channel custom properties. The properties are both text and numeric, doubles and integers.
When I create a query in Navigator, I select the custom property using the dropdown, but the operator dropdown only has "=" or "<>". The property displayed in the Data Portal is a float number. I was having this problem when I was adding custom properties using a script. I then tried "Navigator:Settings/My DataFinder/Reset/Reset Index", then repopulated my Search Area, using the dataplugin on my raw data files. At this point, all my properties only have the "=" or "<>" operator choices in the query.
So it appears that my properties are numeric in the Data Portal, but string in the Navigator Query.
In advance, thanks
Solved! Go to Solution.
01-09-2014 07:12 AM
Hi Bill,
could it be the properties you are talking about are already "optimized" for query?
In case yes, did you do the optimization by script like
Dim oMyDataFinderSettings Set oMyDataFinderSettings = Navigator.ConnectDataFinder("My DataFinder").GetSettings() Call oMyDataFinderSettings.OptimizeCustomProperty(eSearchChannel, "Author_age")
And did you do this, before DataFinder has indexed some of your files?
In case yes, DataFinder has to make a guess the datatype of the property without example - so always "string" is chosen.
(If DataFinder has already indexed some(or better all) files containing the property, DataFinder will "optimze" the property in the datatype which occurs most for this property.)
In case you know the datatype of the property you are about to "optimze", you can provide this information to DataFinder
Call oMyDataFinderSettings.OptimizeCustomProperty(eSearchChannel, "myText", DataTypeString)
Call oMyDataFinderSettings.OptimizeCustomProperty(eSearchChannel, "myInt", DataTypeInt32)
Call oMyDataFinderSettings.OptimizeCustomProperty(eSearchChannel, "myFloat", DataTypeFloat64)
Call oMyDataFinderSettings.OptimizeCustomProperty(eSearchChannel, "myDate", DataTypeDate)
Stefan
01-09-2014 09:25 AM
Stefan, thanks for the reply. It certainly seems as though DataFinder has chosen "string" as the datatype for everything. I did not call "oMyDataFinderSettings.OptimizeCustomProperty(...", but called "DataFileLoad("myFile")" to run the dataplugin, and generate a TDMS file in the directory of DataFinder's Search Areas. Automatic indexing is triggered by "Data file changes". After I loaded all my raw data files, and have TDMS files, I do a "Navigator-Setting-My DataFinder-Optomize Custom Properties". In the past, this process did assign the correct datatype to my properties.
But now, it seems like I have incorrect index files.
So, I want to delete all the TDMS files from my Search Area (done), and delete the indicies of all the properties, so I can have a clean (empty) place to start over.
I will then start with "DataFileLoad(..".
But even though I have no files in my Search area, it seems like I still have properties (indexed incorrectly). "Settings-My DataFinder-Optomize Custom Properties" shows all the properties (not-optomized) I previously added.
So, how do I delete/empty my indicies so I can start over?
I would prefer not to write a script to specify the data type of each property. I have over 200 properties, and besides DIAdem automatically manages the indicies.
Thanks, Bill
01-09-2014 12:03 PM
Hi Bill,
You don't have to delete the files. Choose the NAVIGATOR menu "Settings >> My DataFinder >> Reset..." then clilck on the UPPER of the two buttons, the one called "Reset index". That will delete all data base records and re-index all your data files. If you have optimized any of these properties already, you should set them to the unoptimized state prior to resetting the index, otherwise the optimized property data types will persist.
If that doesn't help, then the problem could be in the DataPlugin yuo're using.
Brad Turpin
DIAdem Product Support Engineer
National Instruments