Hi all,
how to use start: expression for both rows and columns in appsheet , for example to calculate items sold per month in columns and items in rows, the columns should be added only if items sold exist in that month.
cheers
You are probably wondering about how to use virtual columns?
Here is the documentation you are looking for:
Use virtual columns - AppSheet Help
Hi not really ๐
What i am asking is about <<start:[whatever_row]>> <<end>>
and <<start:[whatever_column]>> <<end>>
how can you combine both to put in a pdf , so that the column is dynamically created like the row in pdf.
As an example:
SUM <<start:[items]>> <<end>> (row)
months where items were sold:
<<start:[month]>> <<end>> (column)
btw I asked chatGPT and (it) said that itโs possible ๐
cheers
Forget about ChatGPT, too much noise about that at the moment hahaha
Here is the documentation for help:
Use Start expressions in templates - AppSheet Help
Use If expressions in templates - AppSheet Help
About this part:
@ea_9000 wrote:
so that the column is dynamically created
this is not possible.
Hmmm
Probably your did not understood my question, any way , i donโt need the documentation as I already build many apps to generate pdfโs with start expression.
cheers
You can only generate rows with start expressions...can't generate columns.
@ea_9000 wrote:
Probably your did not understood my question,
This is your question:
@ea_9000 wrote:
What i am asking is about <<start:[whatever_row]>> <<end>>
and <<start:[whatever_column]>> <<end>>
how can you combine both to put in a pdf , so that the column is dynamically created like the row in pdf.
As an example:
SUM <<start:[items]>> <<end>> (row)
months where items were sold:
<<start:[month]>> <<end>> (column)
This is my answer:
@Aurelien wrote:
About this part:
@ea_9000 wrote:
so that the column is dynamically created
this is not possible.
This is @scott192 's answer:
@scott192 wrote:
You can only generate rows with start expressions...can't generate columns
Two of us did not understand your question in this case.
BTW, thank you @scott192 for confirming my answer and understanding.
About this:
@ea_9000 wrote:
i donโt need the documentation as I already build many apps to generate pdfโs with start expression.
Good for you, hence you know this is not possible.
However:
A workaround would be to create as many tables with as different numbers of columns, as you wish, and wrap these in IF expressions. I'm just afraid that would come tedious. Hence, my answer, which is kind of a shortcut, is: not possible.
If you still think we don't get your question, please feel free to explain further so that we can help you, or tick one answer as a solution to your question.
Cheers
@scott192 wrote:
can't generate columns.
I wouldn't be so hard on this considering that HTML and XML are options for templates.
I can generate PDFs and Worksheets with as much info as I want.
Just saying FWIW
Then I'm about to learn something today!!!! ๐ค
How would you do that? Can you share a snipet?
This is a basic HTML to show the way it should be implemented:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
background-color: white;
color: black;
}
table {
border-collapse: collapse;
}
table tr th,
table tr td {
border: solid red 2px;
padding: 5px;
}
</style>
</head>
<body>
<table>
<thead>
<tr>
<th>Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Value</td>
</tr>
</tbody>
</table>
</body>
</html>
Result:
If you want to change the amount of columns:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
background-color: white;
color: black;
}
table {
border-collapse: collapse;
}
table tr th,
table tr td {
border: solid red 2px;
padding: 5px;
}
p.startifend {
display: none;
}
</style>
</head>
<body>
<table>
<thead>
<tr>
<p class="startifend"><<Start:SomeExpressionOrRefListColumn>></p>
<th>Header</th>
<p class="startifend"><<End>></p>
</tr>
</thead>
<tbody>
<tr>
<p class="startifend"><<Start:SomeExpressionOrRefListColumn>></p> <!-- This should be identical to the first one -->
<td>Value</td>
<p class="startifend"><<End>></p>
</tr>
</tbody>
</table>
</body>
</html>
If you just want to change the amount of rows:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
background-color: white;
color: black;
}
table {
border-collapse: collapse;
}
table tr th,
table tr td {
border: solid red 2px;
padding: 5px;
}
p.startifend {
display: none;
}
</style>
</head>
<body>
<table>
<thead>
<tr>
<th>Header</th>
</tr>
</thead>
<tbody>
<p class="startifend"><<Start:SomeExpressionOrRefListColumn>></p>
<tr>
<td>Value</td>
</tr>
<p class="startifend"><<End>></p>
</tbody>
</table>
</body>
</html>
If you want both:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
background-color: white;
color: black;
}
table {
border-collapse: collapse;
}
table tr th,
table tr td {
border: solid red 2px;
padding: 5px;
}
p.startifend {
display: none;
}
</style>
</head>
<body>
<table>
<thead>
<tr>
<p class="startifend"><<Start:SomeExpressionOrRefListColumn>></p>
<th>Header</th>
<p class="startifend"><<End>></p>
</tr>
</thead>
<tbody>
<p class="startifend"><<Start:SomeExpressionOrRefListColumn>></p> <!-- This is for the rows -->
<tr>
<p class="startifend"><<Start:SomeExpressionOrRefListColumn>></p> <!-- This should be identical to the first one -->
<td>Value</td>
<p class="startifend"><<End>></p>
</tr>
<p class="startifend"><<End>></p>
</tbody>
</table>
</body>
</html>
It's important to understand exactly what you want to achive. Multiple columns could be very cumbersome. Also you should think about the styling when there will be an undefined number of columns. If the number is whitin a known range, you could also use expressions inside the style tag
User | Count |
---|---|
41 | |
25 | |
25 | |
17 | |
11 |