Hi,
Its strange but I am having difficulty inserting Dynamic data from a server connect, and I am having to insert [0] to make it appear.
For example:
‘’ {{sc_sysparam.data.sysparam[0].sysparam_id}}’’ with display the correctly, but not
‘’ {{sc_sysparam.data.sysparam.sysparam_id}}’’
The dynamic data picker inserts ‘{{sc_sysparam.data.sysparam.sysparam_id}}’
A standard (multi record) query returns an array hence the need to specify the index, [0] referencing the first element.
If your query only returns a single record use a single query if possible and the index reference will not be needed
Thanks very much for the explanation. It makes sense.
Just wondered why on that particular page of code it wasn’t entering the [0] and I had to do it manually.
But thanks for replying and clarifying.
If wappler was to add the index to a returned array how could it possibly know which element is wanted?
Not convinced this us a bug rather than an issue with technique, single queries were designed for exactly the purpose to get around this issue, before then queries had to be wrapped in a repeat to select individual records.