Methods
addAction(String,String,Bool)
Adds an action to the Screen definition associated with this script (when the script is the load script for a Screen). An action is essentially a connection between a button with a given name and a script. When a button in the screen is pressed, the list of actions is checked, and the action with the matching button name (e.g. “ok”, “cancel”, “addSomething”) will be found and the script will be executed.Normally, doCheck should be True for buttons that submit the form, and False for buttons that add lines to grids, and so on.
addChatMessage(Integer,String,Integer,String,Integer,String)
Adds a message to a chat session.You can optionally pass a <code>DateTime</code> to set when the message will show up.
addChatMessage(Integer,String,Integer,String,Integer,String,DateTime)
Adds a message to a chat session and sets when the message will show up.This variant of addChatMessage() is especially used for ChatBot-integrations.
addHtmlElement(Integer,String,Integer,Map)
Adds an HTML element to the associated screen when this script is executed as the load script for a screen.You can optionally provide the zero-based position of the element in the list of elements for the screen.
addHtmlElement(Integer,String,Integer,Map,Integer)
Adds an HTML element to the associated screen with a zero-based position when this script is executed as the load script for a screen.addHtmlElement(Integer,String,Integer,String)
Adds an HTML element to the associated screen when this script is executed as the load script for a screen.You can optionally provide the zero-based position of the element in the list of elements for the screen.
addHtmlElement(Integer,String,Integer,String,Integer)
Adds an HTML element to the associated screen with a zero-based position when this script is executed as the load script for a screen.assert(Bool)
Throws an AssertException if condition is false. The exception contains the line number where the assert occurred.Used primarily with unit testing.
assertEquals(Bool,Bool)
Throws an AssertException if the two parameters are not equal. Specifically: if bool1!=bool2. The exception contains the line number where the assert occurred.Used primarily with unit testing.
assertEquals(Float,Float)
Throws an AssertException if the two parameters are not equal. Specifically: if float1!=float2. The exception contains the line number where the assert occurred.Used primarily with unit testing.
assertEquals(Integer,Integer)
Throws an AssertException if the two parameters are not equal. Specifically: if integer1!=integer2. The exception contains the line number where the assert occurred.Used primarily with unit testing.
assertEquals(String,String)
Throws an AssertException if the two parameters are not equal. Specifically: if string1!=string2. The exception contains the line number where the assert occurred.Used primarily with unit testing.
authenticateCustomer(String,String)
Checks a customer’s username and password. Returns personId if successful, otherwise a null Integer.buildUrl()
Returns all POST and GET variables for the current URL.cgiWasPost()
Checks if the CGI HTTP request was of type POST.Service uses only GET and POST. POST is used when submitting most forms, a GET request is usually someone clicking a link, first time entering the bLogic screen.
checkReply(String)
Checks if it is ok to send a receipt to the indicated email address.Every time this method is called, it records that an email has been sent to the email address. If this is done too often within a specified time interval (specified in config table), you should not send an email to the email address to prevent swamping.
combineHtmlStrings(Vector)
Takes several strings, each containing an HTML document, and combines them into one HTML string.The head contents in each string is combined into the head tag of the output string, except for the title tag. The title tag is taken from the first string in the vector.The body content is likewise combined into the body tag of the output string. All strings except for the first will have their body tags converted to div tags.
convertStatus(Integer)
Converts a status given by its integer identifier to its string representation.The method is language-dependent.
copyCRMDocumentToAttachment(Integer)
Copies the content of a CRM Document, given the ID, to a new Service attachment.There is no sync between these two, so only a copy at the point of time is made.
debugWait(String)
Pauses the script if it is in debug mode (see enableDebug). Stores the info string in the database entry for the current debug session so that it can be viewed in the debugger.decodeBase64(String)
Decodes a base64-encoded string into a byte array.decodeBase64AsStream(String)
Decodes a base64-encoded string into an NSStream.decodeDBValue(String)
Decodes the value returned by for example NetServer archives, i.e [I:23], and returns the value as a string.You must convert it into the preferred type if used as anything else than a string.
enableDebug(String)
Enables debugging for the current script, with the given ID. If the executing environment contains the same debugId, then this script will enter debug mode.To set the debugId in a browser, use the “?action=debug” parameter. It is possible to debug a script, while it will continue to run as normal for other users.
encodeBase32(Byte[])
Encodes bytes to a base32 string.encodeBase64(Byte[])
Encodes bytes to a base64 string.You can optionally pass a Bool to control if the encoded data should be wrapped with new lines or not.
encodeBase64(Byte[],Bool)
Encodes bytes to a base64 string specifying if the encoded data should be wrapped with new lines or not.encodeBase64(NSStream)
Encodes bytes to a base64 string.You can optionally pass a Bool to control if the encoded data should be wrapped with new lines or not.
encodeBase64(NSStream,Bool)
Encodes bytes to a base64 string specifying if the encoded data should be wrapped with new lines or not.encodeHMACSHA1(Byte[],Byte[])
Generates and returns a hash from a specified key-value pair using the HMAC SHA1 encoding algorithm.This can be used to ensure data integrity. The hash cannot be decrypted back.
encodeHMACSHA1(String,String)
Generates and returns a hash from a specified key-value pair using the HMAC SHA1 encoding algorithm.This can be used to ensure data integrity. The hash cannot be decrypted back.
encodeHMACSHA256(String,String)
Generates and returns a hash from a specified key-value pair using the HMAC SHA256 encoding algorithm.This can be used to ensure data integrity. The hash cannot be decrypted back.
encodeHMACSHA512(String,String)
Generates and returns a hash from a specified key-value pair using the HMAC SHA512 encoding algorithm.This can be used to ensure data integrity. The hash cannot be decrypted back.
encodeSHA1(String)
Generates and returns a hash from a specified value using the SHA1 encoding algorithm.This can be used to ensure data integrity. The hash cannot be decrypted back.
encodeSHA256(String,String)
Generates and returns a hash from a specified key-value pair using the HMAC SHA256 encoding algorithm.This can be used to ensure data integrity. The hash cannot be decrypted back.
executeDbiAgentSchedule(Integer,Map)
Manually starts a DBI agent schedule. It is possible to supply a map of parameter values used by the schedule.executeMacro(String)
The outermost function for executing a macro.executeScript(String,Map)
Function to execute CRMScript code supplied.
executeSQLQuery(String)
Executes the specified SQL statement. This function is not available in CRM Online!In case of an error in the SQL statement, an exception will be thrown.
exitWithMessage(String)
Exits running the rest of the script and displays a message with text from the parameter.Useful for exiting a script when for example detecting that the current user doesn’t have access to a ticket.
faqSearch(Integer,Integer,String,Parser,Integer)
Searches FAQ using the same search engine as the customer pages do and fills the parser with the result.Available parser variables (sorted, where the top most is the best hit):
Category parser array
- faq.categoryId - the id of the matching category
- faq.categoryName - the name of the matching category
- faq.categoryLink - a URL to the customer pages to the matching category
- faq.categoryDescription - the description of the matching category
- faq.categoryScore - the score of the matching category, given in percentage with 2 decimals precision
Entry parser array
- faq.entryId - the ID of the matching entry
- faq.entryName - the name of the matching entry
- faq.entryLink - a URL to the customer pages to the matching entry
- faq.entryQuestion - the question part of the matching entry
- faq.entryScore - the score of the matching entry, given in percentage with 2 decimals precision
findReplyTemplateToMerge(Integer)
If you have configured any categories to use specified ReplyTemplates, use this method to calculate the ReplyTemplate ID.flushCaches()
Flushes the caches in NetServer.forceSaveTrace(Bool)
If there is a script trace enabled for the current script, with the exception-only flag set, calling this method with true as the parameter will make the trace become saved, just like if there was an unhandled exception.forwardMail(String,String,Integer)
Forwards preformatted email.getActiveUser()
Returns a reference to the active user instance.getAgentId(String)
Returns the ID of the agent matching the parameter.getAgentScheduleId(String)
Returns the ID of the agent schedule with the given name.getAttachmentsSize(Integer[])
Gets the total byte size of the specified attachments.getCategoryIdFromFullname(String)
Finds category ID from the category’s full name.getCgiContent()
Returns the raw content of the HTTP request.getCgiUrl()
Returns the cgiUrl value from the config table. For example, http://ejournal.company.comUsed for creating URLs.
getCgiVariable(String)
Returns the CGI variable with the given name.getCgiVariableArray(String)
Returns a string array of all CGI variables matching the given namegetCgiVariables()
Returns a map of all CGI variables.getCookie(String)
Returns the CGI cookie with the given name. This method is not available in CRM Online.getCurrent(String)
Gets the value of the given key from the map of values common to all of the SuperOffice web applications running.getCurrentDate()
Returns the current date.getCurrentDateTime()
Returns the current date and time.getCurrentTime()
Gets the current time.getCustomerMainEmail(Integer)
Returns the main email of the specified customer.getDbiControl()
Used to access the global DBI control object, which is used for database integration.getDefaultElementConfig(Integer,String,String)
Returns the default config for an element type given a table and language.getDocumentId(String)
Returns the ID of the document with the given name.getEnvVariable(String)
Returns the OS environment variable with the given name. This method is not available in CRM Online.getEventData()
Returns an EventData object connected to the current event.getExecutable()
Returns the executable with the full path that the current script is running in.getExternalProgram(Integer)
Returns the external URL of the program module specified by progId (if available).progId
getExternalProgramAdmin()
Returns the external URL of the program module specified after getProgram.getExternalProgramAjax()
Returns the external URL of the program module specified after getProgram.getExternalProgramBlogic()
Returns the external URL of the program module specified after getProgram.getExternalProgramChat()
Returns the external URL of the program module specified after getProgram.getExternalProgramCustomer()
Returns the external URL of the program module specified after getProgram.getExternalProgramDocument()
Returns the external URL of the program module specified after getProgram.getExternalProgramHelp()
Returns the external URL of the program module specified after getProgram.getExternalProgramKnowledge()
Returns the external URL of the program module specified after getProgram.getExternalProgramRms()
Returns the external URL of the program module specified after getProgram.getExternalProgramSoap()
Returns the external URL of the program module specified after getProgram.getExternalProgramStat()
Returns the external URL of the program module specified after getProgram.getExternalProgramTicket()
Returns the external URL of the program module specified after getProgram.getExtraTable(String)
Returns the ExtraTable instance for the given name.Throws an exception if the table does not exist.
getFavourites(String)
Returns an array containing the IDs of all favorites in the given table.getFunctionList()
Returns an array with the description of all CRMScript functions defined in the system.getGlobalStaticMap()
Returns a global and static map.Useful to eliminate the need to fetch the same info several times within one run of the app, bLogic events and ticket save especially.
getGlobalVariable(String)
Gets a value from the global variables.Used for communication between different scripts.
getHtmlElement(String)
Returns a reference to an HtmlElement in the associated screen.getHtmlElementIndex(String)
Gets the index of the specified HTML element. This is useful if you want to insert elements after a particular HTML element, and you do not know the index of it.Can only be called from a screen definition, it will fail if called from a regular script.
getHtmlElementName(Integer)
Returns the name of the element with the given index.getHttpHeader(String)
Returns the value of the specified header name.Header names
- ACCEPT-*
- ACCESS-CONTROL-REQUEST-METHOD
- ACCESS-CONTROL-REQUEST-HEADERS
- CACHE-CONTROL
- CONTENT-LENGTH
- CONTENT-TYPE
- DATE
- DNT
- EXPECT
- IF-*
- ORIGIN
- PRAGMA
- RANGE
- REFERER
- REQUEST-METHOD
- REQUEST-URI
- TE
- USER-AGENT
- X-CRMSCRIPT-*
- X-FORWARDED-FOR
- X-REQUESTED-WITH
- X-SUPEROFFICE-EVENT
- X-SUPEROFFICE-EVENTID
- X-SUPEROFFICE-RETRY
getLanguageVariable(String)
Converts a language variable to a string in the language of the current user or, if provided, corresponding to a specific language code.Searches in the language variables for the current screen in addition to the common language variables.
getLanguageVariable(String,String)
Converts a language variable to a string in the language of the current user or, if provided, corresponding to a specific language code.Searches in the language variables for the current screen in addition to the common language variables.
getLocalTimeZone()
Returns the local timezone.getMainMenu()
Returns a reference to the global MainMenu instance.Used for changing the left-hand menu in the system.
getNtUser()
Returns the username supplied from the web server.Works with Apache and IIS, but required user authentication on the web server.Derived from UNMAPPED_REMOTE_USER or REMOTE_USER environment variable
getNumHtmlElements()
Returns the current number of the HtmlElements in the current screen.getParser()
Returns a reference to the global Parser instance.getParserParameter(String)
Returns the value of the given parameter in the global Parser instance.You can optionally pass the zero-based index of the value.
getParserParameter(String,Integer)
Returns the value of the given parameter at the zero-based index in the global Parser instance.getParserParameterCount(String)
Returns the number of values for the given parameters in the global Parser object.getParserVariable(String)
Returns the (first) value for the given variable from the global Parser instance.You can optionally pass the zero-based row of the parser-query result set.
getParserVariable(String,Integer)
Returns the (first) value for the given variable from the global Parser instance at the zero-based row of the parser-query result set.getParserVariableAsCSV(String,Bool)
Returns a variable from the global Parser instance as a comma-separated string.getParserVariableCount(String)
Returns the number of values for the specified value in the global Parser instance.getPID()
Returns the PID of the executable that the script is running in.getPriorityIdFromName(String)
Returns the ID of the priority with the given name.getProgram(Integer)
Returns the URL of the program module specified by progId.progId
getProgramAdmin()
Returns the URL of the program module specified after getProgram.getProgramAjax()
Returns the URL of the program module specified after getProgram.getProgramBlogic()
Returns the URL of the program module specified after getProgram.getProgramChat()
Returns the URL of the program module specified after getProgram.getProgramCustomer()
Returns the URL of the program module specified after getProgram.getProgramDocument()
Returns the URL of the program module specified after getProgram.getProgramHelp()
Returns the URL of the program module specified after getProgram.getProgramKnowledge()
Returns the URL of the knowledge base (document.exe).getProgramRms()
Returns the URL of the program module specified after getProgram.getProgramSoap()
Returns the URL of the program module specified after getProgram.getProgramStat()
Returns the URL of the program module specified after getProgram.getProgramTicket()
Returns the URL of the program module specified after getProgram.getReplyTemplateBody(Integer,Bool,Integer)
Returns reply template text as specified by the parameters.getReplyTemplateSubject(Integer,Integer)
Returns reply template subject.getScreenElementConfig(Integer)
Returns the config of the screen element with the given index in the current screen definition.Can only be called from a screen definition, it will fail if called from a regular script.
getScreenElementId(Integer)
Returns the ID of the screen element with the given index in the current screen definition.Can only be called from a screen definition, it will fail if called from a regular script.
getScreenElementName(Integer)
Returns the name of the screen element with the given index in the current screen definition.Can only be called from a screen definition, it will fail if called from a regular script.
getScreenElementType(Integer)
Returns the type of the screen element with the given index in the current screen definition.Can only be called from a screen definition, it will fail if called from a regular script.
Simple elements
- TypeAnchorLine = 1,
- TypeInfoFields = 2,
- TypeGrid = 3,
- TypeHR = 4,
- TypeBR = 5,
- TypeSubHeader = 6,
- TypeParserCode = 7,
- TypeMessages = 8,
- TypeEjScript = 9,
- TypeHtmlGrid = 10,
- TypePlanner = 11,
- TypeStaticGrid = 12,
- TypeDrillDown = 13,
- TypeGenericGrid = 14,
- TypeInfoFields2 = 15,
- TypeExtraTableEntriesGrid = 16,
- TypeDirectedAcyclicGraph = 17,
Form elements
- TypeText = 101,
- TypeTextarea = 102,
- TypeSelectCategory = 103,
- TypeSelectCustomer = 104,
- TypeSelectCompany = 105,
- TypeSelectDate = 106,
- TypeSelectDateTime = 107,
- TypeSelectTime = 108,
- TypeButtonRow = 109,
- TypeCheckbox = 110,
- TypeEditor = 111,
- TypeInvoice = 112,
- TypeSelectUser = 113,
- TypeSelectExtraField = 114,
- TypeSelect = 115,
- TypeSendTo = 116,
- TypeSelectReplyTemplate = 117,
- TypeSelectTimeSpan = 118,
- TypeSelectRelation = 119,
- TypeSelectPriority = 120,
- TypeCc = 121,
- TypeAttachment = 122,
- TypeSelectSlevel = 123,
- TypeCustomers = 124,
- TypeSelectFaq = 125,
- TypeSelectDictionaryLang = 126,
- TypeButton = 127,
- TypeSelectMultipleRelations = 128,
- TypeTreeExplorer = 129,
- TypePinEdit = 130,
- TypeContactRecipients = 131,
- TypeTicketStatus = 132,
- TypeSelectMessage = 133,
- TypeCategoryMembership = 134,
- TypeAddressBook = 135,
- TypeRelatedDropdowns = 136,
- TypeSelectTicketStatus = 137,
- TypeSelectTable = 138,
- TypeFckEdit = 139,
- TypeWhere = 140,
- TypeSelectInsertText = 141,
- TypeRadioButtons = 142,
Groups
- TypeFieldset = 201,
- TypeLayoutTable = 202,
- TypePanes = 203,
- TypePane = 204,
- TypeVerticalTable = 205,
Group end marker
- TypeGroupEnd = 301
getScriptId(String)
Returns the ID of the script matching the parametergetSelectionIds(Integer)
Returns the IDs of the objects in the selection with the given ID.getSessionVariable(String)
Makes it possible to store variables in the database which the web application can use as long as a session lives. That is until a user logs out.getSessionVariables()
Returns a map containing all session variables for the current session.getStatusIdFromName(String)
Returns the ID of the status with the given name.getSystemFlags()
Gets the system flags. This is the same value as is stored in the database table config.flags.getSystemLang()
Returns the active system language.getUserLang()
Returns the active user language.getUsername(Integer)
Gets username from the user ID.getVariable(String)
Returns the value in the global environment (used for communication between the script the calling context).getVariables()
Returns a map containing all run time environment variables (available through getVariable()).getWarnings()
Returns a map of the current system warnings.Warnings are messages intended for system administrators, such as email failure warnings, expired FAQ entries, etc. They are normally listed on the status screen.
htmlConvToText(String)
Converts the given HTML text to plain text.idToLang(Integer)
Returns the code of the given language ID.installPackage(String)
Installs a package provided as xml.invoiceTypesExists()
Checks if invoice types exist in the database.isValidPhoneNumber(String,Bool)
Validates if it is a valid phonenumberlangToId(String)
Returns the ID of the given language code.log(String)
Writes a message to the new log (the one in the database), which can be accessed with “rms?action=newLog”.logMessage(String)
Writes a message to the log file.makePassword(Integer)
Used to create a random password of length p, with the given seed charactersCreates and returns a random password of the given length. You can optionally pass the given seed characters.makePassword(Integer,String)
Used to create a random password of length p, with the given seed charactersCreates and returns a random password of the given length.mapValue(String)
Allocates a new map and maps the given value to the string “value”.modulo(Integer,Integer)
Returns a modulo b. This can also be done with the syntax “a % b”.parseJSON(String)
Parses a JSON document and generate a tree of XMLNode’s.This function has a bug. Empty arrays will still return one child. We recommend using <code>parseJSON2()</code> instead where this bug has been fixed. Except for the fix, the function is identical. It is available from 8.4R03.
parseJSON2(String)
Parses a JSON document and generate a tree of XMLNode’s.parseXML(String)
Parses an XML document and generate a tree of XMLNode’s.pauseTracing(Bool)
Pauses or unpauses script tracing, depending on the parameter. Multiple calls to pauseTracing(true) must be matched with an equal number of calls to pauseTracing(false) to unpause.pow()
The pow function returns base raised to the expth power.print(String)
Prints the string to the screen.Will only work in certain contexts (when there is a screen to print to).
printBinary(Byte[])
Outputs the bytes to the standard output stream. You can pass the data to encode as either Byte[] or NSStream.printBinary(NSStream)
Outputs the bytes to the standard output stream. You can pass the data to encode as either Byte[] or NSStream.printDebug(String)
Adds the input debug to the debug string which will be shown in the debug window.printLine(String)
Prints lines into standard output without appending \rin p_line.
rand(Integer,Integer)
Returns a random value between min and max. The seed is set by the cgi application when it is invoked.reloadAndSendShipment(Integer)
Reloads mailings selections and schedule to send again immediately.Used when you have added more people to the selection and want to send to them as well.
removeHtmlElement(Integer)
Removes the element with the given indexCan only be called from a screen definition, it will fail if called from a regular script
removePackage(String)
Removes the package with the given name.resetChat(Integer)
Resets a chat session and places it in queue/pre-chat-form/offline-form depending on the topic’s settings.Typically called when a Bot wants to transfer a chat session to a human user agent.
runProgram(String)
Executes the program (given command) and returns what was sent to stdout. This method is not available in CRM Online.The owner of the process running the CRMScript needs permissions to execute the program. You can optionally pass the codepage used.
runProgram(String,String)
Executes the program (given command) with a codepage and returns what was sent to stdout. This method is not available in CRM Online.The owner of the process running the CRMScript needs permissions to execute the program.
saveAllCgiAttachments(String)
Saves all cgi attachments with the given name.saveCgiAttachment(String)
Saves the attachment in cgi variable with the name given and returns the ID of the attachment record in the attachment table.setChatStatus(Integer,Integer)
Changes the status of a chat session.The available statuses are:
- StatusInvalid = 0,
- StatusPreChatForm = 1,
- StatusFaq = 2,
- StatusOfflineForm = 3,
- StatusInQueue = 4,
- StatusCustomerLast = 5,
- StatusUserLast = 6,
- StatusFinished = 7,
- StatusDeleted = 8,
- StatusClosed = 9,
- StatusRequestPosted = 10,
setCookie(String,String,Bool)
This method is not available in CRM Online.NB! Doesn’t work in the customer center, use parser variable with an underscore (_) instead.
setCurrent(String,String)
Maps the given key and value in the map of the values common for all the SuperOffice web applications running.setFromCgi()
Sets all the elements of the associated screen from the global CGI instance. This is normally done when a screen is loaded/reloaded but after the load script.This function allows one to force this element initialization in the script, so that values may be accessed.n
setGlobalVariable(String,String)
Sets the value of a global variable (used for communication between different scripts).setHidden(String,String)
Sets the value of a hidden variable in the associated screen. Hidden variables are values that are carried through a screen, and which can be accessed by the following scripts.setPageFocusFirstControl(Bool)
Used to set focus to first control in screens.setPageOnLoad(String)
Void setPageOnLoad(String onLoad)setPageRefresh(Integer)
Sets the page meta refresh to the specified seconds, thus making the screen refresh.If this method is used in a script that is not connected to a screen, nothing will happen.
setPageTitle(String)
Alters the page title. You will be able to set the text after the version information.setParserVariable(String,String)
Sets (adds) a variable to the global Parser instance.setSessionVariable(String,String)
Writes a SessionObject entry to the databaseWrites a SessionObject entry to the database.Stores variables in the database that the web application can use as long as a session lives (until a user logs out).
setUserIsTyping(Integer,Bool)
Sets or clears the “User is typing” flag of a chat session.setVariable(String,String)
Sets the value in the global environment (used for communication between the script the calling context).simpleTwoWay(Byte[])
Simple two-way data encryption. Data -> Encrypted data -> datasleep()
Sleeps (give up CPU) for some time.Useful in some CPU-intensive loops to maintain a responsive system.
getTypeName(Generic)
Returns the type of a variable (will automatically be up-casted to generic).getGenericValue(Generic, String)
Returns a variable from the run-time environment given its name and independent of its type.An exception is thrown if the name is unknown, or the struct is not a struct.
getGenericValue(String)
Returns a variable from the run-time environment given its name and independent of its type. You can optionally provide a struct to scope the variable.An exception is thrown if the name is unknown, or the struct is not a struct.
GenericToBool(Generic)
Converts a Generic variable to a Bool (explicit downcast). Together with getTypeName(), this function can be used to get an explicit typed variable.If the generic doesn’t represent the correct type, an exception is thrown.
GenericToInteger(Generic)
Converts a Generic variable to a Integer (explicit downcast). Together with getTypeName(), this function can be used to get an explicit typed variable.If the generic does not represent the correct type, an exception is thrown.
GenericToFloat(Generic)
Converts a Generic variable to a Float. Together with getTypeName(), this function can be used to get an explicit typed variable.If the generic does not represent the correct type, an exception is thrown.
GenericToString(Generic)
Converts a Generic variable to a String (explicit downcast). Together with getTypeName(), this function can be used to get an explicit typed variable.If the generic does not represent the correct type, an exception is thrown.
convertGenericToString(Generic)
Returns the string representation of a variable. The argument is automatically be up-casted to a Generic.Not all types have implemented support for this, and might return “[complex]”. All the basic types (String, Integer, Float, and so on) will return a correct string representation of their value.
setGenericFromString(Generic, String)
Sets the value of a variable from a string. It supports only basic types. In combination with for example getStructMembers() and getGenericValue(), this function can be used to iterate a struct and set all its members programmatically instead of having to explicit hard-code each one of them.Attempting to set an array or a complex type will throw an exception.The value must be formatted according to the constructor of that type. Specifically, Date, DateTime, and Time must be on the YYYY-MM-DD HH:MI:SS format.
GenericToDate(Generic)
Converts a Generic variable to a Date (explicit downcast). Together with getTypeName(), this function can be used to get an explicit typed variable.If the generic does not represent the correct type, an exception is thrown.
GenericToDateTime(Generic)
Converts a Generic variable to a DateTime (explicit downcast). Together with getTypeName(), this function can be used to get an explicit typed variable.If the generic does not represent the correct type, an exception is thrown.
GenericToTime(Generic)
Converts a Generic variable to a Time (explicit downcast). Together with getTypeName(), this function can be used to get an explicit typed variable.If the generic does not represent the correct type, an exception is thrown.
GenericToTimeSpan(Generic)
Converts a Generic variable to a TimeSpan (explicit downcast). Together with getTypeName(), this function can be used to get an explicit typed variable.If the generic does not represent the correct type, an exception is thrown.
GenericToByte(Generic)
Converts a Generic variable to a Byte (explicit downcast). Together with getTypeName(), this function can be used to get an explicit typed variable.If the generic doesn’t represent the correct type, an exception is thrown.
GenericToArray(Generic)
Converts a Generic variable to an array of Generic (explicit downcast). Typically, this function is used when traversing the members of a struct, and one of the members is an array. This can be tested with getTypeDimensions(), and then GenericToArray() can be used to access the sub-elements of the array for further (recursive) processing.If the generic does not represent an array, an exception is thrown.
getTypeDimensions(Generic)
Returns the number of array dimensions for a variable. The argument is automatically up-casted to a Generic.This is the number of dimensions in, not the length of, the array!
typeIsStruct(Generic)
Checks whether a variable is a struct or not. Any variable can be checked. The argument is automatically up-casted to a Generic.getStructMembers(String)
Returns the variable names of a struct given its name. It does not includes functions in the list.This is the names, not the actual values. To get those, call getGenericValue() using the member names.