Question

Getting the current record ID on Section Schema

Hi 

 

I want to create a query on a Section Schema in the same way I do it normally on a Page Schema.

 

On a Page Schema It usually starts with getting the current record ID like this:

 

var recordID = this.get("Id");

 

But when I do the same on the Section Schema I get an undefined value to my recordID variable.

 

Does some one know how to fix this issue ?

 

 

Like 1

Like

3 comments

Since the Section Schema is a list, you cannot get the Id by simply using:

this.get("Id")

Instead you must use the following to first get the currently active row:

this.getActiveRow().get("Id")

 

Harvey Adcock,

It works! thank you so much Harvey.

Harvey Adcock,

 

Hi. I am having issues of the same kind. I want the text value of one of my record's text-values. I have tried all of these and I'm not getting the result I want.

 

This worked on the Page metod:

var path= this.get("MyString"); 

 

Any of these does not work in the Section metod:

var activeRow = this.get("ActiveRow");
var path = this.get("GridData").get(activeRow).get("MyString").value;
var path = this.get(activeRow).get("MyString").value;
var path = this.get("MyString").value;

I also tried all of them with/or without the .value

Show all comments