Play-SQL-Forms: How to display linked data?

Daniel Werner August 18, 2014

Hi Adrien

On http://www.play-sql.com/forms/you describe the possibility to display records from other tables in the record browser. How does that work? I can't find any documentation about that feature.

Daniel

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Adrien Ragot 2
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2014

Hi Daniel,

You need to go to your spreadsheet and define a column as a foreign key to another table:

  • Go to the properties of the column.
  • In the field "Formula", type "=" then select "Lookup a value from another table"
  • Select the target table, the ID and the value to display.
  • Next time you insert the "Record Browser" macro for this spreadsheet, it will automatically add a panel with a link to the other table.

Does that help?

Adrien

Daniel Werner August 19, 2014

Hi Adrien, thanks for the quick response.

Ok, this works. But I hoped, I could do something like this (display the dependent values as a table):

Example

Is this possible or could you implement that? This would be a killer feature, IMHO.

Daniel

Adrien Ragot 2
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2014
Some of it is possible. In the editor, copy the panel that Play SQL has generated. Then you can change the details: The column of origin, the table of destination... In fact you don't need the foreign key on the table, but it easier to let Play SQL generate it the first time you do it. .

If it's a 1-n relationship, the panel is repeated. I don't remember if I went as far as enabling tables. I don't think so. At least you can have one panel per linked record.
TAGS
AUG Leaders

Atlassian Community Events