If there is not a value in this field, i want the Module to show when the page loads.
I have tried numerous expressions but cannot get the module to load. I even cross-checked and tried to show the module if there IS a value in the field and still cannot get it to work correctly
If by ‘module’ you mean modal, then you are using a wrong dynamic attribute to show it.
You need to select the dynamic attribute to show the modal from under the modal category:
damn…missed that. Okay…now how can i only show this if there is no value / empty result? I got it to show if it has value, but i only want it to display if there is no data
This seems to happen because the server action has not yet loaded its data when the modal checks if the record exists - so initially the data is always not available.
You can just extend the condition to first check when the server action loaded and then show the modal if the record is empty:
okay, that did work, however i don't know that i understand the logic and why the other did not work. The server data was producing a result prior to the modal show request, so why wasn't that data available?
When your page loads the server action has not yet loaded the data so that the expression !serverconnect1.data.query[0].billing_phone returns true, as this data is not available yet.
When the data loads, the server action returns a status of 200, so that you need it in your expression which means -> when the server connect loaded its data AND the expression returns no data -> show the modal.