Utility
The object Utility contains several functions and general utility methods.
path* = utility.savefiledialog(*title*,*filter*,*filename*)
Opens the save window allowing to go back the path of a file.
*path* = utility.openfiledialog(*title*,*filter*,*filename*)
Opens the selection window allowing to go back the path of a file.
*path* = utility.openfolderdialog()
Opens the folder selection window by restoring the selected value.
*value* = utility.tid()
Returns the current tid, i.e. the date in YYYYMMDDHHmmss format.
*value* = utility.gguid()
Returns a new gguid.
*value* = utility.getnow()
Returns the current date.
*value* = utility.formatdate(*timestamp*,*format*)
Formats the date as a string.
*value* = utility.formatnum(*number*,*numberdecimal*)
Formats a number as a string.
*value* = utility.datetostring(*timestamp*)
Converts a timestamp to a date.
*value* = utility.dateday(*timestamp*)
Extracts the day number from a timestamp.
*value* = utility.datemonth(*timestamp*)
Extracts the month number from a timestamp.
*value* = utility.dateyear(*timestamp*)
Extracts the year number from a timestamp.
*value* = utility.tidtotimestamp(*tid*)
Converts a tid to a timestamp.
*value* = utility.isnum(*value*)
Checks that the value is a number.
*value* = utility.convap(*value*)
Doubles the quotes of the string for SQL.
*value* = utility.convi(*value*)
Transforms a number into a string by replacing the commas with points to be used within an SQL string.
*value* = utility.stringwithspace(*value*,*space*)
Returns the string back by adding spaces at the bottom.
*v* = utility.stringreplace(*expression*,*find*,*rep*)
Returns a string by replacing a part of it.
*value* = utility.stringtrim(*expression*)
Returns a string by removing spaces at the beginning and end of it.