List Manager Forum

SQL-Statement WHERE

User tischerberlin3 2023-01-17 12:31:07

How can I manage that only data are displayed according to a SQL-WHERE-Clause ?
I have configured all details and coloms but only special-Data should be displayed like a WHERE statement...

Greetings from Berlin / Germany

Moonsoft support 2023-01-17 18:03:46

if you just need to display the filtered data (without data edition), you have the option to create a database view, using your default db manager, so you can introduce required conditions. Here some instructions about creating database views:

Then you can publish that view using List Manager, as with any other table, so you will be handling only the filtered data.

Hope this helps, regards

Moonsoft support 2023-01-18 10:32:24

I have needed in such option to and found that in this case in Display window a button Form layout disappeared and if I try Manage data - get this error: "Prepared statement needs to be re-prepared".

Edited by calmdevil - 18.01.2023 10:57

Moonsoft support 2023-01-18 12:16:58

that's right, a database view is, by definition, a non-editable set of data, so you won't be able to configure edition or directly manage data, either using ListManager or your default db manager. One of the reasons is that a view can contain not only filtered data from a single table, but a grouped set of records, a variable set of columns gathered from different joined tables...etc. So a view can only be published as a read-only table.

Thanks, regards

Moonsoft support 2023-01-18 14:44:21

Yes, its all clear, but in front module not displays any data.
Main table elements: id_internal, species, breed_ru, breed_en, photo
View table elements: id_internal, breed_ru, breed_en, photo (CREATE VIEW dog_breeds AS SELECT id_internal, breed_rus, breed_eng, photo FROM breeds WHERE specie=1;)

Edited by calmdevil - 18.01.2023 14:44

Moonsoft support 2023-01-18 16:00:39

have you already confirmed at your database that the view contains the records expected? That would discard any problem with the view itself or the condition set to query the required records.
If you can see the records at your view, then recheck your listmanager configuration, maybe you have set any specific filter to be applied on first load, or you have not set any column as visible for the front-end.
If still you're not able to find out what's missing please place a ticket at the helpdesk sharing an access and we'll take a look at your configuration.

Thanks, regards


Create dynamic calculators

Buy now!
List Manager

Build different lists for your site

Buy now!