Error in Calculation field calling a multi line text field in another App
Hi,
I am trying to create a Calculation field which calls a multi line text field in another App.
Here is the user's story:
* I have two Apps: "People" and "Discussion"
In People, I have a single line text field "People-Name" and a multi line field "People-Notes"
In Discussion, I have a relationship field "Discussion-People-Relationship" which calls field People.People-Name
In Discussion, I would like a calculation field which calls the value of People.People-Notes for the related People.People-Name
** I create calculation field in Discussion template
** I type in the field "@People" and selects "[ ] All of People Notes"
** It results in an error message: "The script returned an unsupported result type"
I believe the error comes from the fact that People-Notes is a multi line text field.
Does anybody know if it's possible to solve this issue, and if yes how?
Thanks in advance for your answer(s)
Camille
-
Hello Camille,
the multi line isn't the reason, but it's the wrong syntax of your code.
Add.join()
afterAll of Peope Notes
so that is looks likeAll of People Notes.join()
If there is more then one quote "joined" from the People-Notes-Fields in the calculation field you can define a delimiter in the brackets of the .join-term, like `.join("; ") - delimiter is a semicolon plus blank. The default value of .join() is a comma.
Hope it helps,
Rainer -
Hi Rainer
I am trying to display the whole contents of a multi-line text box in one cell of a markup table.
Even when I use the @all of [field].join() function any paragraphs in the multi-line text box don't appear correctly within the table. If I only use single line text boxes or number fields to generate the tables they work perfectly.Any suggestions? Here is the relationship I am trying to create.
App 1:
- Field A
- Field B
- Field C
- etcApp 2:
- Only linked to 1 x App 1 item
- Calc field:
- If any field in App 1 is not empty, display the heading of that field in Row A, and the content of that field in Row B.e.g. (skip any fields that are empty)
Heading A | Content from field A which is a multi line box
--- | ---
Heading B | Content from field B
Heading D | Content from field DThanks!!
-
Hi James,
it's not possible to show line breaks or paragraphs in a cell in a markdown table (single line fields don't have line breaks or paragraphs so they work). If you want the content of a multiline text field in a cell you have to remove line breaks and paragraphs first - in the calculation with a regex like:@all of field.join().replace(/<\/?[^>]+(>|$)/g, "").replace(/(?:\r\n|\r|\n)/g, "")
Your table I don't understand. Does Field A always have a value (cause you use it as column header which always will be underlined)?
Rainer
Please sign in to leave a comment.
Comments
4 comments