Print Row from a Table

Hello,
Is it possible to print a row from a table ?
Merci / Thanks !

1 Like

Hey @Didier! This sounds like a feature request the Coda team has been tracking. That said, we have moved this post into the Suggestion Box for other members of the Community to chime in on this. We’ve gone ahead and tracked your vote for this feature formally.

1 Like

Hello @Didier ,

The short answer, no, you can’t.

The work around:

  • Add a checkbox column to your table
  • Make a (sub) page and show (through filter(s)) only the row you want to print. You can use a table with a only the filtered lines, you can use a card layout, a detail display, etc. You can also free form your print page by using canvas formulas.
  • Whenever you want to print a row, mark the record(s) you want to print, go to the (sub)page (you can make button to go there) and print the (sub)page with the standard print&pdf functions (behind the 3 bullets top left when you hoover your mouse next to the doc title)
  • On your originating page make a button to undo all the check marks with one button push, so you don’t have to go back to your selected rows and undo them one by one.

It shouldn’t take more than a couple of minutes to set something up, although you might have to fine tune it a bit for your specific purpose.

Success,
Greetings, Joost

Hello @joost_mineur

ThankYou for the answer
First point: it’s too bad: The short answer, no, you can’t.
This should be possible!
You talk about a solution in Canvas, what could it be?
==> “You can also free form your print page by using canvas formulas.”
I thought of for example:
FOREACH(Table, … I don’t know how to continue…
If you can enlighten me…
Didier

Hello @Shaina_Torgerson
Thank you for the move
Didier

There are so many ways to get your data on the canvas, I usually work with a filter. If you are going to do a canvas layout, it is easiest to print one row at a time, although multiple rows are not impossible (but it becomes less flexible in a hurry). But say you want to print a customer report with his name on top (on the canvas) and then a list of customer properties in a table, that works well.

I don’t have time to make a sample doc, but if you share a (dummy) doc in this forum I will show you how you can do it (tonight),

Greetings,
Joost

1 Like

Thanks
I will do that rapidly
But Why does this not work :

ForEach(
[Pieces loft] ,
Piece+ Character(13) +
[Présentation] + LineBreak() +
M2 + “m2”
)

There are no CR made

And this one works:

“test”+LineBreak()+“fin”

Is that a wrong way to make a CR ?

Merci
Didier

For some reason the linebreak() works with regular text objects, but not with column references. I think it should work though.

@Coda_HQ: do you know why this doesn’t work?

Off top @Didier : best practice is to work with concatenate() to join fields, but that doesn’t solve this problem.

Work around:
image
where linebreak_test is a table with two fields (Name and amount).
The regexreplace() is a hack to get rid of the bullets - or at least I think it is a hack :slight_smile:

This workaround is as far as I know the easiest way to get a bunch of items in an straight vertical list on the canvas.

This is actually a nice way of printing a number of rows without having to know at design time how many rows you will output. A filter will complement this function:

linebreak_test.filter(checkbox),concat(.....
where checkbox is a checkbox column in the same table. But any other type of filter will work too.

1 Like

Merci @joost_mineur ,

I made progress in my tests!
I did this:

ForEach(
[Pieces loft],
Concatenate(
Upper(Piece) + “//”,
[Présentation] + “/”,
"Surface : " + M2 + “m2” + “/”,
"Style : " +
Styles.Filter(Style = ToText(Style))
.Style +
“/”,
"Mur : " +
Materiaux
.Filter(
Type = ToText(Murs)
)
.Type +
“/”,
"Sol : " +
Materiaux.Filter(Type = ToText(Sol))
.Type +
“/”,
[Détail] + “/”,
“/” + "Contient : " + “/”,
Contenu.BulletedList(),
“//”
)
)
.RegexReplace(
“/”, LineBreak()
)
.RegexReplace(
", ", “”
)
It works, it’s far-fetched.
But the result is not pretty!

Reminds me of 1970s programming!

Thanks for your Help
Merci
Didier

Reminds me of 1970s programming!
Well, in the 70’s the editor didn’t suggest quite that much, but yeah, that is the problem with workarounds. Coda is not about nice layouts (yet).

But finding workarounds often gives you a lot of insight in the program logic and sooner or later it’s convenient to know all these little things.

Regex replacing “,” is a bit tricky, because there will most likely be komma’s in the body copy that need to stay.

A detail display might give you a nicer view of the same data. A view of the table, properly filtered or grouped (or both) can also be a good help. There are options to not show title and column headers and you can combine canvas formulas and tables to a pretty decent page.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.