Forums

Multiple Fields in Single Column?

vividal 06 Feb, 2018
I have a CC6 page that performs a Read Data (read_standings) with a Model Standings.
I have created a view Table called Record.
When I enter this in the Columns List
Standings.total_wins:WINS
Standings.total_losses:LOSSES
I get a table with two columns WINS and LOSSES and values of both 9 & 8 (as expected)

What I would like to do is have a single column that shows 9-8 and call the column header RECORD.
I have tried worked on the syntax to here
fn:{var:read_standings.0.Standings.total_wins}-{var:read_standings.0.Standings.total_losses}:RECORD
and what i get is 9-8:RECORD in the column header and nothing where I want the 9-8 enter.

Can someone help me sort out this syntax?
Max_admin 07 Feb, 2018
Answer
Hi vividal,

You would need this in the columns list:
whatever:RECORD
And in the columns views:
whatever:{view:custom}
And in the "custom" view which can be of type HTML:
{var:table_name.row.Standings.total_wins} - {var:table_name.row.Standings.total_loesses}
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
vividal 07 Feb, 2018
1 Likes
Thank you very much, that did the trick.
jvidalbac 17 Jan, 2019
I have the same issue than vividal.

I have followed the steps indicated by Max but I do not obtain the desired results.

If I write in "custom" the sentence in this way I do not get any results:

{var:read_equipos.row.Equipo.Codigo_Equipo} - {var:read_equipos.row.Equipo.Condiciones}



However if I try the following:

{var:read_equipos.1.Equipo.Codigo_Equipo} - {var:read_equipos.1.Equipo.Condiciones}

I get the correct result for row 1 but I need the correct data of each row.



Any idea how to solve.

Thanks in advance.
jvidalbac 17 Jan, 2019
Thanks for your quick help.

I have tried both, table_name and read_data , and not run.

I suppose that table_name is the name of the table in the database. It is right?

Thanks in advance
healyhatman 17 Jan, 2019
No it's the name of the table you're displaying it in.
jvidalbac 17 Jan, 2019
Ajjjj, Ok.

I will try this.

Thanks again.
Max_admin 17 Jan, 2019
1 Likes
Table_name is the "table view name"
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jvidalbac 17 Jan, 2019
Checked, it works perfectly.

Thank you very much Healyhatman and Max
This topic is locked and no more replies can be posted.