Archived:Displaying Multi-Line Strings in Data Dashboard for LabVIEW on iPad

Updated Dec 18, 2023

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Reported In

Software

  • Data Dashboard for LabVIEW
  • LabVIEW

Operating System

  • iOS

Issue Details

I’m working with the Data Dashboard for LabVIEW on iPad but can’t seem to get multi-line text to display correctly:

Is there a solution or workaround for this? I’d like to display a number of lines of text to the user without having to split it down per line and separate variables.

Solution

Note: NI is no longer updating Data Dashboard and the Data Dashboard download is no longer available on the App Store nor Google Play. Consider using WebVIs for your LabVIEW-based web application needs.

Data Dashboard for Apple iPad does indeed show multi-line strings as a single line. It converts line-breaks into white spaces.

However, there is a workaround to create an indicator that can display multi-line strings on a Dashboard on the iPad Data Dashboard app. Follow these steps to do so:
  1. Convert the multi-line string into an array of strings in your VI.
  1. Assign this array to a network-published variable. The type of this variable shall be array of strings as well.
  1. On your iPad create a List Box indicator on your Data Dashboard.
  2. Connect the "Item Strings" property of this List Box indicator to the shared variable.
This screenshot shows both a normal string indicator and a multi-line List Box:

Additional Information

The following code is an example showing one way to convert an already-existing multi-line string into an array of strings. This example makes use of the Multi-line String to Array.vi, which is part of the Third-Party Add-On "OpenG String Library" by OpenG.org. It can be installed either using VI Package Manager or by downloading and installing the the OpenG Libraries package available on NI's Tools Network.


Note: Currently Multi-line String to Array.vi detects line breaks in the three representations Line Feed (LF), Carrier Return (CR), and CR+LF, respectively \n, \r, and \r\n.