In reply to: Daniel Krüger (Cosmo Consult)
That's interesting if we use a "select null" statement this leaves one row with null data. But if we use an statement which doesn't return a row at all, no new row will be added. Maybe interesting is the wrong word. I didn't think about it. Select null returns one row but without any data which could be mapped to a item list column. While a where condition which is always false return no rows at all. Therefore no row will be created.
I'm wondering if you really need the technical item list. If you only use this for a word document, you could create a data table. This could use either an SQL statement or reuse an internal view data source.
Best regards,
Daniel
Hi Daniel and Ales,
Daniel, you are right, I could have used a Datatable as the buffer itemlist that I am currently using is for read-only purposes. I didn't think of that at the time.
About the API called you mentioned, I have a question. How should the body look like? At that endpoint, as far as I am aware, you can only send new rows, not modify or delete already existing one.
Also, I found the following endpoint in the Swagger:
POST /api/data/beta/db/{dbId}/elements/{id}/itemlists/{itemlistid}/init
I have tried it but it doesn't seem to do anything. Maybe I am using it wrong. I am sending an empty JSON as a body -> {}
About the where condition that return false, that seems the way to go. I haven't really got to test it, but it seems from your sayings that it is indeed working. I will try to use this method for future projects.
Ales, thank you for your insight. Good solve to this problem!
Best regards,
George