List Functions
List Functions
[
{
"name": "GetStringField",
"descriptions": [
"Given a list, and index, and a field name, we return the value present at that
index for that field"
],
"valueType": "Text",
"targetField": {
"fieldType": "Text"
},
"category": "Collection",
"arguments": [
{
"label": "list",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
],
"argumentLength": "1"
},
{
"label": "index",
"valueTypes": [
{
"valueType": "Double",
"innerType": null
}
],
"argumentLength": "1"
},
{
"label": "field name",
"valueTypes": [
{
"valueType": "Text",
"innerType": null
}
],
"argumentLength": "1"
}
]
},
{
"name": "GetWholeNumberField",
"descriptions": [
"Given a list, and index, and a field name, we return round off of that
number.Index would have to be 1-based"
],
"valueType": "Double",
"targetField": {
"fieldType": "Number"
},
"category": "Collection",
"arguments": [
{
"label": "list",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
],
"argumentLength": "1"
},
{
"label": "index",
"valueTypes": [
{
"valueType": "Double",
"innerType": null
}
],
"argumentLength": "1"
},
{
"label": "field name",
"valueTypes": [
{
"valueType": "Text",
"innerType": null
}
],
"argumentLength": "1"
}
]
},
{
"name": "GetDateField",
"descriptions": [
"Given a list, index and field name, this function will return the date item at that
position. Index should be 1-based"
],
"valueType": "Long",
"targetField": {
"fieldType": "Date"
},
"category": "Collection",
"arguments": [
{
"label": "list",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
],
"argumentLength": "1"
},
{
"label": "index",
"valueTypes": [
{
"valueType": "Double",
"innerType": null
}
],
"argumentLength": "1"
},
{
"label": "field name",
"valueTypes": [
{
"valueType": "Text",
"innerType": null
}
],
"argumentLength": "1"
}
]
},
{
"name": "GetDecimalNumberField",
"descriptions": [
"Given a list, index and field name, this function will return the decimal number at
that position"
],
"valueType": "Long",
"targetField": {
"fieldType": "Number"
},
"category": "Collection",
"arguments": [
{
"label": "list",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
],
"argumentLength": "1"
},
{
"label": "index",
"valueTypes": [
{
"valueType": "Double",
"innerType": null
}
],
"argumentLength": "1"
},
{
"label": "field name",
"valueTypes": [
{
"valueType": "Text",
"innerType": null
}
],
"argumentLength": "1"
}
]
},
{
"name": "FirstMatch",
"descriptions": [
"In a given list, this function will find the match for the given value. If it is in list, it
will return it. otherwise it will return null"
],
"valueType": "Text",
"targetField": {
"fieldType": "Text"
},
"category": "Collection",
"arguments": [
{
"label": "list",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
],
"argumentLength": "1"
},
{
"label": "value",
"valueTypes": [
{
"valueType": "Text",
"innerType": null
}
],
"argumentLength": "1"
}
]
},
{
"name": "RemoveAll",
"descriptions": [
"This function helps in removing all element from list"
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
}
]
},
{
"name": "ContainsValue",
"descriptions": [
"Given a list and a value, this function will return true/false on the basis of whether
the value is present or not in the list"
],
"valueType": "Boolean",
"targetField": {
"fieldType": "Switch"
},
"category": "Collection",
"arguments": [
{
"label": "List",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
},
{
"label": "value",
"valueTypes": [
{
"valueType": "?",
"innerType": "?"
}
]
}
]
},
{
"name": "Remove",
"descriptions": [
"Given a list and a value, this function will return list without the value"
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
},
{
"label": "value",
"valueTypes": [
{
"valueType": "?",
"innerType": "?"
}
]
}
]
},
{
"name": "RemoveMatchItem",
"descriptions": [
"Given two list, this function will match the two list and will remove the matching
items and will return a new list"
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List1",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
},
{
"label": "List2",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
}
]
},
@Ignore this formula, due to multifields
{
"name": "AllMatches",
"descriptions": [
"This function helps in finding a specific entity in a collection of entities by giving a
field name and a search value as a string or number.for eg - AllMatches(employees,
“name”, “John*”) , will return every matching entity from employees list whose name
equals to John"
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
},
{
"label": "value",
"valueTypes": [
{
"valueType": "?",
"innerType": "?"
}
]
}
]
},
{
"name": "ItemAt",
"descriptions": [
"Return the N-th item from the provided list that holds a simple data type (no entity
or multifield)"
],
"valueType": "Text",
"targetField": {
"fieldType": "Text"
},
"category": "Collection",
"arguments": [
{
"label": "List",
"valueTypes": [
{
"valueType": "[]",
"innerType": "Text"
}
]
},
{
"label": "Index",
"valueTypes": [
{
"valueType": "Double",
"innerType": "null"
}
]
}
]
},
{
"name": "LeadingItems",
"descriptions": [
"Return the first N items from the provided list in a new list of the same denoted
type."
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
},
{
"label": "Count",
"valueTypes": [
{
"valueType": "Double",
"innerType": "null"
}
]
}
]
},
{
"name": "TailingItems",
"descriptions": [
"Return the last N items from the provided list in a new list of the same denoted
type."
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
},
{
"label": "Count",
"valueTypes": [
{
"valueType": "Double",
"innerType": "null"
}
]
}
]
},
{
"name": "ReverseList",
"descriptions": [
"Return the list with the items in reverse order."
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
}
]
},
{
"name": "DistinctValues",
"descriptions": [
"Return a list of unique values based on a provided list."
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
}
]
},
{
"name": "MakeListFieldNumber",
"descriptions": [
"This function will strip all the formatting off and converts a field in a list of
multifield to number"
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List of Multifield",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
},
{
"label": "Field Name",
"valueTypes": [
{
"valueType": "Text",
"innerType": null
}
],
"argumentLength": "1"
}
]
},
{
"name": "MultiplyListNumberFields",
"descriptions": [
"Returns the multiplication of number fields in list of multifield inside new number
field named 'Result' within the list of multifield. Make sure field name 'Result' of number
type should be present in the multifield"
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List of Multifield",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
},
{
"label": "Field Name",
"valueTypes": [
{
"valueType": "Text",
"innerType": null
},
{
"valueType": "[]",
"innerType": "Text"
}
],
"argumentLength": "N"
}
]
},
{
"name": "AddListNumberFields",
"descriptions": [
"Returns the sum of number fields in list of multifield inside new number field
named 'Result' within the list of multifield. Make sure field name 'Result' of number type
should be present in the multifield"
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List of Multifield",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
},
{
"label": "Field Name",
"valueTypes": [
{
"valueType": "Text",
"innerType": null
}
],
"argumentLength": "N"
}
]
},
{
"name": "DivideListNumberFields",
"descriptions": [
"This function will divide 'Field Name1' by 'Field Name2' in list of multifield and
store the result inside new number field named 'Result' within the list of multifield. Make
sure field name 'Result' of number type should be present in the multifield"
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List of Multifield",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
},
{
"label": "Field Name1",
"valueTypes": [
{
"valueType": "Text",
"innerType": null
}
],
"argumentLength": "1"
},
{
"label": "Field Name2",
"valueTypes": [
{
"valueType": "Text",
"innerType": null
}
],
"argumentLength": "1"
}
]
},
{
"name": "SubtractListNumberFields",
"descriptions": [
"This function will subtract all the remaining number fields from the first number
field in list of multifield and store the result in new number field named 'Result' within the
list of multifield. Make sure field name 'Result' of number type should be present in the
multifield"
],
"valueType": "[]",
"targetField": {
"fieldType": "List"
},
"category": "Collection",
"arguments": [
{
"label": "List of Multifield",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
},
{
"label": "Field Name",
"valueTypes": [
{
"valueType": "Text",
"innerType": null
}
],
"argumentLength": "N"
}
]
},
{
"name": "GetSize",
"descriptions": [
"This function gives the size of the list"
],
"valueType": "Double",
"targetField": {
"fieldType": "Number"
},
"category": "Collection",
"arguments": [
{
"label": "List",
"valueTypes": [
{
"valueType": "[]",
"innerType": "?"
}
]
}
]
}
]
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
Is Mathematics included in the subjects list?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Boolean","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?[]","name":"Subjects","part":null}},
{"type":"Constant","valueType":"Text","argLabel":"value","children":null,"value":"Mathem
atics"}],"functionName":"ContainsValue"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
Is Name included in the List “Kaushik,Akash,Ronell,Sandon,Chirag”?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Text","argLabel":"arg1","children":
[{"type":"Constant","valueType":"Text","argLabel":"list","children":null,"value":"Kaushik,Ak
ash,Ronell,Sandon,Chirag"},
{"type":"Variable","valueType":"Text","argLabel":"value","children":null,"scope":"current","
part":
{"type":"Simple","valueType":"Text","name":"Name","part":null}}],"functionName":"FirstM
atch"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
Does the list of subjects contain Biology? If yes then return it.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Text","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"list","children":null,"scope":"current","part":{"type":"Range","valueType":"?
[]","name":"Subjects","part":null}},
{"type":"Constant","valueType":"Text","argLabel":"value","children":null,"value":"Biology"}
],"functionName":"FirstMatch"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
What is the total number of subjects?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Double","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?
[]","name":"Subjects","part":null}}],"functionName":"GetSize"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
What is the total number of students?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Double","argLabel":"arg1","children":null,"functionName
":"GetSize"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
Remove chemistry from Subjects.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?[]","name":"Subjects","part":null}},
{"type":"Constant","valueType":"Text","argLabel":"value","children":null,"value":"Chemistr
y"}],"functionName":"Remove"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
Remove chemistry from Aced Subjects.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Constant","valueType":"Text","argLabel":"value","children":null,"value":"chemistr
y"}],"functionName":"Remove"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
Delete all subject in subjects list.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?
[]","name":"Subjects","part":null}}],"functionName":"RemoveAll"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}},
{“name”: “Failed subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
Which subjects are not in the list of failed subjects?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List1","children":null,"scope":"current","part":
{"type":"Range","valueType":"?[]","name":"Subjects","part":null}},
{"type":"Variable","valueType":"?
[]","argLabel":"List2","children":null,"scope":"current","part":
{"type":"Range","valueType":"?[]","name":"Failed
subjects","part":null}}],"functionName":"RemoveMatchItem"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}},
{“name”: “Failed subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
Which subjects are not in the list of Aced subjects?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List1","children":null,"scope":"current","part":
{"type":"Range","valueType":"?
[]","name":"Subjects","part":null}}],"functionName":"RemoveMatchItem"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}},
{“name”: “Failed subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
What subject appears in the third position of the failed subjects list?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Text","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?[]","name":"Failed subjects","part":null}},
{"type":"Constant","valueType":"Number","argLabel":"Index","children":null,"value":3}],"fu
nctionName":"ItemAt"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}},
{“name”: “Failed subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
What subject appears in the nth position of the failed subjects list?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Text","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?[]","name":"Failed
subjects","part":null}}],"functionName":"ItemAt"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}},
{“name”: “Marks”, “type”: “List”, options: {“innerType”: “Number”}}
]
Query:
What are the leading 4 items in the marks list?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?[]","name":"Marks","part":null}},
{"type":"Constant","valueType":"Number","argLabel":"Count","children":null,"value":4}],"f
unctionName":"LeadingItems"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}},
{“name”: “Marks”, “type”: “List”, options: {“innerType”: “Number”}}
]
Query:
What are the leading items in the marks list?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?
[]","name":"Marks","part":null}}],"functionName":"LeadingItems"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
What are the last five entries in the subjects?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?[]","name":"Subjects","part":null}},
{"type":"Constant","valueType":"Number","argLabel":"Count","children":null,"value":5}],"f
unctionName":"TailingItems"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
What are the last five entries in?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Constant","valueType":"Number","argLabel":"Count","children":null,"value":5}],"f
unctionName":"TailingItems"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
How do the subjects look in reverse?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?
[]","name":"Subjects","part":null}}],"functionName":"ReverseList"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}}
]
Query:
How does null look in reverse?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":null,"functionName":"Rev
erseList"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}},
{“name”: “Marks”, “type”: “List”, options: {“innerType”: “Number”}}
]
Query:
What unique values are present in the marks?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?
[]","name":"Marks","part":null}}],"functionName":"DistinctValues"}]}
Context Variables:
[
{“name”: “Name”, “type”: “Text”},
{“name”: “Month”, “type”: “Number”},
{“name”: “Age”, “type”: “Number”},
{“name”: “Subjects”, “type”: “List”, options: {“innerType”: “Text”}},
{“name”: “Marks”, “type”: “List”, options: {“innerType”: “Number”}}
]
Query:
What distinct values are present?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":null,"functionName":"Dist
inctValues"}]}
Example 2
[{“name”: “Temperature Monday”, ”type”: “Number”},
{“name”: “Number of Decimal Places”, ”type”: “Number”},
{“name”: “Monthly Expenses February”, ”type”: “Number”},
{“name”: “Sold Quantity”, ”type”: “Number”},
{“name”: “Sales Q2”, ”type”: “Number”}]
Query:
Calculate the total expenses for the first three months of the year, January month
expense is Rs. 20 & Mark expense is Rs. 30
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Constant","valueType":"Text","argLabel":"Field
Name","children":null,"value":"Cost"},
{"type":"Variable","valueType":"Text","argLabel":"Field
Name","children":null,"scope":"current","part":
{"type":"Simple","valueType":"Text","name":"Tax Field
Name","part":null}}],"functionName":"AddListNumberFields"}]}
Example 3
[
{“name”: “Price”, ”type”: “Number”},
{“name”: “Sales Q1”, ”type”: “Number”}]
Query:
For each invoice, add the "Item Price" and "Shipping Cost" fields and store the result in
the "Result" field.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":null,"functionName":"Add
ListNumberFields"}]}
Example 2
[{“name”: “Temperature Monday”, ”type”: “Number”},
{“name”: “Number of Decimal Places”, ”type”: “Number”},
{“name”: “Monthly Expenses February”, ”type”: “Number”},
{“name”: “Cities Visited”, ”type”: “List”}
{“name”: “Sold Quantity”, ”type”: “Number”},
{“name”: “Sales Q2”, ”type”: “Number”}]
Query:
Check if the list of cities visited contains "Berlin".
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Boolean","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?[]","name":"Cities Visited","part":null}},
{"type":"Constant","valueType":"Text","argLabel":"value","children":null,"value":"Berlin"}],
"functionName":"ContainsValue"}]}
Example 3
[
{“name”: “Price”, ”type”: “Number”},
{“name”: “Product Id”, ”type”: “String”}]
Query:
Check if the list of product IDs contains the Product Id?
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Boolean","argLabel":"arg1","children":
[{"type":"Variable","valueType":"Text","argLabel":"value","children":null,"scope":"current",
"part":{"type":"Simple","valueType":"Text","name":"Product
Id","part":null}}],"functionName":"ContainsValue"}]}
Example 2
[{“name”: “Temperature Monday”, ”type”: “Number”},
{“name”: “Number of Decimal Places”, ”type”: “Number”},
{“name”: “Monthly Expenses February”, ”type”: “Number”},
{“name”: “Cities Visited”, ”type”: “List”}
{“name”: “Sold Quantity”, ”type”: “Number”},
{“name”: “Sales Q2”, ”type”: “Number”}]
Query:
Get a list of unique product categories
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":null,"functionName":"Dist
inctValues"}]}
Example 2
[{“name”: “Temperature Monday”, ”type”: “Number”},
{“name”: “Number of Decimal Places”, ”type”: “Number”},
{“name”: “Monthly Expenses February”, ”type”: “Number”},
{“name”: “Cities Visited”, ”type”: “List”}
{“name”: “Sold Quantity”, ”type”: “Number”},
{“name”: “Sales Q2”, ”type”: “Number”}]
Query:
For each entry, divide "Total Sales" by "Number of Orders" and store the result in the
"Result" field (average sale per order)
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?[]","argLabel":"List of
Multifield","children":null,"scope":"current","part":{"type":"Range","valueType":"?
[]","name":"Sales Data","part":null}},
{"type":"Constant","valueType":"Text","argLabel":"Field
Name1","children":null,"value":"Total Sales"},
{"type":"Constant","valueType":"Text","argLabel":"Field
Name2","children":null,"value":"Number of
Orders"}],"functionName":"DivideListNumberFields"}]}
Example 3
[
{“name”: “Price”, ”type”: “Number”},
{“name”: “Product Id”, ”type”: “String”}]
Query:
For each production entry, divide "Total Units Produced" by "Working Hours" and store
the result in the "Result" field (units produced per hour).
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Constant","valueType":"Text","argLabel":"Field
Name1","children":null,"value":"Total Units Produced"},
{"type":"Constant","valueType":"Text","argLabel":"Field
Name2","children":null,"value":"Working
Hours"}],"functionName":"DivideListNumberFields"}]}
Example 2
[{“name”: “Temperature Monday”, ”type”: “Number”},
{“name”: “Number of Decimal Places”, ”type”: “Number”},
{“name”: “Monthly Expenses February”, ”type”: “Number”},
{“name”: “Order Numbers”, ”type”: “List”}
{“name”: “Sold Quantity”, ”type”: “Number”},
{“name”: “Sales Q2”, ”type”: “Number”}]
Query:
Find the match for order number 999 in the list of order numbers
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Text","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"list","children":null,"scope":"current","part":{"type":"Range","valueType":"?
[]","name":"Order Numbers","part":null}},
{"type":"Constant","valueType":"Text","argLabel":"value","children":null,"value":"999"}],"fu
nctionName":"FirstMatch"}]}
Example 3
[
{“name”: “Price”, ”type”: “Number”},
{“name”: “City Name”, ”type”: “String”}]
Query:
Find the match for City Name in the list of cities.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Text","argLabel":"arg1","children":
[{"type":"Constant","valueType":"Text","argLabel":"list","children":null,"value":null},
{"type":"Variable","valueType":"Text","argLabel":"value","children":null,"scope":"current","
part":{"type":"Simple","valueType":"Text","name":"City
Name","part":null}}],"functionName":"FirstMatch"}]}
Function Name: FirstMatch
Example 1Context Variables:
[{“name”: “Exam Score 1”, ”type”: “Number”},
{“name”: “Tax Field Name”, ”type”: “String”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Employee Names”, ”type”: “List”},
{“name”: “Employee Name”, ”type”: “String”}]
Query:
Find the match for Employee Name in the list of employee names.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Text","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"list","children":null,"scope":"current","part":{"type":"Range","valueType":"?
[]","name":"Employee Names","part":null}},
{"type":"Variable","valueType":"Text","argLabel":"value","children":null,"scope":"current","
part":{"type":"Simple","valueType":"Text","name":"Employee
Name","part":null}}],"functionName":"FirstMatch"}]}
Example 2
[{“name”: “Temperature Monday”, ”type”: “Number”},
{“name”: “Number of Decimal Places”, ”type”: “Number”},
{“name”: “Monthly Expenses February”, ”type”: “Number”},
{“name”: “Order Numbers”, ”type”: “List”}
{“name”: “Sold Quantity”, ”type”: “Number”},
{“name”: “Sales Q2”, ”type”: “Number”}]
Query:
Find the match for order number 999 in the list of order numbers
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Text","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"list","children":null,"scope":"current","part":{"type":"Range","valueType":"?
[]","name":"Order Numbers","part":null}},
{"type":"Constant","valueType":"Text","argLabel":"value","children":null,"value":"999"}],"fu
nctionName":"FirstMatch"}]}
Example 3
[
{“name”: “Price”, ”type”: “Number”},
{“name”: “City Name”, ”type”: “String”}]
Query:
Find the match for City Name in the list of cities.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Text","argLabel":"arg1","children":
[{"type":"Constant","valueType":"Text","argLabel":"list","children":null,"value":null},
{"type":"Variable","valueType":"Text","argLabel":"value","children":null,"scope":"current","
part":{"type":"Simple","valueType":"Text","name":"City
Name","part":null}}],"functionName":"FirstMatch"}]}
Example 2
[{“name”: “Temperature Monday”, ”type”: “Number”},
{“name”: “Number of Decimal Places”, ”type”: “Number”},
{“name”: “Monthly Expenses February”, ”type”: “Number”},
{“name”: “Order Numbers”, ”type”: “List”}
{“name”: “Sold Quantity”, ”type”: “Number”},
{“name”: “Sales Q2”, ”type”: “Number”}]
Query:
Find the match for order number 999 in the list of order numbers
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Text","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"list","children":null,"scope":"current","part":{"type":"Range","valueType":"?
[]","name":"Order Numbers","part":null}},
{"type":"Constant","valueType":"Text","argLabel":"value","children":null,"value":"999"}],"fu
nctionName":"FirstMatch"}]}
Example 3
[{“name”: “Exam Score 1”, ”type”: “Number”},
{“name”: “Invoice Amounts”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product Prices”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Get the decimal value of the "Salary" field at index Employee index (third employee).
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Long","argLabel":"arg1","children":
[{"type":"Constant","valueType":"Text","argLabel":"list","children":null,"value":null},
{"type":"Constant","valueType":"Number","argLabel":"index","children":null,"value":null},
{"type":"Constant","valueType":"Text","argLabel":"field
name","children":null,"value":"Salary"}],"functionName":"GetDecimalNumberField"}]}
Example 2
Example 2
Example 3
[{“name”: “Exam Score 1”, ”type”: “Number”},
{“name”: “Invoice Amounts”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product Prices”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Get the value of the "Class" field at Student Index from Student Data
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Text","argLabel":"arg1","children":
[{"type":"Constant","valueType":"Text","argLabel":"list","children":null,"value":null},
{"type":"Constant","valueType":"Number","argLabel":"index","children":null,"value":null},
{"type":"Constant","valueType":"Text","argLabel":"field
name","children":null,"value":"Class"}],"functionName":"GetStringField"}]}
Example 2
Example 3
[{“name”: “Exam Score 1”, ”type”: “Number”},
{“name”: “Invoice Amounts”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product Prices”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Get the whole number value of the Given field at index 3 (third project).
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"Double","argLabel":"arg1","children":
[{"type":"Constant","valueType":"Text","argLabel":"list","children":null,"value":null},
{"type":"Constant","valueType":"Number","argLabel":"index","children":null,"value":3},
{"type":"Constant","valueType":"Text","argLabel":"field
name","children":null,"value":null}],"functionName":"GetWholeNumberField"}]}
Example 2
Example 2
Example 3
[{“name”: “Exam Score 1”, ”type”: “Number”},
{“name”: “Recent Purchases”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product Prices”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Return the first 4 items from the monthly sales list.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":null,"functionName":"Lea
dingItems"}]}
Example 2
[{“name”: “Temperature Records”, ”type”: “List”},
{“name”: “Recent Purchases”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product List”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Strip all formatting and convert the "Price" field to a number in the product list
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?[]","argLabel":"List of
Multifield","children":null,"scope":"current","part":{"type":"Range","valueType":"?
[]","name":"Product List","part":null}},
{"type":"Constant","valueType":"Text","argLabel":"Field
Name","children":null,"value":"Price"}],"functionName":"MakeListFieldNumber"}]}
Example 3
[{“name”: “Exam Score 1”, ”type”: “Number”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product Prices”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Strip all formatting and convert the "Total Amount" field to a number in the order history
list.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Constant","valueType":"Text","argLabel":"Field
Name","children":null,"value":null}],"functionName":"MakeListFieldNumber"}]}
Example 2
[{“name”: “Temperature Records”, ”type”: “List”},
{“name”: “Invoice Details”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product List”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Multiply the fields "Quantity" and "Unit Price" in the invoice details list, and store the
result inside a new field named "Result".
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?[]","argLabel":"List of
Multifield","children":null,"scope":"current","part":{"type":"Range","valueType":"?
[]","name":"Invoice Details","part":null}},
{"type":"Constant","valueType":"Text","argLabel":"Field
Name","children":null,"value":"Quantity"},
{"type":"Variable","valueType":"Text","argLabel":"Field
Name","children":null,"scope":"current","part":
{"type":"Simple","valueType":"Text","name":"Unit
Price","part":null}}],"functionName":"MultiplyListNumberFields"}]}
Example 3
[{“name”: “Exam Score 1”, ”type”: “Number”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product Prices”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Multiply the fields "Hours Worked" and Other field in the project resources list, and store
the result inside a new field named "Result".
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Constant","valueType":"Text","argLabel":"Field
Name","children":null,"value":"Hours
Worked"}],"functionName":"MultiplyListNumberFields"}]}
Example 2
[{“name”: “Exam Score 1”, ”type”: “Number”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product Prices”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Remove all movies from the favorite movies list.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":null,"functionName":"Re
moveAll"}]}
Example 2
[{“name”: “Temperature Records”, ”type”: “List”},
{“name”: “Favorite Movies”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product List”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Remove "The Matrix" from the favorite movies list.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?[]","name":"Favorite Movies","part":null}},
{"type":"Constant","valueType":"Text","argLabel":"value","children":null,"value":"The
Matrix"}],"functionName":"Remove"}]}
Example 3
[{“name”: “Exam Score 1”, ”type”: “Number”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product Prices”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Remove the expense record from the list Expenses List
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":null,"functionName":"Re
move"}]}
Example 2
{“name”: “Favorite Movies”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product List”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Remove the sold items from the inventory list
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":null,"functionName":"Re
moveMatchItem"}]}
Example 2
{“name”: “Favorite Movies”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product List”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Reverse the order of recent transactions
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":null,"functionName":"Rev
erseList"}]}
Example 2
{“name”: “Project Budgets List”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product List”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Subtract "Spent" and "Overhead" from the "Budget" and store the result in the "Result"
field.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?[]","argLabel":"List of
Multifield","children":null,"scope":"current","part":{"type":"Range","valueType":"?
[]","name":"Project Budgets List","part":null}},
{"type":"Constant","valueType":"Text","argLabel":"Field
Name","children":null,"value":"Overhead"},
{"type":"Constant","valueType":"Text","argLabel":"Field
Name","children":null,"value":"Budget"}],"functionName":"SubtractListNumberFields"}]}
Example 3
{“name”: “Project Budgets List”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product List”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Subtract some fields from the "GrossSalary" and store the result in the "Result" field.
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":null,"functionName":"Sub
tractListNumberFields"}]}
Example 2
{“name”: “Project Budgets List”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Top Performers”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Return the last 4 top performers from the Top Performers list
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":
[{"type":"Variable","valueType":"?
[]","argLabel":"List","children":null,"scope":"current","part":
{"type":"Range","valueType":"?[]","name":"Top Performers","part":null}},
{"type":"Constant","valueType":"Number","argLabel":"Count","children":null,"value":4}],"f
unctionName":"TailingItems"}]}
Example 3
{“name”: “Project Budgets List”, ”type”: “List”},
{“name”: “Expenses”, ”type”: “Number”},
{“name”: “Product List”, ”type”: “List”},
{“name”: “Item Index”, ”type”: “String”}]
Query:
Return the last 5 temperature readings from Daily Temperatures
Answer:
{"type":"Expression","valueType":"?","argLabel":"arg1","children":
[{"type":"Function","valueType":"[]","argLabel":"arg1","children":null,"functionName":"Taili
ngItems"}]}