Content SC does not fetch data

via designerData.json

This, Teodor?

dmx-bind:data="srvDesignerData.data.query"

I think he meant this,

<dmx-serverconnect id="srvDesignerData" url="/api/designer/designerData" dmx-param:user_id="varUserId.value" sockets="true" dmx-on:success="run([{wait:{delay:100}},{condition:{if:`srvDesignerData.data.new_user`,then:{steps:{run:{action:`modalStart.show()`}}}}},{run:{action:`varActivePartCategory.setValue(srvDesignerData.data.queryActivePart.category_id)`}},{condition:{if:`toggleUpdateDesigner.checked`,then:{steps:[{runJS:{function:'updatePart',args:[`srvDesignerData.data.queryAllSelectedPartProperties`]}},{run:{action:`toggleUpdateDesigner.uncheck()`}}]}}},{condition:{if:`toggleRefreshDesigner.checked`,then:{steps:[{runJS:{function:'loadDesign',args:[`srvDesignerData.data.queryAllSelectedPartProperties`]}},{run:{action:`toggleRefreshDesigner.uncheck()`}}]}}},{condition:{if:`srvDesignerData.data.query.count()&gt;0`,then:{steps:{condition:{if:`(srvDesignerData.data.queryAllSelectedPartProperties.where(\`category_id\`, 10, \'==\').count()&gt;0 &amp;&amp; (srvDesignerData.data.queryAllSelectedPartProperties.where(\`category_id\`, 11, \'==\').count()&gt;0 &amp;&amp; (srvDesignerData.data.queryAllSelectedPartProperties.where(\`category_id\`, 12, \'==\').count()&gt;0 &amp;&amp; srvDesignerData.data.queryAllSelectedPartProperties.where(\`category_id\`, 18, \'==\').count()&gt;0)))`,then:{steps:[{run:{action:`toggleStringControl.check()`}},{runJS:{function:'stringsControl'}}]},else:{steps:[{run:{action:`toggleStringControl.uncheck()`}},{runJS:{function:'stringsControl'}}]}}}}}}])" dmx-param:view_design_id="varViewDesignId.value"></dmx-serverconnect>

This is in the layout page

Guys, i am not asking where does the data comes from.
Data detail component loads an info about a record. You set this record via dynamic event:

or via initially setting the value:

Screenshot 2024-07-19 at 11.09.48

I am asking HOW is the specific record set in this data detail component?

1 Like

I'm guessing he probably wants a screenshot too

1 Like

Your server action doesn't set anything on the front end.
The data detail component expects a specific id to be set and this happens on your page, not in the server action.
If you have not set any id to it, it does not select any record and then its data is empty.

Your activeDesignData DataDetail hasn't any key set...

Do you set it somewhere else? Is it relevent?

That is what i've been asking in the last few posts as well.
How and when is the data detail component value set?

1 Like

I do this with user id

I have to check

The value is set but without a key obviously cannot be connected with the value

Anyway, if this is related to the error, HOW this changed on 6.8.0 suddenly without you changing it?

I don't see where you are doing this. I don't see an action to set a value in the data detail nor i see a default value initially.

uid

May I know when that custom code is being called. I think the expression should work just fine but the data isn't there at the moment you call it. Many of the components update async and data is not directly available.

Also I would try to prevent using eval, when it is some environment variable on the window object you could use var envVar = window['env' + envSort] instead and is more safe to use since it can not execute code.

In the head section of the layout page

This is not the data detail component! You are loading a server action with this!

You need to set a value in the data detail component so that it shows the record:

Nothing has changed

You need to set a VALUE. The key there is which column is used to filter the records. This should be some kind of identifier:

The value field is where you set the value of the record which details you're getting.

1 Like

Still not working

The key should be the column that you filter your record on. In your case i think it is design_id. Do not select that from the serverconnect but from the data detail.