plomino / Plomino

Powerful and flexible web-based application builder
33 stars 37 forks source link

DbTraverse on a view column #814

Closed ermancio closed 7 years ago

ermancio commented 7 years ago

Hi all. I have 2 Plomino database (Cash 2016 and Cash 2017) with the same fields (more or less). I wolud like to show in the "2017 view" values from Cash 2016 db in a column in order to show differences (for example "total2016" from Cash 2016 db and total2017 from the current db Is it possible to show in a view column a value from another Plomino database?

Thanks

Luca

ebrehault commented 7 years ago

It can work if the external db data do not change, because Plomino only guarantee views are updated when local documents are changed but not when external docs are changed. The recommended approach is to create a Page form containing a computed for display datagrid (in that case we do not use any index, so it might be slower but it will be always up-to-date).

ermancio commented 7 years ago

Your advice is to create a Page form containing a computed for display datagrid. But in my scenario (Cash2016 and Cash2017), where should I have to create the Page Form? And which form is that associated to the datagrid?

ebrehault commented 7 years ago

You do not need an associated form here, as you will just use the datagrid in read mode. The idea is to use a datagrid to imitate a view, the difference being your datagrid field formula will produce the grid content at every display (and not just by calling an already generated index like view columns do)

ermancio commented 7 years ago

Ok. Thank you