This awesome Paul! Thank you! I have a situation similar to combining multiple tables into one.
However, my syntax/formula isn’t quite right (each row in the formula table is a list of rows from each individual table I’m combining). Can you show the formula you used for the calendar example?
I’m going to record a video on this pack now and release it tomorrow; I’ll go in greater detail how to go about it all. The next thing you can and should do is mix in references to actual rows from either table so that you can display them in the detail layout for the formula table.
Works great now. Thanks Paul. Can’t wait to see the video.
After playing around some, I was able to pull in the “buttons” from the individual tables (at the least the action) and create a main button column in the formula table that referenced the Action of each row. When clicked on in the formula table, I was able to update the individual tables (wish I could upload the video).
Basically, each button in the formula table can be customized instead of all one formula. I can see a way to create and manage a master button table. Pretty cool.
There are Coda Prodigies, Coda Ninjas, Coda Alchemists, Coda Gods, and there’s @Paul_Danyliuk…
I can see so many use cases for this! Thanks again for sharing your genius!
But also the ability to create calculated summary tables like a Pivot with the actual summary fields being the values of the cells (I was using buttons to identify unique values of a field in source table with automations to AddorModify entries in a summary table that would then calculate the aggregates/summary fields). E.g.:
If this is your source table:
Now you can with a formula create tables that tell you:
Who likes each fruit(s)?
How many people like each fruit?
Do we have double entries (2 rows with same person liking same fruit)?
You can use Group by, but you wouldn’t have the answers in a table that then you can then use (you could still get everything through formulas, but sometimes you want the summary table)
And also the opposite — expanding tables that have multi-relations (like, [Monica, Phoebe] → Oranges) into separate rows so that we can group on them, make charts etc. A very common need too!
Transforming tables from “canonical form” to and from “transposed form” through a simple formula is indeed a VERY convenient feature to have, especially when you want to display data on a graphic (canonical is generally better) or on an easy to read table (transposed is generally better).
M stands for Matrix but only because I named it so. It does not have any special meaning in Coda and therefore it doesn’t matter how you name it; it’s just a variable that you reuse on the next line of the code.
This whole snippet only exists to make setup a little bit easier — you just append that bit to the end of your List(...) formula. You could totally not use the WithName and instead wrap your
List(...)
like
Object(
"data",
List(...).Splice(0, 0, "")
)
or even ditch the inobvious Splice and write it explicitly like
Object(
"data",
List(
"", // because it only matters that there is at least
List(...), // one non-list element in the outer list,
List(...), // otherwise Coda ListCombine()s those for some reason
...
)
)
but it’s much easier to just add one predefined snippet to a formula rather than explain what to write before and what to write after
BTW, take this hint for writing formulas in general — I love to chain WithName blocks onto the existing transformation chain to make it obvious that it’s the next transformation block. With simply wrapping formulas in formulas, it does not look that obvious.
My pack doesn’t do any conversions — you have to supply an already formatted text value to it. So you’ll need another pack to convert HTML into formatted text, e.g. this one.
In your case though, if you just want a bolded output, you can use a hidden _Bold() formula onto the value, e.g. _Bold("This is a test with bold"), and pass that to the formula table. Or if you’re not a fan of hidden formulas, alternatively use the Format()-with-templates method like in this tip: just make yourself a template of a bold {1}. Both these methods would save you the trouble of using a separate pack and the processing delays caused by another round trip to coda servers.
Lastly, if you only need it to be bold for display, you can use conditional formatting. Just reminding you that you can use a formula like thisRow = @AtReferenceToASpecificRow to select an exact row to apply cond formatting to.
If this is enough to help I would appreciate it. If not see my private message asking for more direct help. I know this is really close to working but I am not sure if I am not parsing the data correctly or if there is some artifact in the way the data is coming out of the pack.
You can work with that actually. I’m not sure why you aren’t just getting your sync table already formatted out of that XML data (i.e. why you even need my pack), but let’s assume you have good reasons to use it.
What you’re doing wrong is wrapping what’s already lists of PMID, Title, DOI etc into yet another lists. That’s why you’re getting lists within cells.
If you want to render a table where the first row reads PMID and then each row in that column is one individual PMD, then the same for Title, Abstract etc (so that it’s not a transposed table but a regular table), the formula should be:
i.e. you’re making lists where the first element is the column title, and then you append the list of values from each respective column of your PM table. Then render those as columns.
FYI took a look at your doc; since it’s your pack, you should rather just implement a Sync Table out of your data. That way you’d import the data as a table directly and won’t need my pack to render it.
The sync table is an interesting suggestion @Paul_Danyliuk
I have used that in a different part of my project
The biggest challenge is that the table I shared has regularly changing query parameters which are part of the main front end UI of the Coda page
If I set this up as a sync table am I correct that the only way to change query parameters is in the side panel of the sync table? Is there any way for the sync table query parameter to be a main part of the Coda page?