Choose where you’d like to start

getAsString

Overview

The getAsString function fetches an element from a collection as a text value.

Return Type

Syntax

<variable> = <collection>.getAsString(<index>);

where,

ParameterData typeDescription
<variable>TEXTVariable which will contain the element returned as text value.
<collection>COLLECTION/LIST

The collection from which elements need to retrieved as text value.

<index>

NUMBER

The position in the collection from which the element needs to be fetched as text value.

Examples

 product_name = Collection();
 product_name="123,456,120,120.46";
 index2 = product_name.getasstring(2); // The number 120 gets stored in index2 as a 'text' value

Related Links

Get Started Now

Execute