Block List

This page contains a list of all Blocks within BlockScript, along with their descriptions and links to their full details.

Array

Name Description Premium Cloud Required
<a href="/blocks/array/arraylength">Array Length</a> Return the length of the given array
<a href="/blocks/array/cleararray">Clear Array</a> Empty an array of all it's elements
<a href="/blocks/array/concatarrays">Concat Arrays</a> Join two arrays together to form a single array
<a href="/blocks/array/getatindex">Get At Index</a> Get a value from an array at the given index
<a href="/blocks/array/getfirst">Get First</a> Get the first value from an array
<a href="/blocks/array/getlast">Get Last</a> Get the last value from an array
<a href="/blocks/array/joinstrings">Join Strings</a> Add each string in an array to a single string seperated by the separator string
<a href="/blocks/array/pop">Pop</a> Return a copy of the array without the last value, as well as the value it removed
<a href="/blocks/array/push">Push</a> Add the given value to the end of a copy of the array and return it
<a href="/blocks/array/removeatindex">Remove At Index</a> Remove a value from an array at the given index
<a href="/blocks/array/reverse">Reverse</a> Reverse the order of all elements in an array
<a href="/blocks/array/sum">Sum</a> Add all the values in a number array together
<a href="/blocks/array/takeleft">Take Left</a> Get the first 'Count' values from an Array
<a href="/blocks/array/takeright">Take Right</a> Get the last 'Count' values from an Array

ArrayFunction

Name Description Premium Cloud Required
<a href="/blocks/arrayfunction/all">All</a> Check if all items in an array match the given condition
<a href="/blocks/arrayfunction/any">Any</a> Check if any item exists in an array that matches the given condition
<a href="/blocks/arrayfunction/countby">Count By</a> Count the items in an array based on the result of the array function
<a href="/blocks/arrayfunction/distinctby">Distinct By</a> Finds unique items in an array based on the result of the array function
<a href="/blocks/arrayfunction/find">Find</a> Find the first item in an array that matches the given condition
<a href="/blocks/arrayfunction/findindex">Find Index</a> Find the index of the first item in an array that matches the given condition
<a href="/blocks/arrayfunction/groupby">Group By</a> Groups array items into a new object with the result of the array function as the keys and grouped results as the values
<a href="/blocks/arrayfunction/map">Map</a> Creates a new array of populated with the results of the array function
<a href="/blocks/arrayfunction/orderby">Order By</a> Orders an array based on the result of the array function
<a href="/blocks/arrayfunction/remove">Remove</a> Return all values in an array except those that match the given condition
<a href="/blocks/arrayfunction/resolve">Resolve</a> Provides the required value or condition for an array function
<a href="/blocks/arrayfunction/sumby">Sum By</a> Sum based on a value on each item in an array using the result of the array function
<a href="/blocks/arrayfunction/where">Where</a> Return all values in an array that match the given condition

BooleanLogic

Name Description Premium Cloud Required
<a href="/blocks/booleanlogic/and">And</a> Returns true if both inputs are true
<a href="/blocks/booleanlogic/not">Not</a> Return the opposite value of a boolean
<a href="/blocks/booleanlogic/or">Or</a> Returns true if either input is true
<a href="/blocks/booleanlogic/xor">XOR</a> Return true if either, but not both, inputs are true

Converter

Name Description Premium Cloud Required
<a href="/blocks/converter/parsebooleanstring">Parse Boolean String</a> Convert a string of the right format to a boolean
<a href="/blocks/converter/parsedatestring">Parse Date String</a> Convert a string of the right format to a date
<a href="/blocks/converter/parsejsonstring">Parse JSON String</a> Convert a JSON string to an object, or object array
<a href="/blocks/converter/parsenumberstring">Parse Number String</a> Convert a string of the right format to a number
<a href="/blocks/converter/tostring">To String</a> Convert a value to a string

Dashifi

Name Description Premium Cloud Required
<a href="/blocks/dashifi/dashifibasicpanel">Dashifi Basic Panel</a> Create the required object to update the information of a basic panel within Dashifi
<a href="/blocks/dashifi/dashifichartpanel">Dashifi Chart Panel</a> Create the required object to update the information of a chart panel within Dashifi
<a href="/blocks/dashifi/dashifiupdatedashboard">Dashifi Update Dashboard</a> Update a Dashboard on Dashifi

Date

Name Description Premium Cloud Required
<a href="/blocks/date/adddatevalues">Add Date Values</a> Add to the different values that comprise a date
<a href="/blocks/date/after">After</a> Check if subject date after value date
<a href="/blocks/date/before">Before</a> Check if subject date before value date
<a href="/blocks/date/datefromepoch">Date From Epoch</a> Get a date from the specified epoch
<a href="/blocks/date/datenow">Date Now</a> Get current date and time
<a href="/blocks/date/getdatevalues">Get Date Values</a> Get the different values that comprise a date
<a href="/blocks/date/getday">Get Day</a> Get the day of the week (from 0 to 6) of the specified date
<a href="/blocks/date/getepoch">Get Epoch</a> Get the epoch of the specified date
<a href="/blocks/date/millisecondsbetween">Milliseconds Between</a> Get the milliseconds between two dates
<a href="/blocks/date/setdatevalues">Set Date Values</a> Set the different values that comprise a date

Evaluator

Name Description Premium Cloud Required
<a href="/blocks/evaluator/equal">Equal</a> Compare two values to determine if they are equal
<a href="/blocks/evaluator/greaterthan">Greater Than</a> Determine if the subject is greater than the given value
<a href="/blocks/evaluator/isnotnull">Is Not Null</a> Determine if the subject is not null
<a href="/blocks/evaluator/isnull">Is Null</a> Determine if the subject is null
<a href="/blocks/evaluator/lessthan">Less Than</a> Determine if the subject is less than the given value
<a href="/blocks/evaluator/notequal">Not Equal</a> Compare two values to determine if they are not equal

Execution

Name Description Premium Cloud Required
<a href="/blocks/execution/conditionalvalue">Conditional Value</a> Return one of two values based on a boolean condition
<a href="/blocks/execution/delay">Delay</a> Delay execution for the given number of milliseconds
<a href="/blocks/execution/if">If</a> Evaluate a boolean condition to determine the execution path
<a href="/blocks/execution/return">Return</a> The ending point for function execution
<a href="/blocks/execution/start">Start</a> The starting point for function execution
<a href="/blocks/execution/throwerror">Throw Error</a> Throws a custom error with the specified message
<a href="/blocks/execution/try">Try</a> Attempt to execute a path and catch any errors that occur

External

Name Description Premium Cloud Required
<a href="/blocks/external/apicall">API Call</a> Make an API Call
<a href="/blocks/external/puppeteer">Puppeteer</a> Run a Puppeteer script and return the result
<a href="/blocks/external/xpath">XPath</a> Use an XPath expression to select nodes from a html/ xml document

Function

Name Description Premium Cloud Required
<a href="/blocks/function/apicall">API Call</a> A custom function

Loop

Name Description Premium Cloud Required
<a href="/blocks/loop/break">Break</a> Stop a loop from executing
<a href="/blocks/loop/foreachloop">For Each Loop</a> Execute a loop for each value in an array
<a href="/blocks/loop/forloop">For Loop</a> Execute a loop based on an incrementing value
<a href="/blocks/loop/whileloop">While Loop</a> Execute a loop while the given boolean variable remains true

Numeric

Name Description Premium Cloud Required
<a href="/blocks/numeric/absolute">Absolute</a> Get the non-negative value of subject
<a href="/blocks/numeric/add">Add</a> Add two numeric values together
<a href="/blocks/numeric/ceil">Ceil</a> Round the subject up to the given number of decimal places
<a href="/blocks/numeric/divide">Divide</a> Divide the subject by the given value
<a href="/blocks/numeric/floor">Floor</a> Round the subject down to the given number of decimal places
<a href="/blocks/numeric/modulo">Modulo</a> Return the remainder of the subject divided by the given value
<a href="/blocks/numeric/multiply">Multiply</a> Multiply two numeric values together
<a href="/blocks/numeric/power">Power</a> Raise the subject to the power of the given value
<a href="/blocks/numeric/root">Root</a> Return the root of the subject
<a href="/blocks/numeric/round">Round</a> Round the subject to the given number of decimal places
<a href="/blocks/numeric/subtract">Subtract</a> Subtract the given value from the subject

Object

Name Description Premium Cloud Required
<a href="/blocks/object/deleteproperty">Delete Property</a> Delete an object property by its name
<a href="/blocks/object/getkeys">Get Keys</a> Get a list of an objects property keys
<a href="/blocks/object/getproperty">Get Property</a> Get an object property by its name
<a href="/blocks/object/getvalues">Get Values</a> Get a list of an objects property values
<a href="/blocks/object/renameproperty">Rename Property</a> Rename an object property by its name
<a href="/blocks/object/setproperty">Set Property</a> Set an object property by its name

Storage

Name Description Premium Cloud Required
<a href="/blocks/storage/storageclear">Storage Clear</a> Delete all items in cross function storage
<a href="/blocks/storage/storagedelete">Storage Delete</a> Delete an item in cross function storage by its name
<a href="/blocks/storage/storageget">Storage Get</a> Get an item in cross function storage by its name
<a href="/blocks/storage/storagelist">Storage List</a> List item names and their expiry dates in cross function storage
<a href="/blocks/storage/storageset">Storage Set</a> Save an item in cross function storage with an optional expiration date

String

Name Description Premium Cloud Required
<a href="/blocks/string/camelcase">Camel Case</a> Convert the first letter of every word except the first to uppercase and remove spaces
<a href="/blocks/string/characterat">Character At</a> Return the character at the given index of a string
<a href="/blocks/string/concatstrings">Concat Strings</a> Join two strings together
<a href="/blocks/string/indexofcharacter">Index Of Character</a> Find the index of the first instance of a chracter in a string
<a href="/blocks/string/kebabcase">Kebab Case</a> Convert all letters to lower case and seperate words with a hyphen
<a href="/blocks/string/tolowercase">To Lower Case</a> Return the given string converted to lower case
<a href="/blocks/string/padend">Pad End</a> Increase the length of a string to the required value by adding the provided characters to the end
<a href="/blocks/string/padstart">Pad Start</a> Increase the length of a string to the required value by adding the provided characters to the start
<a href="/blocks/string/pascalcase">Pascal Case</a> Convert the first letter of every word to uppercase and remove spaces
<a href="/blocks/string/regexmatches">Regex Matches</a> Return all matches of the regex pattern in the given string
<a href="/blocks/string/regexreplace">Regex Replace</a> Replace all matches of the regex pattern in the given string with the replacement value
<a href="/blocks/string/replace">Replace</a> Replace all instaces of the target in the given string with the replacement value
<a href="/blocks/string/snakecase">Snake Case</a> Convert all letters to lower case and seperate words with an underscore
<a href="/blocks/string/splitstring">Split String</a> Break a string into an array of values at each instance of the given separator
<a href="/blocks/string/startcase">Start Case</a> Convert the first letter of every word to uppercase seperate words with spaces
<a href="/blocks/string/stringlength">String Length</a> Return the length of the given string
<a href="/blocks/string/substring">Substring</a> Extract a number of characters from a specific point in the given string
<a href="/blocks/string/trim">Trim</a> Remove whitespace from both ends of the given string
<a href="/blocks/string/touppercase">To Upper Case</a> Return the given string converted to upper case

Typing

Name Description Premium Cloud Required
<a href="/blocks/typing/asanyarray">As Any Array</a> Apply any array typing without any modification to the underlying value
<a href="/blocks/typing/asbooleanarray">As Boolean Array</a> Apply boolean array typing without any modification to the underlying value
<a href="/blocks/typing/asboolean">As Boolean</a> Apply boolean typing without any modification to the underlying value
<a href="/blocks/typing/asdatearray">As Date Array</a> Apply date array typing without any modification to the underlying value
<a href="/blocks/typing/asdate">As Date</a> Apply date typing without any modification to the underlying value
<a href="/blocks/typing/asnumberarray">As Number Array</a> Apply number array typing without any modification to the underlying value
<a href="/blocks/typing/asnumber">As Number</a> Apply number typing without any modification to the underlying value
<a href="/blocks/typing/asobjectarray">As Object Array</a> Apply object array typing without any modification to the underlying value
<a href="/blocks/typing/asobject">As Object</a> Apply object typing without any modification to the underlying value
<a href="/blocks/typing/asstringarray">As String Array</a> Apply string array typing without any modification to the underlying value
<a href="/blocks/typing/asstring">As String</a> Apply string typing without any modification to the underlying value

Utility

Name Description Premium Cloud Required
<a href="/blocks/utility/generateguid">Generate GUID</a> Generate a random RFC4122 compliant GUID
<a href="/blocks/utility/hash">Hash</a> Create an identifying string representing a given value
<a href="/blocks/utility/log">Log</a> Log a value to view its contents
<a href="/blocks/utility/randomnumber">Random Number</a> Generates a random integer between the min and max (inclusive)

Variable

Name Description Premium Cloud Required
<a href="/blocks/variable/declarearray">Declare Array</a> Declare an empty array
<a href="/blocks/variable/declareobject">Declare Object</a> Declare an empty object
<a href="/blocks/variable/getvariable">Get Variable</a> Retrieve the value of the named variable
<a href="/blocks/variable/setvariable">Set Variable</a> Update or create the named variable