Insert New Line to Text

Verb: appendLineToText

Inserts a new line at the end of a text.

Syntax

appendLineToText --text(String) --value(String) (String)=value

Inputs

Script Designer Required AcceptedTypes Description
--text Text Required Text Text where the new line is inserted.
--value New line Required Text Text that should be inserted in the new line.

Outputs

Script Designer AcceptedTypes Description
value Text Text Returns the text with the new line inserted.

Example

Example 1: The command inserts a new line to an existing text.

defVar --name text --type String --value IBM
defVar --name textNewLine --type String --value AUTOMATION
defVar --name newText --type String
appendLineToText --text "${text}" --value "${textNewLine}" newText=value
logMessage --message "${newText}" --type "Info"
//The result obtained in $ {newText} is:
//IBM
//AUTOMATION

Example 2: The command inserts a time into an existing date.

defVar --name text --type Date --value "2019-08-12"
defVar --name newText --type String
appendLineToText --text "${text}" --value "9:00 AM" newText=value
logMessage --message "${newText}" --type "Info"
//The result obtained in $ {newText} is:
//2019-08-12
//9 :00 AM

Remarks

In the Text and New line parameters, it is possible to enter several variable types, however it is always returned as a Text.

See Also

  • Add Escape Characters to Regular Expression
  • Add Escape Characters to Text
  • Calculate Hash
  • Change Text Case
  • Check File
  • Concatenate Texts
  • Convert HTML to Text
  • Count Occurrences in Text
  • Count Text Characters
  • Create Random Text
  • Create Table By Regular Expression
  • Empty or Null Text Variable
  • Find by Regular Expression
  • Find Occurrences in Text
  • Format Text
  • Get Subtext
  • Get Text from Regular Expression
  • HTML to Markdown
  • Join Text
  • Pad Text
  • Parse URI
  • Remove Diacritics
  • Remove Escape Characters
  • Replace Part of Text
  • Replace Text
  • Split Text
  • Trim Text Blanks