Thursday, March 4, 2010

Global::queryValue method

This method translates anything into the correct query range value, so you don't have to care about how UTCDateTime value should be converted into a string or which symbols require slash before them. It is the best practice to always use this method when query range is assigned a value, even if the value is string.

Note, that queryValue('') will return the following string '""' (two double quotes) which will give empty string range value. If you want to clear the range you'll have to assign it's value with empty string directly.


  1. .. but cannot be used for a Time expression. Since Global::queryValue(TimeVar) returns the numerical value of the time value which cannot proceeded in a query ...

    In that case you have to use another fitting function.

  2. You are right! I actually never paid attention to this fact. I believe this issue has to be resolved somehow but I don't know how the right fix should look like.

  3. You could be also interested in some methods from the SysQuery class - for example, see the difference between valueEmptyString() and valueUnlimited().

  4. Yes, there are a lot of useful things there. However I like queryValue method exectly because it translates empty string to "valueEmptyString()" - which is very natural in my mind. And if you want to clear range then you have to use valueUnlimited()

  5. It's actually a nice and useful piece of info. I am satisfied that you shared this useful info with us. Please keep us up to date like this. Thank you for sharing.
    Feel free to visit my site :: weight loss tips