About this article
StringJoin() is a function that joins multiple pieces of text together with a separator in between.
Pre-requisites
|
Syntax
Syntax | {{StringJoin(Separator, Value1, Value2, Value3...)}} |
Input | separator and text |
Output | joined text with separator in between |
Example 1
Using the StringJoin() function to join two pieces of text with a dash in between.
Binding | {{StringJoin("-", "text1", "text2")}} |
Output | "text1-text2" |
Example 2
Using the StringJoin() function to join 3 pieces of text with a slash in between.
Binding | {{StringJoin("/", "text1", "text2", "text3")}} |
Output | "text1/text2/text3" |
Example 3
Insert an address and allow the user to define their own separator in a form.
Binding | {{StringJoin(Form.Separator, Form.Street, Form.City, Form.Zipcode, Form.Country)}} |
Input | Form.Separator = "-" |
Output | "123 Washington Rd.-Lake Forest-60045-USA" |
Example 4
Insert an address with the Form.Zipcode being empty or containing a value.
Binding | {{StringJoin(" | ", Form.Street, Form.City, Form.Zipcode, Form.Country)}} | |
Input | Form.Zipcode = "" | Form.Zipcode = "60045" |
Output | "123 Washington Rd. | Lake Forest | USA" | "123 Washington Rd. | Lake Forest | 60045 | USA" |
Example 5
Using the IfElse() function to include a StringJoin() footer address if a checkbox is checked. Otherwise, add a blank content control.
Binding | {{IfElse(Form.IncludeAddress, StringJoin(" | ", Form.Street, Form.City, Form.Zipcode, Form.Country), "")}} |
Input | Checkbox is checked |
Condition | True |
Output | "123 Washington Rd. | Lake Forest | 60045 | USA" |
Example 6
Using the IfElse() function in combination with StringJoin() to hide text (using a Group element) if both questions 1 and 2 are empty.
Binding | {{IfElse(Equals(StringJoin("", Form.Question1, Form.Question2), ""), VisibilityType.Hidden, VisibilityType.Visible)}} |
Input | Form.Question1 = "" and Form.Question2 = "" |
Output | Hidden text |
Related articles
Comments
0 comments
Article is closed for comments.