Added String, Number and List formulas

Introduction

The transformation formulas are categorized into various types, among them String, Number, and List formulas are the most useful ones. These three formulas have been added in our 3.1.2 release notes. It will be beneficial for you to get a better experience while using the transformation formulas.

Overview

String Formula

Strings refer to sequences of text and characters. This formula is used to convert strings, string characters, format the string, and many more. The string formula allows you to perform the text modification, which is used extensively in an attempt to convert data to other sources. The "String functions" refers to the category of functions, that allows you to operate the blocks of text in various manners. Sapper supports a variety of string formulas. Those are CONCATENATE, STARTS, REVERSE, SUBSTRING, CONTAINS, EXACT, UPPER, LOWER, ISBLANK, ENDS, TRIM, SUBSTITUTE, SPLIT, SEARCH, PROPER, BYTES, MATCH, IS_NOT_TRUE, EXCLUDE, REMOVESPECIALCHARS, LSTRIP, RSTRIP, STRIP_TAGS, LJUST, RJUST, SUB, LENGTH, SCAN, ENCODE, TRANSLITERATE, QUOTE, TO_S, ORDINALIZE, BYTESIZE

For more information please visit : https://sappersoftware.atlassian.net/wiki/spaces/SD/pages/668532719

Example of string formula

"abcdef".casecmp("abcde") #=> 1 "aBcDeF".casecmp("abcdef") #=> 0 "abcdef".casecmp("abcdefg") #=> -1 "abcdef".casecmp("ABCDEF") #=> 0 a = "hello world" a.count "lo" #=> 5 a.count "lo", "o" #=> 2 a.count "hello", "^l" #=> 4 a.count "ej-m" #=> 4 "hello^world".count "\\^aeiou" #=> 4 "hello-world".count "a\\-eo" #=> 4 c = "hello world\\r\\n" c.count "\\" #=> 2 c.count "\\A" #=> 0 c.count "X-\\w" #=> 3

Benefits of String Formula

  • The string formula helps save memory and ensures fast performance.

  • By using this formula you can secure the values, as the value for the string objects can’t change.

  • The string formula helps improve the thread safety while performing the string formula in the multi-threaded environment.

  • With the help of the sting formula, the class loading is more secure, as the string value allows to load an argument into a class that is not changeable.

Steps to use String Formula

The string formulas can be used in various automation based on the requirements.

  1. Create or select existing automation from the automation tab of the sapper homepage.

 

2. To create automation you need to click on the create automation option located on the top right side of the screen.

3. Provide the name, and description and save it for further process. If you want to use the existing automation then you need to select it from the provided automation list from the “My Automation” field. You can also search for specific automation from the “search for automation field”.

 

4. Click on the specific application and the form will be open on the left side of the screen.

5. Here you can use the formulas from the right side of the provided option.

 

 

 

6. Suppose you want to add a formula in the “First Name”, then you need to click on the formula above this section.

7. Now search for the String formula, and you will get the available options. Select the required one.

8. The formula will be selected for the “First Name” section now you need to save it for completing the process.

9. You can add formulas in the various field, based on your requirements and options.

 

 

 

10. You can add multiple formulas for one field. After adding one formula you need to add a comma(,) then you can search and select another formula for the specific field based on your requirements.

Overview

Number Formula

The number formulas refer to the formulas associated with various digits in integers, for example, 9, 10, 11, while Float refers to decimals, for example, 1.75. The number formulas help present the formulas in a systematic manner of integers. It can be also referred to as a number line. It is a system of expressing numbers in the formula format to simplify the process of automation. Sapper supports a variety of number formulas. Those are SUM, SUBSTRACT, PRODUCT, DIVIDE, QUOTIENT, POWER, SQRT, MOD, MAX, MIN, ABS, ROUND, ISEVEN, ISODD, TO_F, TO_I, FLOOR, CEILING.

For more information please visit: https://sappersoftware.atlassian.net/wiki/spaces/SD/pages/669089821

Example of number formula

2 ** 3 #=> 8 2 ** -1 #=> (1/2) 2 ** 0.5 #=> 1.4142135623731 a = 0b11001100101010 30.downto(0) do |n| print a[n] end #=> 0000000000000000011001100101010 (-2**12-1).bit_length #=> 13 (-2**12).bit_length #=> 12 (-2**12+1).bit_length #=> 12 -0x101.bit_length #=> 9 -0x100.bit_length #=> 8 -0xff.bit_length #=> 8 -2.bit_length #=> 1 -1.bit_length #=> 0 0.bit_length #=> 0 1.bit_length #=> 1 0xff.bit_length #=> 8 0x100.bit_length #=> 9 (2**12-1).bit_length #=> 12 (2**12).bit_length #=> 13 (2**12+1).bit_length #=> 13

Benefits of Number Formula

  • The number formula helps to represent the numbers in a small symbol set.

  • It helps to provide a simple process for simplifying the automation process

  • With the help of the number formula, you will be able to convert one number system into another.

Steps to use Number Formula

The number formulas can be used in various automation based on the requirements.

  1. Create or select existing automation from the automation tab of the sapper homepage.

 

2. To create automation you need to click on the create automation option located on the top right side of the screen.

3. Provide the name, and description and save it for further process. If you want to use the existing automation then you need to select it from the provided automation list from the “My Automation” field. You can also search for specific automation from the “search for automation field”.

 

4. Click on the specific application and the form will be open on the left side of the screen.

5. Here you can use the formulas from the right side of the provided option.

 

 

 

6. Suppose you want to add a formula in the “First Name”, then you need to click on the formula above this section.

7. Now search for the number formula, and you will get the available options. Select the required one.

8. The formula will be selected for the “First Name” section now you need to save it for completing the process.

9. You can add formulas in the various field, based on your requirements and options.

 

 

 

10. You can add multiple formulas for one field. After adding one formula you need to add a comma(,) then you can search and select another formula for the specific field based on your requirements.

 

Overview

List Formula

Lists arrays are ordered, to integer-indexed the collections of any objects. List indexing starts with 0. It refers to the same data structure. The list formula is ordered, to get values for the formula. In addition to the basic data types (for example, string and number), you may encounter more complex data structures that contain information about multiple items or multiple objects of information about a single item. To structure this kind of item you can use the list type of formulas. Sapper supports a variety of list formulas. These are FIRST, LAST, INDEX, UNIQ, LENGTH, BLANK, INCLUDE, PRESENT, PRESENCE, and, KEYS.

For more information please visit: https://sappersoftware.atlassian.net/wiki/spaces/SD/pages/669253653

Example of List formula

number_list = [100, 101, 102, 103, 104] [{ 'name' => 'Joe', 'email' => 'joe@abc.com', 'state' => 'CA', 'company' => 'ABC', 'company_rev' => 1000, 'description' => { 'summary' => 'First time buyer', 'estimated_value' => 300 } },{ 'name' => 'Jill', 'email' => 'jill@nbc.com', 'state' => 'MA', 'company' => 'NBC', 'company_rev' => 1000, 'description' => { 'summary' => 'Referral', 'estimated_value' => 500 } },{ 'name' => 'Joan', 'email' => 'joan@nbc.com', 'state' => 'MA', 'company' => 'NBC', 'company_rev' => 10000, 'description' => { 'summary' => 'Recurring customer', 'estimated_value' => 900 }

Benefits of List Formula

  • The list formula helps to simplify the formula system of multiple objects

  • You can use various objects and text in a single formula.

  • It helps to represent a structured formula module for multiple objects, which helps you to use this formula in the automation in a better manner.

Steps to use List Formula

The list formulas can be used in various automation based on the requirements.

  1. Create or select existing automation from the automation tab of the sapper homepage.

 

2. To create automation you need to click on the create automation option located on the top right side of the screen.

3. Provide the name, and description and save it for further process. If you want to use the existing automation then you need to select it from the provided automation list from the “My Automation” field. You can also search for specific automation from the “search for automation field”.

 

4. Click on the specific application and the form will be open on the left side of the screen.

5. Here you can use the formulas from the right side of the provided option.

 

 

 

6. Suppose you want to add a formula in the “First Name”, then you need to click on the formula above this section.

7. Now search for the list formula, and you will get the available options. Select the required one.

8. The formula will be selected for the “First Name” section now you need to save it for completing the process.

9. You can add formulas in the various field, based on your requirements and options.

 

 

10. You can add multiple formulas for one field. After adding one formula you need to add a comma(,) then you can search and select another formula for the specific field based on your requirements.