WEHOOP also has its own language called @hoop. The @hoop language provides easy access to information without programming skills. It is named that way because all of its syntax begins with @hoop. It allows the designer to quickly access information on different components in a simple way and without programming talents designers to quickly access information on different components.
Settings
To access the different values of the WEHOOP settings, use @hoopSetting. This formula returns the information contained in the WEHOOP settings.
Syntax @hoopSetting(Property)
| Property | Returned value |
|---|---|
| activateAnniversaryNotifications | "1" if birthday notification is enabled, otherwise "0" |
| allowAnonymousForm | "1" if anonymous forms is enabled, otherwise "0" |
| companyName | Name of the company or organization |
| departmentAttributionMode | The mode of attribution of the department in the case where a user is member of several departments within the company. |
| hostname | Host name, for example "acme.wehoop.com" |
| interfaceLanguage | Language (s) available to users, ie "FR" and/or "EN" |
| multitenant | "1" if WEHOOP is deployed in Public CLOUD mode, otherwise "0" |
| multitenantClientAcronym | Acronym of the company or organization’s name. This value is used at the security level. |
| replaceEmailsSender | "1" if it is desired to send all notifications from a specified address, otherwise "0" and notifications will be sent from the generic "hoop@wehoop.com" address. |
| senderAddress | Address specified by the client for sending notifications |
| solutionDescriptionEN | Text in English describing the solution and used in the invitation sent to a new English-speaking user of the solution. |
| solutionDescriptionFR | Text in French describing the solution and used in the invitation sent to a new French-speaking user of the solution. |
| solutionNameEN | Name of the solution in English used in the invitation sent to a new English-speaking user of the solution. |
| solutionNameFR | Name of the solution in French used in the invitation sent to a new French-speaking user of the solution. |
| solutionOptions | "1" = Hide the Start from this one action "2" = Hide the Share action "3" = Hide the Transfer action "4" = Hide the Change my picture action in the user profile "5" = Hide the Save action in the process |
| trialMode | "1" if WEHOOP is set to TRIAL mode |
Example: Retrieve the English description of the solution
Syntax : @hoopSetting("solutionDescriptionEN")
Returned value: "Our inspection solution offers ..."
User Profile
Returns the information contained in a user’s profile
Syntax @hoopPerson(User; Property)
| Property | Returned value |
|---|---|
| firstname | first name |
| lastname | lastname |
| email address | |
| preferredPhonenumber | Preferred number to be reach |
| officePhone | office phone |
| mobilePhone | mobile phone |
| position | position |
| jobTitle | job title |
| employeeNumber | employee number |
| managers | employee managers |
Example: Retrieve Employee Title
Syntax A : @hoopPerson("Paul Smith/ACME/HOOP"; "position")
Syntax B : @hoopPerson("paul.smith@acme.com"; "position")
Syntax C : @hoopPerson(fieldName; "position") where fieldName ss a field of the form containing "Paul Smith/ACME/HOOP".
Syntax D : @hoopPerson(@Username; "position") where @Username refers to the current user.
Returned value: "Directeur des ressources humaines"
Document
Retrieve the value of a field in the current document, parent or child.
Value of a field
To access the values of a document, you must indicate the name of the field for which you want to retrieve values. Returns the value of the specified document field.
Syntax @hoopGetFieldValue(fieldName; id)
Settings
fieldName = Name of the field for which we want to retrieve its value(s).
id = Optional, if specified, indicates the id of the document for which we want to retrieve values.
Syntax A: @hoopGetFieldValue("budget")
Syntax B: @hoopGetFieldValue("budget"; "1234567890") where "1234567890" is the id of the document for which you want to retrieve the budget value.
Returned value: $15,000.
Field value – Parent doc
To access values of the parent document, you only need to provide the fieldName of the value to return.
Returns the field value of the specified document.
Syntax @hoopGetParentField(fieldName)
Syntax : @hoopGetParentField("budget")
Returned value : 25000$.
Field value – Childs doc
To access values of the parent document, you only need to provide the fieldName of the value to return.
Returns the field value of the specified document.
Syntax @hoopGetParentField(fieldName; docNo)
Syntax A : @hoopGetChildsField("phone_number") returns the phone number of every child document linked to the current document.
Syntax B : @hoopGetChildsField("phone_number"; "PRE-2022-0008")
Returned value : 888-333-4444
New document
To know if it is a new document (has not been saved). Returns 1 if this is a new document. This formula is useful if you want to modify a field only if it is a new document.
Syntax @hoopIsNewDoc
Syntax: @hoopIsNewDoc Returned value: 1 or 0
Department
When the organization plan is activated, new functionalities make it possible to refer to the departments of the organization as well as to the various positions occupied by the staff (manager, assistant manager, administrative assistant and employee).
Manager
Returns the manager of the department
Syntax @hoopDepartmentManager(Department-Name)
Syntax A : @hoopDepartmentManager("Budget service")
Syntax B : @hoopDepartmentManager(fieldName) where fieldName is a field of the form containing "Budget service".
Returned value: "Claude Smith/ACME/HOOP" if he is the manager of the "Budget service".
Assistant manager
Returns the assistant manager of the department
Syntax @hoopDepartmentAssistantManager(Department-Name)
Syntax A : @hoopDepartmentAssistantManager("Budget service")
Syntax B : @hoopDepartmentAssistantManager(fieldName) where fieldName is a field of the form containing "Budget service".
Returned value: "Alain Delorme/ACME/HOOP":"Nathalie Landry/ACME/HOOP" if they are assistant manager of the "Budget service".
Administrative assistant
Returns the administrative assistant of the department
Syntax @hoopDepartmentAdministrativeAssistant(Department-Name)
Syntax A : @hoopDepartmentAdministrativeAssistant("Budget service")
Syntax B : @hoopDepartmentAdministrativeAssistant(fieldName) where fieldName is a field of the form containing "Budget service".
Returned value: "Monique Caron/ACME/HOOP" if she is assistant-administrative of the "Budget service".
Employees
Returns the list of department employees.
Syntax @hoopDepartmentMember(Department-Name)
Syntax A : @hoopDepartmentMember("Budget service")
Syntax B : @hoopDepartmentMember(fieldName) where fieldName is a field of the form containing "Budget service".
Returned value: "Denis Moris/ACME/HOOP":"Denis Moris/ACME/HOOP":"Luce Asselin/ACME/HOOP" if they are members (employees) of "Budget service".
Departments Security Groups
Used to secure access to different components, 2 security groups are created for each department. The first one contains all the staff of the department and the second only the administrative staff (manager, assistant manager and administrative assistant).
Returns the name of the security groups linked to the departments.
Syntax @hoopDepartmentSecurity (Departments; Scope; Level)
Settings
Departments
Text or List. "ABC"or"ABC":"DEF":"HIJ"
Scope
"1" Department
"2" Department and the higher department
"3" Department and all senior departments
"4" Higher Department
"5" All departments
Level
"1" Administrative staff only
"2" All staff
Syntax A: @hoopDepartmentSecurity ("Budget Service";"1";"2")
Syntax B: @hoopDepartmentSecurity (fieldName;"1";"2") where fieldName is a form field containing"Budget Service".
Returned Value: "Financial Direction_ALL".
Name of the parent department
Returns the name of the parent department
Syntax @hoopDepartmentParent(Department-Name)
Syntax A : @hoopDepartmentParent("Service du budget")
Syntax B : @hoopDepartmentParent(fieldName) where fieldName is a field of the form containing "Budget service".
Returned value: "Finance branch" knowing that this is the parent department of the "Budget service".
Name of the parent department of a certain level
Returns the name of the parent department of a certain level according to a given department. Nothing will be returned if it is the level 1 department
Syntax @hoopDepartmentParentLevel(Department-Name; Level)
Syntax A : @hoopDepartmentParentLevel("Service du budget";"2")
Syntax B : @hoopDepartmentParentLevel(fieldName;"2") où fieldName is a field of the form containing "Budget service".
Returned value: "Finance branch" if it is a level 2 departement and is a parent department of the "Budget service".
Name of child departments
Returns the name of the child departments
Syntax @hoopDepartmentChilds(Department-Name)
Syntax A : @hoopDepartmentChilds("Budget service")
Syntax B : @hoopDepartmentChilds(fieldName) where fieldName is a field of the form containing "Budget service".
Returned value: "Coordination of accounts payable":"Coordination of accounts receivable" if these are departments under the "Budget service".
Administrative unit
Returns the administrative unit of the department
Syntax @hoopDepartmentAdministrativeUnit(Department-Name)
Syntax A : @hoopDepartmentAdministrativeUnit("Budget service")
Syntax B : @hoopDepartmentAdministrativeUnit(fieldName) where fieldName is a field of the form containing "Budget service".
Returned value: "12345" if it is the administravite unit of the "Budget service".
Workgroup
Name of the manager
Returns the name of the workgroup manager.
Syntax @hoopWorkgroupPersonInCharge(Workgroup-Name)
Syntax A : @hoopWorkgroupPersonInCharge("Payroll manager")
Syntax B : @hoopWorkgroupPersonInCharge(fieldName) where fieldName is a field of the form containing "Payroll manager".
Returned value: "Annie Lachance/ACME/HOOP"
Name of the members
Returns the name of the members of the workgroup.
Syntax @hoopWorkgroupMember(Workgroup-Name)
Syntax A : @hoopWorkgroupMember("Payroll manager")
Syntax B : @hoopWorkgroupMember(fieldName) where fieldName is a field of the form containing "Payroll manager".
Returned value: "Claude Dion/ACME/HOOP":"Sara Caron/ACME/HOOP"
Name of all the members
Returns the name of the manager and the members of the working group.
Syntax @hoopWorkgroup(Workgroup-Name)
Syntax A : @hoopWorkgroup("Payroll manager")
Syntax B : @hoopWorkgroup(fieldName) where fieldName is a field of the form containing "Payroll manager".
Returned value: "Annie Lachance/ACME/HOOP":"Claude Dion/ACME/HOOP":"Sara Caron/ACME/HOOP"
Resources
Link to a process or form
Returns the link to a process or form.
Syntax @hoopFormLink(linkType; ID) where the linkType can be "button" or "subject" to determine the link to display and ID represents the ID of the document (optional).
Syntax A: @hoopFormLink("subject")
Syntax B: @hoopFormLink("subject"; "4F39CA3CB3381A50852583FA0046FA6A")
Syntax C: @hoopFormLink("button")
Syntax D: @hoopFormLink("button"; documentID)
Value returned : NOTIFTEST-2020-0035
Subject: Subject test for the notification process,
a link to access the process or form where the notification is sent.
Value returned : NOTIFTEST-2020-0035
Subject: Subject test for the notification process,
a link to access the process or form with the provided ID.
Value returned : a button to access the process or form where the formula is used.
Value returned : a button to access the process or form whose ID is contained in the DocumentID field.
Link to the home page of WEHOOP
Returns the link to the home page of WEHOOP
Syntax @hoopHomeLink
Syntax A: @hoopHomeLink Value returned : a button to access the WEHOOP home page.
Values of a list
Returns the values of a list.
Syntax @hoopKeyword(listName)
Syntax A : @hoopKeyword("Post types")
Syntax B : @hoopKeyword(fieldName) where fieldName is a field of the form containing "Post types".
Returned value: "Permanent":"Temporary full-time":"Temporary part-time" if these are values of the shared list "Post types".
Values of a field contained in the parent form
Returns the value of a field contained in the form to which it is linked.
Syntax @hoopGetParentField(fieldName)
Syntax A : @hoopGetParentField("kwNoSequence")
Returned value: "PC-2018-0023" if the value of the kwNoSequence field, which is the sequential number of the parent form, is "PC-2018-0023".
Values of a field contained in an object
Returns the list of values of a field contained in an object (repetitive entry).
Syntax @hoopObjectColumn(objectName.fieldName)
Example : @hoopObjectColumn("Articles.CoutUnitaire")
Returned value: 3,45:50,00:14,98 if the unit costs of the three (3) articles are $3,45, $50 et $14,98. If the object doesn't contain any "Article" the NULL value will be returned.
Recover other columns returned (SQL and select field)
Returns the values of a field contained in a choice type field. It is important to add "Object" following the "Name-of-field"
Syntax @hoopObjectColumn(Name-of-field+Object.Name-of-value-to-return)
Example : @hoopObjectColumn("ClientObject.City")
Returned value: Quebec, if the city of the selected client is "Quebec".
Retrieve the information of an activity
Returns the requested information of an activity.
Syntax @hoopGetActivityName(Info, ID) where the ID of the activity is optional.
Syntax A : @hoopGetActivityName("Name")
Syntax B : @hoopGetActivityName("Name"; documentID)
Value returned : Send notifications, if the formula is currently used in this activity
Value returned : Activity monitoring, if documentID contains the ID of the activity.
Retrieve an action history from an activity
Returns the desired information about the action of an activity.
Syntax @hoopSearchHistory(ID-of-the-activity; Action; Information)
Parameters
ID-of-the-activity
ID of the activity sought. Ex: "12345678901234567890123456789012"
Action
"1": Creating the process
"2": Supported
"3": Sent
Information
"1": Who
"2": Date only of the action
"3": Date and time of the action
"4": Time only of the action
Syntaxe A : @hoopSearchHistory("C6A432D1CA839A41852583FA00473445"; "1"; "1")
Syntaxe B : @hoopSearchHistory("07E536A10277D6638525840300678662"; "2"; "2")
Syntaxe C : @hoopSearchHistory("C6A432D1CA839A41852583FA00473445"; "3"; "3")
Syntaxe D : @hoopSearchHistory("C6A432D1CA839A41852583FA00473445"; "1"; "4")
Valeur retournée : "CN=Sebastien Larouche/OU=BETA/O=WEHOOP" If Sebastien is the user that created the process.
Valeur retournée : "2019-05-24" represents the date when the activity was supported.
Valeur retournée : "2019-05-24T14:48" represents the date and time when the activity was sent.
Valeur retournée : "14:51" represents the time when the activity was sent.
Retrieve the initiator of the process or form
Returns the initiator of a process or form.
Syntax @hoopGetInitiator(format)
Syntax A : @hoopGetInitiator("1")
Value returned : Sebastien Larouche if he is the initiator of the process where the formula is currently used.
Retrieve the name of a process or form
Returns the name of a process or form.
Syntax @hoopGetProcessName
Syntax A : @hoopGetProcessName Value returned : Request for assistance, if the formula is used in the Request for assistance process.
Retrieve the information of the helpdesk
Returns the information of the helpdesk such as name, phone number and email address.
Syntax @hoopGetHelpdeskInfo
Syntax A : @hoopGetHelpdeskInfo Value Returned : Helpdesk (855 274-1118) support@kiwi.ca
Retrieve the sequential number of a process or form
Returns the sequential number of the process or form.
Syntax A : @hoopGetSequentialNumber Value returned : NOSEQTEST-2020-0009, which is the sequential number of the process or form where the formula is currently used.
Retrieve the reason of a decision
Returns the reason for the decision of an activity.
Syntax @hoopGetReason
Syntax A: @hoopGetReason Value returned: Reason of the decision of the last activity.
Retrieve the subject of a process or form
Return the subject of a process or form.
Syntax @hoopGetSubject
Syntax A : @hoopGetsubject Value returned : subject of my process or form.
Number of days
Returns the number of days between two (2) dates.
Syntax @hoopDays(date1; date2)
Syntax A : @hoopDays("2018-10-18"; "2018-10-22")
Syntax B : @hoopDays(fieldName1; fieldName2) where fieldName1 and fieldName2 are date fields of the form.
Returned value: 4, which is the number of days between Thursday, October 18, 2018 and Monday, October 22, 2018.
Note that the number returned could be negative if the value of fieldName1 is greater than fieldName2. If both are the same, the returned value will be 0.
Number of working days
Returns the number of business days between two (2) dates.
Syntax @hoopWorkdays(date1; date2; holiday) where holiday represent a true or false value if you want to exclude them or not. Note that date1 is inculded, date 2 is excluded and holiday is optionnal.
Syntax A : @hoopWorkdays(fieldName1; fieldName2; @False) where fieldName1 and fieldName2 are date fields of the form.
Syntax B : @hoopWorkdays("2018-10-18"; "2018-10-22")
Syntax C : @hoopWordays("2018-10-22"; "2018-10-18")
Syntax D : @hoopWorkdays("2018-10-31"; "2018-10-31")
Returned value: 2, which is the number of working days between Thursday, October 18, 2018 and Monday, October 22, 2018.
Returned value: -2, which is the number of working days between Monday, October 22, 2018 and Thursday, October 18, 2018.
Returned value: 0, which is the number of working days when both dates are Vednesday, October 31, 2018.
Note that the number returned could be negative if the value of fieldName1 is greater than fieldName2. If both are the same, the returned value will be 0.
Value of a tax
Returns the tax rate.
Syntax @hoopTax(Tax-Code)
Example: @hoopTax("1")
Returned value: The value "1" refers to the TPS and return 0,05. The value "2" refers to the TVQ and return 0,09975.
Value contained in the definition of the field of a process or form
Returns the desired information of the field of a process or form.
Syntax @hoopGetFieldConfig(Process-ID; FieldName; FieldLabel)
Syntax A : @hoopGetFieldConfig(ID; FieldName; FieldLabel) where ID, FieldName and FieldLabel are fields of the process or form respectively containing the ID of the process or form, the field name and the information wanted.
Syntax B : @hoopGetFieldConfig("956415640A86AFD0852575AC006AB19D"; "City"; "type")
Returned value : Text, which is the type of the field "City"
The information that can be retrieved with this formula is as follow:
type : Returns the type of the field(Ex: Text, Number, Date, Etc.)
name : Returns the field name.
label : Returns the field label.
choices : Returns the list of values if it is a field with multiple choices.
decimalPrecision : Returns the number of decimal places if the field is a number type.
Note that if one of the field is empty or if there is an error, the formula will return @Error
Retrieve the value of a field from a process or form
Return the value of a field contained in a process or form.
Syntax @hoopGetFieldValue(FieldName; ID) where the ID is optional and FieldName represent the name of the field.
Syntax A : @hoopGetFieldValue("City"; "70CC22DAA3403AF6852583E70052FD0F")
Syntax B : @hoopGetFieldValue(fieldName; documentID) where fieldName contains the name of the field and documentID contains the ID of the process or form.
Syntax C : @hoopGetFieldValue(fieldName)
Value returned : Quebec, which is the value of the field "City" contained within the process with the ID provided.
Value returned : Montréal, which is the value of the field "City" if documentID contains the ID of the process or form and fieldName the name of the field.
Value returned : Chicoutimi, which is the value of the field "City" if fieldName contains City and the formula is used in the same process or form.
Generate a link to create an anonymous process
Returns a button to create an anonymous process with pre-filled fields containing the values of the same fields contained in the process where the formula is used.
Syntax @hoopCreateAnonynousProcess(ID; language; fieldsList; buttonName) Note that ID represents the process ID or form, and the language, fieldsList, and buttonName parameters are optional.
Syntaxe A : @hoopCreateAnonymousProcess(ID) Syntaxe B : @hoopCreateAnonymousProcess(ID; "fr") Syntaxe C : @hoopCreateAnonymousProcess(ID; "en"; "lastName":"firstName":"email") Syntaxe D : @hoopCreateAnonymousProcess(ID; "language"; fieldsList; "Anonymous process") Value Returned : Returns a button to create the anonymous process with no field completed. Value Returned : Returns a button to create the anonymous process in the specified language with no field completed. Value Returned : Returns a button to create the anonymous process in the specified language with the fields lastName, firstName and email filled. Value Returned : Return a "Start Anonymous process" button to create the anonymous process in the language specified by the fields contained in the fieldsList field of the process.
User Interface language
This value is specified for each user in their profile. Return 1 if true and 0 if false.
Syntax @hoopIsFR or @hoopIsEN
Example : @If(@hoopIsEN; "Yes"; "Oui") Returned value: "Yes" if user interface is in english.
Access and subprocess
Number of subprocesses in progress
Lets you know the number of subprocesses that are in progress. Returns the number of current subprocesses, 0 if none.
Syntax @hoopProcessChildsInProgress
Example: Lets you know if any subprocesses started from the current process are still running.
Can the user modify the document?
Check whether the user has the necessary access to modify this document. Returns 1 if true and 0 if false.
Syntax @hoopUserCanEdit
Example: Use to display an action in a Form or Process.
Can the user delete the document?
Check whether the user has the necessary access to delete this document. Returns 1 if true and 0 if false.
Syntax @hoopUserCanDelete
Example: Use to display an action in a Form or Process.
Is the document in read mode?
Check whether the document is being consulted by a user. Returns 1 if true and 0 if false.
Syntax @hoopFormInReadMode
Example: Use to display an action in a Form or Process.
Is the document in edit mode?
Check whether the document is being edited by a user. Returns 1 if true and 0 if false.
Syntax @hoopFormInEditMode
Example: Use to display an action in a Form or Process.
Functions
New address
Allows you to create an address from values. To assign a value to an address type field, it is recommended to use this function.
Syntax @hoopNewAddress(street_number; street; city; state; country; zip_code)
street_number: If empty, we will use the street value.
country: If empty, we will determine the country from the state value. (Canada and USA only).
Example 1: @hoopNewAddress("3125"; "Rue Flaubert"; "Quebec"; "QC"; "Canada"; "G2E 2J2")
Example 2: @hoopNewAddress(""; "3125 Rue Flaubert"; "Quebec"; "QC"; ""; "G2E 2J2")