not being resolved in SKUID V2

I am trying to get a field value using javascript but data.0 is giving error.

Please suggest if the 0 is causing Uncaught SyntaxError: Unexpected number.

cmodel = skuid.runtime.getPage('RSS_Support_Mainpage__v2').model.getModel('DialPad')
//Ye {_parentPageId: 'sk-2n8w-14', dataSourceName: 'salesforce', dataSource: E, processOnClient: true, id: 'DialPad', …}
//VM6472:1 Uncaught SyntaxError: Unexpected number

Hello Dinesh,

Since this is in Javascript you need to do[0].Description.

Or another approach:

let firstRow = cmodel.getFirstRow();
1 Like

Thanks lukaspovilonis.

The first approach to get the row context in array using isn’t working.

However, the second approach worked to get the first row and fetch value.

Thanks again for your time and help.

I’m glad the 2nd way worked. Regarding the 1st way, try removing . before [0].

Instead of[0], do the following,[0]

All good.

1 Like

It worked, thanks for your time and help!