GetField

Returns the string field.

Syntax

GetField(stringWithFields, fieldnumber)

Parameters

Parameter

Type

Description

stringWithFields

string

The string containing multiple data fields. The field is a substring that does not contain spaces, tabs or commas

fieldnumber

number

The field number.

Return

Returns the field with the specified number as a string. The field is a substring that does not contain spaces, tabs or commas. For example,

GetField("One two 3 4", 3)returns “3”.

Note

In Python, use split() method of string object: https://www.tutorialspoint.com/python/string_split.htm .

Examples

Python

import nex
secondField = nex.GetField("Neuro04a Neuron05b", 2)
# secondField now is equal to "Neuron05b"

NexScript

secondField = GetField("Neuro04a Neuron05b", 2)
% secondField now is equal to "Neuron05b"