Format String

Description

Formats or gets information from a string and sets it as the value of a variable.

Works On
This action works on variables within the flow.
Changes Selection
This action does not change the selection.

Location

The Format String action is located in the Fuga Workshop panel under the Flow actions category.

Parameters

Format String General Parameters

String Field
(string) The string to format.
Format Type Drop-down
Specifies how to format the string 

  • Make Upper Case – Default. Formats the string to be all capital letters.
  • Make Lower Case – Formats the string to be all lower case letters.
  • Keep Beginning Of String – Keeps a specified amount of characters in the beginning of the string and removes all other characters.
  • Keep End Of String – Keeps a specified amount of characters in the end of the string and removes all other characters.
  • Keep Middle Of String – Removes a specified amount of characters from the beginning of the string, keeps a specified amount of characters in the middle of the string, and removes the rest of the characters from the end.
  • Remove Beginning Of String – Removes a specified amount of characters from the beginning of the string.
  • Remove End Of String – Removes a specified amount of characters from the end of the string.
  • Remove Middle Of String – Keeps a specified amount of characters in the beginning of the string, removes a specified amount of characters in the middle of the string, and keeps the rest of the characters in the end.
  • Replace Sub-String – Removes a sub-string that starts at a specified position, and has a specified amount of characters, and replaces it with another sub-string.
  • Replace Any Occurrence Of Sub-String – Removes all occurrences of a specified sub-string and replaces it with another sub-string.
  • Reverse String – Reverses the ordering of the string (e.g. 1234 becomes 4321).
  • Remove Spaces – Removes any spaces from the string.
  • Get String Length – Gets the amount of characters in the string.
  • Get Number From String – Finds the first number in the string. Numbers are considered to begin with the first occurrence of a number or a decimal point with a number after it, and are evaluated as continuing until a letter occurs (e.g., Box1Page2 becomes 1). Spaces and commas are not evaluated as starting a new number (e.g. 12 34 is evaluated as 1234). Decimal points without zeros are accepted as decimal values (e.g., Box.25 becomes 0.25).
  • First Occurrence Of – Gets the position of the first occurrence of a specified sub-string starting after a specified position.
  • Sort Delimited String – Sorts the sub-strings in a comma delimited string numerically or alphabetically, from smallest to largest or from a-z. In a delimited string with sub-strings that start with letters and numbers, numbers come first.
  • Reverse Sort Delimited String – Sorts a comma delimited string numerically or alphabetically, from largest to smallest or from z-a. In a delimited string with sub-strings that start with letters and numbers, letters come first.
  • Sort Numbers in Delimited String – Sorts a comma delimited string numerically by the numbers inside the string. The numbers can be anywhere within the sub-string, and can be mixed with letters. If there are multiple numbers only the first one found will be considered.
  • Delimited String From UPC – Separates a combined UPC (unique product code) into a comma delimited string (e.g., 1234/5/6 becomes “1234,1235,1236″).
  • UPC From Delimited String – Combines a comma delimited string with multiple UPCs into a combined UPC (e.g., “1234,1235,1236″ becomes 1234/5/6).
Put Result In Drop-down
The variable to put the formatted string into. The variable is of type string unless using the Get String Length, Get Number From String, or Get First Occurrence Of option is selected from the Format String Type drop-down, in which case the variable can be of type string or number.

Keep/Remove Parameters

The Characters field is visible when any of the Keep/Remove options is selected from the Format String Type drop-down. The From field is also visible when one of the Keep/Remove Middle options is selected.

From Field
(number) The point at which to start counting the characters to keep/remove. 

  • 1 – Default. The sub-string to remove or keep will start at the very beginning of the string.
Characters Field
(number) The amount of characters to keep/remove. This field is visible when one of the Keep or Remove Middle options are selected.
 

  • 1 – Default. One character will be kept/removed.

Replace Sub-String Parameters

These parameters are visible when the Replace Sub-String option is selected from the Format String Type drop-down.

From Field
(number) The point at which to start counting the characters to replace. 

  • 1 – Default. The sub-string to replace will start from the beginning of the string.
Characters Field
(number) The amount of characters to replace. 

  • 1 – Default. One character will be replaced.
Text Field
(string) The text to replace the sub-string with.

Replace Any Occurrence Of Sub-String Parameters

These parameters are visible when the Replace Any Occurrence Of Sub-String option is selected from the Format String Type drop-down.

Replace Field
(string) The sub-string to replace.
Text Field
(string) The text to replace the sub-string with.

First Occurrence Of Parameters

These parameters are visible when the First Occurrence Of option is selected from the Format String Type drop-down.

From Field
(number) The point at which to start searching for the sub-string. 

  • 1 – Default. Fuga will start searching for the sub-string in the very beginning of the string.
Text Field
(string) The sub-string to locate in the string.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>