Content SC does not fetch data

The dmx.parse is working perfectly fine.
There could be many different reasons to why it is not returning data - wrong expression, the variable targeted not yet available etc.

My console log output is here

So:

Is your code working when you test in the browser console, when your page is loaded?
What happens if you run this in the console?

var envSort = dmx.parse("content.activeDesignData.data.environment_sort");
console.log(envSort)

'wrong expression' or 'the variable targeted not yet available etc.' Wouldn't I be getting the same errors when running this page on my old Wappler version?

: This is the output of this;

var envSort = dmx.parse("content.activeDesignData.data.environment_sort");
console.log(envSort)

What i am asking is to run this code in the browser console after the page is loaded, so we can see the output from there.

So it appears there's something wrong with the expression.
What are you targeting with content.activeDesignData.data.environment_sort?

<dmx-data-detail id="activeDesignData" dmx-bind:data="srvDesignerData.data.query"></dmx-data-detail>


So you're targeting a data detail component and not a server action?

In some part of the fault, yes

Aye, you made it! :popcorn:

1 Like

I just tested the data detail and it seems to properly return the record.
Are you sure you've selected data in the data detail component? The undefined will be returned when no record is set there, so the data is empty.

I'm absolutely sure the data is defined

I mean in this specific data detail component - activeDesignData? How and when do you select a record there?
You can see if the data is set by inspecting dmx.app.data in the console after the page is loaded:

Here is the log

I see the data is null, which means a record is not being set in this data detail component.
How do you set a record there?

via srvDesignerData.data.query

As you can see the environment_sort

I am not asking about the data source, but how do you set a specific record there?