ldriver
I'm new here

How to get dataset form data fields from global page content area?

Jump to solution

I need to get data from a dataset in the presentation channel, but using global.page.body("container").  So for example, I can do this and get the template UID:

$CMS_VALUE(#global.page.body("container").getFirstChild().template.uid)$

But on that template is an FS_LIST object which basically just selects a dataset.  I need the data from that dataset selected.  So I'm stuck on how to get the data form fields from the data set using the content area.  For example, I need something like this (this is pseudo code);

$CMS_VALUE(#global.page.body("container").getFirstChild().dataSet.formData.tt_id)$

Not sure what to put beyond getFirstChild, or if getFirstChild is even correct.

0 Kudos
1 Solution

Accepted Solutions
sense
Elite Observer

This code should give you the correct data

$CMS_VALUE(#global.page.body("container").getFirstChild().formData.get(#global.language, "st_datasets").get.get(0).fs_id)$

View solution in original post

0 Kudos
2 Replies
sense
Elite Observer

This code should give you the correct data

$CMS_VALUE(#global.page.body("container").getFirstChild().formData.get(#global.language, "st_datasets").get.get(0).fs_id)$

0 Kudos

This works!  Thank you.

0 Kudos