Function Reference
The following Functions are currently built into Querki:
Common Functions
- _allProps -- What are the Properties in this Space?
- _allRefs -- Produces all references to this Thing, whether in Thing or Tag Properties
- _allThings -- This receives a Space, and produces all of the Things in that Space
- _allTypes -- What are the Types in this Space?
- _and -- Produces true iff all of the parameters are true
- _average -- Calculate the average of some Ratings
- _checkList -- Display a checklist of items to add or remove from a Set.
- _children -- This produces the immediate children of the received Model.
- _class -- Add a class tag to the received HTML value
- _code -- Display a block of QL code
- _comments -- Produces the Comments in this Conversation or Thread
- _concat -- Concatenates the Lists given as parameters
- _contains -- Produces true if the received List contains the specified value
- _count -- Produces the number of elements in the received Collection
- _createButton -- Becomes a Create button for the received Model
- _createInstanceLink -- Given a received Model, this produces a Link to create an instance of that Model.
- _createTime -- Given a Thing, this produces the time when that Thing was created, if known
- _creator -- Given a Thing, this produces the Person who created that Thing, if known
- _currentSpace -- What Space are we looking at?
- _data -- Add HTML5 data to the received HTML value
- _date -- Says what date something happened
- _dayOfMonth -- Gets the day of the month from a Date
- _debugLog -- Sends the given value to the Debug Log
- _definedOn -- Fetch the Thing or Model Value that the current Property was defined on, inside of _foreachProperty
- _desc -- Sort this list in descending order
- _divideBy -- Divide one value by another
- _drop -- Produces all but the first N values from the received context.
- _edit -- Puts an editor for the specified Property into the page
- _editAsPickList -- Edits a Tag or Link Set as a Pick List
- _editOrElse -- Like _edit, but you can say what to show if the user can't edit this Property
- _emailLink -- Creates a link to open an email in your mailer
- _equals -- Do these parameters match?
- _externalRoots -- What are the ancestor Things for this Space?
- _filter -- Remove non-matching elements of a collection
- _first -- Grabs just the first thing from the received context.
- _firstNonEmpty -- Produces the first parameter that is not empty.
- _foreach -- Applies the parameter to each element in the received collection, and produces a collection of the results
- _foreachProperty -- Applies the given function to each Property in the received Thing or Model Value
- _getChanges -- Fetch the Publication history of this Space, so you can see what has changed.
- _greaterThan -- Is the first parameter greater than the second?
- _hasPermission -- Produces true if the current user has the named permission on the received Thing
- _hasRole -- Lets you check whether the current user, or some other Person, has the specified Role
- _iconButton -- Displays a button showing an icon, that goes to a linked page when you press it.
- _if -- Choose what to produce, as directed
- _instances -- Returns all of the non-Model Things that are based on this
- _is -- Allows you to test whether you have a specific Thing
- _isA -- Allows you to test whether this Thing is descended from a given Model
- _isAnUpdate -- This says whether a _publishedThingType is an Update (if true) or the first Publish for this Thing (if false)
- _isBound -- Is the specified name currently bound?
- _isContainedIn -- Produces true if the received value is found in the specified List
- _isDefined -- Produces Yes if the name passed into it is a real Thing
- _isEmpty -- Tests whether the provided value is empty
- _isInherited -- Says whether the current Property's value is locally defined or was inherited from the Model, inside of _foreachProperty
- _isMinorUpdate -- This will be true iff this was marked as a Minor Update
- _isModel -- This produces Yes if the received Thing is a Model.
- _isNonEmpty -- Tests whether the provided value is non-empty
- _join -- Combine a list of Text values together
- _kind -- What kind of Thing is this?
- _latestCommentTime -- Given a Conversation, this returns the Time of the most recent comment. Mainly used for sorting Conversations.
- _lessThan -- Is the first parameter less than the second?
- _linkButton -- Displays a button that goes to a linked page when you press it.
- _listDeletedThings -- Lists the Things in this Space that pass the given filter, that have been deleted.
- _mapLink -- Get a link to the Google Map for a Location
- _max -- Produces the most of the received values
- _me -- If the current user is a Person in the current Space, return that Person
- _min -- Produces the least of the received values
- _minus -- Subtract one value from another
- _mixedButton -- Displays a button showing an icon and a text label, that goes to a linked page when you press it.
- _modTime -- When was this Thing last changed?
- _model -- Produces the Model of the received Thing
- _month -- Gets the month from a Date
- _not -- Returns the reverse of the received value, or the parameter
- _notify -- Sends a notification to one or more Members of this Space
- _oid -- Get the unique global id of this Thing
- _or -- Produces true iff any of the parameters are true
- _personIdentity -- Given a Person (such as a Member), this produces the Identity corresponding to that Person
- _photoTarget -- The target location to show one of a List of Photos
- _pluralize -- Produces the right word depending on how many elements are in a collection.
- _plus -- Add two values together
- _positions -- Find the positions of a given value inside the received value
- _prop -- Fetch the current Property, inside of _foreachProperty
- _propLink -- Produces a Link to a specific Property on a Thing.
- _propsOfType -- This receives a Type, and produces all of the Properties in this Space with that Type
- _publish -- Publish the received Things, just like pressing the Publish button in the UI
- _publishedName -- Given a _publishedThingType, this produces its Name at the time it was Published or Updated.
- _publishedNotes -- Any Change Notes that were included with this Publish or Update.
- _publishedThings -- This produces the Things involved in a Publish or Update event.
- _publishedView -- Given a _publishedThingType, this produces what it looked like when it was Published or Updated.
- _random -- Select an item at random from a list
- _refs -- Returns all of the Things that use this Property to point to this Thing.
- _resolveIdentity -- Given a Link to an Identity, this fetches that Identity
- _resolveTags -- Turns any of the received Tags that name actual Things into Links to those Things
- _rest -- Produces everything but the first thing from the received context.
- _reverse -- Produces the same Collection it receives, as a List, in reverse order
- _roleMembers -- Lists all of the Persons with the specified Role
- _search -- Searches for the specified text, and produces the matches
- _searchInput -- Displays a Search input box here
- _section -- Display a List as a Header, followed by its contents
- _self -- Get a Link to this Thing
- _showLink -- Displays a link that goes to a linked page when you press it.
- _sort -- Sort the received list
- _space -- What Space is this Thing in?
- _tagRefs -- Produces a List of all Things that have the received Thing or Name as a Tag
- _tagsForProperty -- Show all the Tags that are defined for this Property
- _take -- Produces the first N values from the received context.
- _textInput -- Displays a text input field, which can be used by other displays like
_checkList
- _thing -- Says which Thing was involved in something
- _thingConversations -- Produces the Conversations on this Thing, if any.
- _thingValues -- Fetch all of this User's User Values
- _thumbnail -- Show the thumbnail version of the received photos
- _times -- Multiple two values together
- _toSet -- Turns the received List into a Set, with no duplicates
- _today -- Produces today's Date
- _tooltip -- Add a tooltip to the received HTML value
- _userValues -- Fetch all of the User Values for this Property on this Thing, for all Users
- _val -- Fetch the Value part, inside of _foreachProperty
- _who -- Fetch who did something
- _withParam -- Adds the specified query parameter to a Link or URL
- _withValueIn -- Produces the instances of this Model that have the specified value
- _year -- Gets the year from a Date
There are also some pseudo-Methods, which are just shortcuts for common operations:
Or, you can see the entire details as
one page.
Advanced Functions
These functions are relatively complex, and are mainly intended for programmers who want to build more involved Spaces.
- _JSONify -- Turn the received value into JSON
- _QLButton -- Shows a button that, when pressed, executes some QL and can show the result
- _QLInput -- Shows an input field that, when the user types some text and presses Enter, executes some QL and can show the result
- _QLLink -- Shows a link that, when clicked, executes some QL and can show the result
- _asType -- Convert one or more values of one Type to another Type
- _changeProperties -- Change one or more Properties of the received Thing
- _copyThing -- Copy an existing Thing
- _createHere -- *Deprecated -- Create a new Thing as part of displaying this expression*
- _createThing -- Create a new Thing
- _deleteThing -- Delete a Thing
- _fold -- Applies a QL expression iteratively to the elements of a List
- _formLine -- Display a label/control pair for an input form
- _groupBy -- Groups the received Things by the specified Property or Expression
- _groupElements -- Fetches the values in a _groupBy group.
- _groupGet -- Produces the Things from the specified group.
- _hasProperty -- Allows you to test whether this Thing has a specified Property
- _makePropertyBundle -- Create an ad-hoc collection of Property Values
- _matchCase -- Tweaks the case of the received Text to match that of the Function this is defined in.
- _menuButton -- Use this to define a button that, when pressed, will mimic the effect of the specified menu item
- _navigateTo -- This receives a URL, and immediately changes pages to that URL
- _nextInList -- Fetch the next value to this one from the given List
- _oidLink -- Get the OID Link from a Thing
- _orphanedInstances -- Lists all of the Instances in this Space (if any) whose Models have been deleted
- _prevInList -- Fetch the previous value to this one from the given List
- _rawVal -- Produces a raw, unprocessed value
- _shadowedThing -- Produces the actual Thing this Shadow is based upon.
- _showSome -- Show some of the contents at a time
- _substring -- Extracts part of a Text or Large Text
- _textLength -- Produce the length of some received text.
- _thingTree -- Display a tree node, which will invoke the specified QL code to get its children
- _toCase -- Converts some text to the requested case
- _undeleteThing -- Given the OID of a deleted Thing, restore it
- _uniqueHtmlId -- Generate an ID suitable for using on tags in this page.
- _updateableSection -- ****
- _usingSpace -- Sets the Space to use for the rest of this QL phrase