newbie q: displaying results of a MySQL query

I’m just starting out with Servoy. How does one display the result of a query spanning more than two tables? E.g.,

select p.last_name, p.first_name, d.position, l.lab_name from people as p, postdocs as d, labs as l where p.id=d.id and p.group_id=l.lab_id;

This query returns the name of everyone in our department who is a postdoc, position, and laboratory affiliation.

I gather this is done by creating a series of forms and one or more portals, or possibly a tabpanel. But I wonder whether someone could please help me get started in how to think about handling MySQL queries using the methods and metaphors of Servoy (I have worked with FileMaker in the past, so I am somehwat familiar with the concepts of forms and portals). Thank you so much – it looks like Servoy has great potential for us, so I am looking forward to getting over this “mental hump.”[/code]

The most easy way to use data from 3 tables is to define 2 relations, and place portals/tabpanels/relatedfields to show information from those tables, see [u]demo[/u] halfway the demo building forms/relations is shown.

OK, thanks, I’m starting to get the idea. When I place portals (single-line) in a form, though, they are displayed with what looks like as empty gray row above where the data is displayed. What is this, and how do I get rid of it? I’d like to have lists where all of the fields display identically, whether they are portals or not.

As for SQL, what I’m gathering is that Servoy encourages the user to essentially “bypass” SQL queries in favor of Servoy-defined relations and portals (which then generate SQL code that the developer doesn’t see). If I did want to use my own SQL for a given situation, how would I define and run the above query in methods and assigning it to an obejct (e.g., a button)? What would some sample javascript code look like in this instance?

Thank you.

Well, that’s a lot of question in one.

For starters I recommend the docs and the CRM demo of Servoy. Once you find your way in there you will find it very informative on all your questions.

You can make your portals multiline. That way you get rid of the gray bar (= header).

Servoy also knows the concept of tab panels. Maybe it is best to search on that topic on the forum to get some examples. A lot of material is around to answer all your questions.

You can also use your own sql statements and yes, if you want to assign the result to an object that is also possible to a certain extend.

Have fun…