I think you are talking about something different. OR maybe I am.
@TomD correct me if I am wrong here.
Here’s another summary of what is needed here:
Consider this normal Wappler expression which will parse the dynamic value part and assign some value to varDynamic variable.
<dmx-value id="varDynamic" dmx-bind:value="sc1.query1.id == 4 ? 'yes' : 'no'">
Now, consider a table in DB which has a field dynamic_expression
and the value in there is sc1.query1.id == 4 ? 'yes' : 'no'
Using a SA, I can fetch this data via simple query.
Next, in the client side, once I get this data via SC, I would like to bind it in the following manner:
<dmx-value id="varDynamic" dmx-bind:value="sc2.query1.dynamic_expression">
Here, the output expected is that App Connect parses this binding to fetch the value sc1.query1.id == 4 ? 'yes' : 'no'
, and then does another parsing to evaluate and return yes
or no
.
So, when value of the variable is checked, it would say yes
or no
instead of the DB value.
The link shared in the original post, shows a client-side component which is capable of doing the second parsing.
Similarly, if I have complete HTML in there, say the dynamic_expression field has this value:
<dmx-value id="varDynamic" dmx-bind:value="sc2.query1.dynamic_expression">
Then, when I bind this on the page, it should get parsed into a regular variable on the page as any other variable.
Things however get complicated when this dynamic_expression also needs to have string containing binding expressions {{ }}
stored as well.
Some of it is possible to do via server side data & server side rendering in NodeJS, but the primary requirement here is from PHP perspective.