Link Search Menu Expand Document

String Entity Functions

Sep 28 2022 at 12:00 AM

  1. Case-Insensitive Equals
  2. Concat
  3. Find
  4. SubString

Case-Insensitive Equals

Function Description:

This function compares two strings and returns whether they match, regardless of the case (uppercase or lowercase) that was used.

Function Structure:

Figure 1 - Case Insensitive Equals

Inputs Required:

  • Value 1 – The value of the string received is compared to the string value linked to Value 2 to determine whether they match.
  • Value 2 – The value of the string received is used for comparison to the string value linked to Value 1.

Output Expected:

  • String - The function returns a boolean (true/false), where the output would be true if the strings match no matter the casing of the letters, and false if they do not match.

Use Case Example(s):

ExampleValue 1Value 2Value Returned
1" Word""word"True
2" Sentence""word"False
3" wOrD""Word"True

Use Case Scenario(s):

1. When a user enters their initials into the system, it should be recognized regardless of case used.
2. When you sign up for a website and you put in your e-mail address, the website will ask you to confirm your email address by entering it in a second time where it will check if the two entries match.

Concat

Function Description:

This function concatenates, in other words combines, all the values received and returns one single string.

Function Structure:

Figure 2 - Concat

Inputs Required:

  • Value – This is a value of any data type received and concatenated with other values received.
NOTE
Once a value is added to the Value input box, an option to add another value will appear, and so on, allowing the user to have multiple inputs.

Output Expected:

  • String - The function returns a string value consisting of all values received in the function.

Use Case Example(s):

ExampleValue 1Value 2Value 3Value 4Output (String)
12022/09/22is thecurrentdate.2022/09/22 is the current date.
22022/01/01 -My New Year’s resolutions:Go to the gym andeat healthy.2022/01/01 - My New Year’s resolutions: Go to the gym and eat healthy.

The Figure below shows a variation of example 2 visually when built in Commander Portal, where the “New year’s resolution” endpoints linked are placeholders for a user to input their goals for the year:

Figure 3 - Concat Function

NOTE
Remember to add punctuation and special characters where necessary when using the Concat function.

Use Case Scenario(s):

1. Create a list of sites in order to allow the guard to visit them and send the SMS to the security centre.
2. Create a list of assets available at the site.

Find

Function Description:

This function is used to find the placement/position of a specific word that you are looking for within a given string.

Function Structure:

Figure 4 - Find

Inputs Required:

  • Input – This is the string from which you will search for a word.
  • Search String – This is the specific string value or word’s placement that needs to be found.
  • Start Point – This is the starting character position of the Input string from which the Find function will start searching for the specified Search string.

Output Expected:

  • Integer - The function returns an integer value that indicates the position of the first character of the specific word that is required to be found in the given string.
NOTE
If the function has been configured incorrectly, or if it cannot find the string value being looked for within the given string, it will return an error value of -1.

Use Case Example(s):

ExampleInputSearch StringStart PointOutput(Int)
12022/01/01 My New Year’s resolutions: Go to gym and eat healthy.“gym”397
2The building alarm just went off.“on”14-1
3Loadshedding just started an hour ago.“Loadshedding”11
4Jonas Moyo, EUT-204047898“EUT”113

Use Case Scenario(s):

1. If a university or college wants to confirm that an access card is from their school. Assuming that all their student card registrations begin with the university’s abbreviation.
2. A company has a list of expenses and wishes to know the placement in the list of the fixed and operating expenses in the list. Please note that two functions will be needed for this, one for the fixed expenses, and another one for the operating expenses.

SubString

Function Description:

This function is used is to take out a specific section from a string, and build a whole new string. A substring is a subset or part of another string.

Function Structure:

Inputs Required:

  • Input – This is the string from which you would like to take out a specific section.
  • Starting Position – This is the numerical position where the extraction of the characters will begin.
  • Length – This is the exact length of the characters you would like to extract.
NOTE
The length parameter needs to be precise (int). If the length input exceeds the length of the input string, the function will return a -1 (error value).

Output Expected:

  • String - The function returns the new string that has been built from the Input value of the function.

Use Case Example(s):

ExampleInputStarting PositionLengthOutput(String)
1On Monday I go to work.46Monday
2Life gives opportunities to learn everyday!124Life gives opportunities
3Your ID number is 780325 2665 18 0.1916780325 2665 18 0
4Don’t you think IoT is the next best thing?1728-1
52018/01/21 00:09:30 - MaryJane Smith - Product Engineering - Solutions Architect2314MaryJane Smith

Use Case Scenario(s):

1. If the department of Home Affairs wants to extract the date of birth of a South African citizen or permanent resident from their ID number.
2. A company wants to know the specific time an employee clocked in for work.