I'm trying to use a virtual column like longtext - html to make a table with three columns, however the values are not in the correct column, if anyone can help me
CONCATENATE(
"<table>",
"<tr>",
"<th>Valor</th>",
"<th>Valor Troca</th>",
"<th>Data Vencimento</th>",
"</tr>",
SUBSTITUTE(
LIST(
SELECT(
Cheques[valorCheque],
TRUE
),
SELECT(
Cheques[ValorTroca],
TRUE
),
SELECT(
Cheques[DataVencimento],
TRUE
)
),
",",
"</td></tr><tr><td>"
),
"</td></tr>",
"</table>"
)
Solved! Go to Solution.
I GOT
CONCATENATE(
"<table border='1'>",
"<tr>",
"<th>Valor Cheque</th>",
"<th>Valor Troca</th>",
"<th>Data Vencimento</th>",
"</tr>",
"<tbody>",
"<tr><td>",
IF(
ISNOTBLANK(INDEX(SELECT(Cheques[valorCheque], [id_ordem] = [_THISROW].[id_registro]), 1)),
text(INDEX(SELECT(Cheques[valorCheque], [id_ordem] = [_THISROW].[id_registro]), 1)),
"-"
), "</td><td>",
IF(
ISNOTBLANK(INDEX(SELECT(Cheques[valorTrocaVC], [id_ordem] = [_THISROW].[id_registro]), 1)),
text(INDEX(SELECT(Cheques[valorTrocaVC], [id_ordem] = [_THISROW].[id_registro]), 1)),
"-"
), "</td><td>",
IF(
ISNOTBLANK(INDEX(SELECT(Cheques[DataVencimento], [id_ordem] = [_THISROW].[id_registro]), 1)),
INDEX(SELECT(Cheques[DataVencimento], [id_ordem] = [_THISROW].[id_registro]), 1),
"-"
), "</td></tr>",
"-"
,
"</table>"
)
It sounds that you are getting three column values from the same table titled "Cheques" . So one another option you may want to try is instead of HTML table, please evaluate if you can have an inline table.
So
1. Please create a LIST type virtual column called say [Cheques Details]with element type as ref and ref table as "Cheques" and the VC's expression something like
Cheques[Key column of the Cheques Table]
2. You could then create a table type reference view on the "Cheques" table so that it will appear in the detail view wherever you are creating the column described in point 1. In this reference view you can select the columns you want to display.
3. The reference will appear as inline view as follows in the detail view as the example below shows.
4. Currently for HTML table in a long text column, you cannot apply any decent formatting. With linline table, you could make use of formatting rules as well. So the inline table will look more elegant.
I'm using the table inline , but i'm trying to create a table in html
I GOT
CONCATENATE(
"<table border='1'>",
"<tr>",
"<th>Valor Cheque</th>",
"<th>Valor Troca</th>",
"<th>Data Vencimento</th>",
"</tr>",
"<tbody>",
"<tr><td>",
IF(
ISNOTBLANK(INDEX(SELECT(Cheques[valorCheque], [id_ordem] = [_THISROW].[id_registro]), 1)),
text(INDEX(SELECT(Cheques[valorCheque], [id_ordem] = [_THISROW].[id_registro]), 1)),
"-"
), "</td><td>",
IF(
ISNOTBLANK(INDEX(SELECT(Cheques[valorTrocaVC], [id_ordem] = [_THISROW].[id_registro]), 1)),
text(INDEX(SELECT(Cheques[valorTrocaVC], [id_ordem] = [_THISROW].[id_registro]), 1)),
"-"
), "</td><td>",
IF(
ISNOTBLANK(INDEX(SELECT(Cheques[DataVencimento], [id_ordem] = [_THISROW].[id_registro]), 1)),
INDEX(SELECT(Cheques[DataVencimento], [id_ordem] = [_THISROW].[id_registro]), 1),
"-"
), "</td></tr>",
"-"
,
"</table>"
)
Great ! Excellent! 👍
Hi @DEVIMPLOY_Autom ,
It seems that you are basically showing just one row with an INDEX() function.
Your original query was for displaying multiple records in the table. Did you manage to display multiple records in an elegant manner?
I know we could always use INDEX() with INDEX(....., 1 ) , INDEX(.....,2) and so on.
I used INDEX() with INDEX(....., 1 ) , INDEX(.....,2) and so on, It was unique form that I found to do . This is util if you aren't using many row. I limited to 30 rows
Okay , thank you fir the update.
I was wondering if you could use a technique that simply puts a list created through SELECT() statements.
User | Count |
---|---|
36 | |
8 | |
3 | |
2 | |
2 |