I have not seen an announcement for this?
A Compose column type:
I have not seen an announcement for this?
A Compose column type:
It was “quietly” announced in few existing topics @Piet_Strydom !
And yes, it’s a really neat add-on !
BOY! I wish I had known about this - glad I ran across this post!
I just found it and it is hugely helpful as a way of “summarizing” the columns in a table in a textual way for my people. Now they can see a description of the info in a table when they select the item in question. I use a Select List for that. They don’t have to e subjected to hundreds of row in a table that I don’t want them wandering around in. Another fabulous Coda enhancement! Thanks!
Boy, I can’t seem to win for LOSING with this text concatenation stuff - I was having a similar problem using Coda’s formulas - I had hoped the Compose column type would have saved me!
WHY am I getting ampersand characters in the resultant text? Do I need to convert the drop-down values to text or something?
All I’m trying to do with work with filenames and their full paths?..
(I neglected to add the folder path - but the resulting problem w/the ampersands are still clear)
If you just attach a .ToText() after the [Host System] and the [Drive Letter] references, you won’t get the @ symbol anymore. This happens because you are referencing a row, which is shown by the @ and the blue underlining.
Attaching .ToText() removes any references and gives you the raw value!
Hi @William_Bell !
Because it’s the “textual display” of row references …
I mean, in a table row references are displayed with a rounded pill … In the middle of a text, they’re written as
And these row references are there because that’s the type of data
Linked Relation fields return.
They can’t return anything else than either a row reference in the case a single-select or a list of row references in the case of a multi-select
As both fields
[Host System] and
[Drive Letter] are, I assume, relation fields and you probably used the
@ shortcut to insert their respective value in the template of your
Compose field, you get, as result, their
@rowReference textual display …
Which leads me to :
No … The values you’re looking for here are already there… You just need to access them .
As the desired text values for the row references both your fields
[Media Host] and
[Drive Letter] return already exist in their respective tables (more precisely, in the field you chose as
Display column in those tables), you just need to access (dereference) these text values in the template of your
And this can be done by using
= instead of
@ when inserting values into the template.
= will open the formula editor where you can then write a formula that would return the text value “behind” the row reference.
Said differently, you need a formula that would access (dereference) the text value stored in the field you chose as
Display column in the table where the row is currently sitting .
So, using as an example the field
[Host System] in your table
[Media File Location], instead of typing
@ and then selecting the field
[Host System] in the modal …
You can type
= and in the formula editor write a formula such as :
thisRow.[Host System].[Host Name]
thisRow.[Host System] is the value sitting in the field
[Host System] for
thisRow and in this case that value is a row stored in the table
. allows you to access (dereference) any related value to
thisRow.[Host System] also stored in the table
[Host Name] the related text value to
thisRow.[Host System] sitting in the
Display column of the table
thisRow.[Host System] +
[Host Name] returns the text value to use in the template of your
Compose field and not the row reference.
Same can be done for any other value you want to use in the template of your
Compose field .
And this how I got the
Path Name in the sample below…
Note that I know that
ToText() row reference is a popular shortcut but if I remember correctly, it has led to erroneous (or at least, unexpected) results in the past …
It is also completely useless knowing that the value stored in the
Display column of a row is always accessible .
I hope this helps .
You give such thorough explanations!!
The knowledge and insights shown so well, you need to apply to make it work are not self evident.
I get the feeling that the Compose logic requires the same skill set as Format() and Concatenate() do when you deal with a relation (previously named lookup).
well done @Pch !
Pch has been my superstar nearly from DAY ZERO of my posting on these forums - saving LIVES on these Coda formula streets - on a daily basis - PROPS!
Thanks, Pch - I knew in the back of my mind the Select objects were being returned as references and the few things I tried didn’t work, hence my post.
I also felt that by using ‘=’ formulas, I was defeating the purpose of the Compose column, thinking perhaps I should just go back to a Text column using formulas, but as you’ve shown above - that’s not really an issue!
I agree about your warning with the ToText() - that was the FIRST thing I had tried when seeing the issue with my results, but due to the syntax errors I received, I eventually gave up on using it…
Thanks so much, as always Pch!
Fascinating. Thanks. But does Compose really support formulas? This formula: If(thisRow.Type=“Email”,“This @Type is from @EmailFrom”, “Not Email”) uses the value in Type to print out that its an email (@Type) and who it’s from in the @EmailFrom column. It works without the If statement as straight Compose
That post went off before I could say that my If formula did not work, but a regular Compose did.
I am, as always, just trying to do the best I can with the time I have on hand !
I know the feeling (I had the same one ) …
But I still found it easier to use a templated compose field (with few values added through formulas) than having to write a whole
Concatenate() formula …
Hi @Doug_Loud !
Well, if I understand how a
Compose field works, your
If() is a formula you would apply at the column level to indicate what should be returned as result for each row in the table when the formula runs .
But that’s not needed in a
Compose field as the template you first write when setting up such field will already be applied to each row…
In other words, when writing a template within a
Compose field, you don’t really need to think in “value per row” terms like you would using any formula at the column level… It’s implied.
I mean, the whole point of the
Compose field vs. using a
Concatenate() formula in a text field is to simplify the process of returning templated text values for each row …
So all the values you can insert through the
@ shortcut in the template of a
Compose field are already the value in said field for
thisRow whereas, when using
Concatenate() at the column level, you might actively need to indicate (depending on the expected output and the use case), first hand, what should be returned for each row…
But if “you need more” than the
@value_in_this_field_for_thisRow (like dereferenced values from a
Linked relation field) in the template of
Compose field, you can still use a formula to get them in you template which will then be applied to each row in the table …
Compose doesn’t allow a formula for the whole field (because it’s not needed) but it allows formulas within the template to get the appropriate value (manipulated or not) if or when needed …
Does that make any sense ?
Loving this feature!!
I’m having trouble with this type of Compose below, any ideas? You can see the formatting is lost between the two Composes
Thank you pch for such a detailed answer, especially at 6:28 in the morning.
The Compose is working great at summarizing information in columns in the Document Inventory table as long as the documents are all the same Type, usually emails. But sometimes, the Type is a spreadsheet or a contract, and then including from and to blank entries is confusing. Thus, I was trying to get the Compose column to compose different text depending on the value in Type, using the If statement. The contents of the Compose column is displayed elsewhere for documents selected from a Select List, because we do not want users wandering loose in the Document Inventory.
This is a link to the dummy DocInventory table:
If you have any questions, please let me know…
Douglass N. Loud, Esq.
Integrated Information Systems, Inc.
305 East 40th Street, Suite 12E
New York, NY 10016
The ComposeComment and ComposeIfTest columns show my efforts.
Thanks for your incredible efforts to help all of us!
Any ideas on this? Thanks!
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.