How does the Join Multiple Texts function in MyInsights Studio operate, and how does it join the values passed to it in its two parameters?
MyInsights Studio includes a function called Join Multiple Texts which allows for combining a list of text values and separating the entries with another value. This function can be called from within a Data Element or in a Field List on the Page Layout. Its normal use is to connect a list of values from the Text values entry and separate them with the text or character from the Join with entry.
In the following example, the Join Multiple Texts function is calling a list of Call Detail IDs and displaying the list in a row, separating the IDs with spaces and a dash:
- The first parameter in the function is Text values. This parameter represents the array or list of values to be combined into a single string. This can be an If statement, Field Values from a list of records, or a List of individual values.
- The second parameter is Join with. This represents the character or value that will be used as a separator in between the list of Text values from the previous parameter. It can be a text character such as a comma, hyphen, slash, or semicolon, or a text value, or even another data element from the visualization.
How the Text values and Join with fields work together
If the Text values parameter includes several values, such as a list of values containing "ABC", "DEF", and "GHI", then the function will combine them together and separate them with whatever is in the second parameter.
For example, if the Join with parameter is a dash, the returned string from the function is "ABC-DEF-GHI". However, if this parameter is blank, the returned string is "ABCDEFGHI".
If the Text values parameter is a list only one entry long, the Join with separator will not display, as there are not multiple values from the Text values list to separate.
If the Join with parameter returns more than one value, only the first will be used.
How to join two or more individual values into one concatenated entry
If a MyInsights Studio dashboard or visualization requires that two or more separate fields from Data Elements be joined together, and each field returns only one record, then the Join Multiple Texts function must be set up differently.
An example might be using Join Multiple Texts to concatenate a Territory Name and a User Name to display in the dashboard like "Territory 12345 - Sales User", as shown here:
If the Territory field in this example is put in the Text values section and the User Name field is put in the Join with section, the User Name would not display in the dashboard, since the Text values entry is only one record long.
When joining together multiple entries that are lists only one record long, all the fields that must be joined together must go in the Text values section, with any optional separator in the Join with section.
To get two or more different one-result fields joined together as in the example above, the user must set up the Join Multiple Texts so that all the fields are in the Text values section. And if a separator (in this example, a hyphen) is required between the Text values entries, the separator is placed in the Join with section.
To set up multiple one-result fields in the Text values section, set up the Join Multiple Texts as follows:
List of Individual Values
In this section, repeat the following two or more times, once for each field that needs pulled into the Join Multiple Texts:
Pick a Value Arbitrarily
Field Values from a List of Records
- Record List
- Field Values from a List of Records
- Pick a Value Arbitrarily
- List of Individual Values
- Join With (separator, optional)
Here are those steps in detail:
- First, select the List of individual values option for the Text values entry.
- Then, add two or more Pick a value arbitrarily entries.
- Each Pick a value arbitrarily entry should include a Field values from a list of records entry.
- Each of these requires a Record List and Field value.
- If required, add a Join with separator.
To display the example mentioned earlier in this article - concatenating a Territory Name in a report next to a user's Name from the User Details record - the user would set up both entries in the Text values section as shown here:
CRM Help Documentation: