Listview that combines several modules

This is a bit tricky, I’m trying to pull data from several modules (via mysql joins) and then display it in a listview

I was able to make the query by overriding the listViewProcess() process in view.list.php, but now I need to actually display these fields… I know in listViewPrepare() we can indicate which columns should be displayed, but it looks like these fields need to be inside vardefs

Maybe my whole approach is wrong though and there’s another way of doing this, it feels like listViewProcess() is used for filtering only and cannot be used to decide what fields are to be displayed

looks like my current approach doesn’t make any sense (that’s what happens when stop working with suitecrm for too long)

I found some related articles and will probably end up making a tutorial once it’s 100% clear

if anyone stumbled upon this thread in Google then easiest solution would probably be to just create a relationship between the modules and then create a “relate field” (in vardefs) and adding it to the listview (views metadata file)

i overcomplicated it for no reason in my original post