Data binding works in Modal but not on page WHY?

I’m trying to use a data binding with {{scShowAngebot.data.ShowProjektDetails.aspNachname}} from a data set. The value is displayed correctly in the modal, but not on the page.

Why, what am I doing wrong?

Many thanks for your help

Here is the value from the table.

Here in the modal it works.

But not here on this page

Hi.
Please share code used in modal and on page for the binding.
Most likely you have put in a string value instead of binding on page.

here is it on page

and here on Modal

just to avoid misunderstandings. I would like to define the variables to be added to the data set

Officially, bindings inside bindings, are not allowed.
We also discovered some time ago that using DMX-TEXT or DMX-HTML with a value that has binding, results in that binding getting resolved in runtime.

One thing I can suggest is to write the same expression as in DB, in another div below… just to check if the expression itself is correct in context of the div placement. It works on the modal, so it should be 99% ok, but just to be sure.

Yes, it works.

@patrick Any insight on why this even works on the modal?
I am out of ideas.

As you mentioned we officially do not support bindings inside bindings. Normally the DOM is only parsed once, and it doesn’t parse a second time. There are some exceptions like for SPA pages the dmx-view component. Not sure why it did work on the modal, could also be the repeater that was responsible for it.

Would adding a repeat to the row on the page with an expression of 1 (so it repeats once) be a hack?

I don’t know if the repeat is the reason why it was rendered, but you could try it.

So a workaround would be to try creating your own client side component, which would parse the bindings in your table field.
I can’t seem to find the post where Patick shared a sample code in recent past.

Another option could be to re-work your logic and parse the bindings on server side itself.

I’ll probably have to look for another solution.
After all, it has to be stable

thank you for your help and ideas.

1 Like