You are here: Development Standards > OSAS Standards > Using String Templates > Other Functions

# Other Functions

A field in a template can be accessed in two ways. You can access the data directly, using

`0030 LET CUST_ID$=ARCU.CUST$, CUST_NAME$=ARCU.NAME$, CUST_BALANCE=ARCU.BALANCE`

The FIELD() and NFIELD() functions can also be used to access data in a string template as follows:

`1000 LET CUSTOMER_ID$=FIELD(ARCU$,”NAME”)`

or

`1000 LET A$=“NAME”,CUSTOMER_ID$=FIELD(ARCU$,A$)`

With this format, you can determine field values at run time, and by changing a variable that stores the actual template field name, you can write generic programs that retrieve a field from a template.

For numeric fields, use this syntax:

`1000 LET CUSTOMER_BALANCE=NFIELD(ARCU$,”BALANCE”)`

or

`1000 LET A$=“BALANCE”,CUSTOMER_BALANCE=NFIELD(ARCU$,A$)`

If you are referencing a numeric in the string template, you must use the NFIELD function.