Show only part of a value

Depending on the value of a data field, you may want to show only part of the value.

For example, the data fields Sample_DilutionFactor and Sample_Multipliers show five numbers separated by semicolon, but only part of the numbers may be set by the chromatographic data system. Therefore the value may look like 10; 0; 0; 0; 0 if only the first number is set. To display only the number 10 instead of the entire string, you can use the following expression:

=Choose(1, Split(Sample_Multipliers, ";"))

  • The Split function divides the string in several parts, using the semicolon as a delimiter. In this example, the different parts are the single numbers.

  • The Choose function selects and returns a specific value from a list of values. In this example, it returns the first value, that is, the number 10.