Suite8 Display/Field update logic and Vardefs

Hi,

According to the Suite8 docs the backend displayTypeBackend and updateValueBackend can be in either Vardefs OR detailviewdefs.php. I have got the working in detailviewdefs.php but from a cleaner perspective (something that can go safely into Git etc), adding this to the fields ‘logic’ parameters would be much better.

Has anyone got this working because I cant get either of these going via a fields logic metadata rather than the tab/panel detailviewdefs.php file.

Regards

Mark

I also have it working from DetailViewDefs.

It doesn’t make much sense to me to define this is the vardefs. Aren’t these transformations specific to the Views?

What does it mean, to “update the value of a field with a back-end calculation”, unless it’s in the context of a view? When exactly would the back-end be called?

EDIT: also, I don’t see a problem with making the detailViewDefs changes upgrade-safe, and placing them in git source control. It’s as easy as doing it for the vardefs.

The difference between the two really, is that when working in a group of developers, when a developer is working on a project, they can add a single file that controls a field, that can potentially have the updateBackend logic in it, its a single file for that field that gets dropped into the relevant folder. DetailViewDefs.php is a single file shared for the entirity of a module, with multiple developers, that means a lot of potential merge conflicts needing resolving as the changes get checked back in, which is minimised when adding that logic to the individual field files.
Regards

Mark

1 Like