# Asterisk Project : Asterisk 13 Function_FIELDNUM

Created by wikibot on Aug 08, 2014

# FIELDNUM()

### Synopsis

Return the 1-based offset of a field in a list

### Description

Search the variable named varname for the string value delimited by delim and return a 1-based offset as to its location. If not found or an error occured, return `0`.

The delimiter may be specified as a special or extended ASCII character, by encoding it. The characters `\n`, `\r`, and `\t` are all recognized as the newline, carriage return, and tab characters, respectively. Also, octal and hexadecimal specifications are recognized by the patterns `\0nnn` and `\xHH`, respectively. For example, if you wanted to encode a comma as the delimiter, you could use either `\054` or `\x2C`.

Example: If ${example} contains `ex-amp-le`, then ${FIELDNUM(example,-,amp)} returns 2.

### Syntax

    FIELDNUM(varname,delim,value)

##### Arguments

- `varname`
- `delim`
- `value`

### See Also

### Import Version

This documentation was imported from Asterisk Version SVN-branch-13-r420538