Formatting of text in Calculation fields
We are having some odd behavior in text fields and calculations, and I'm wondering if anyone can help. We use Podio for marketing for our events, so the person responsible for the event puts the event information, including a description, into an entry. A lot of the time, they have written their description somewhere else, like in Word, and paste it in to the Podio text field. In order to get the event information in the format that the graphic designers need it, I use calculation fields to format the inputted text in a certain way (i.e. some of it is bolded, the dates need reformatting, etc.). This generally works fine with the exception of the description fields sometimes behaving strangely. You can see in the attachments that the reformatting actually works fine in the calculation field, but then I need to copy from the calculation field and paste into Word to send it to the graphic designer, and then it somehow has maintained some level of the formatting that I don't want. The way the text looks in the calculation field is great, so I'd love to be able to copy and paste it just as it is. Here is the calculation I am using:
(@All of Print Calendar Description != "" ? '' + @All of Print Calendar Description.toString() : '') + ' '
Is there anything else I can do to strip all formatting?
that's hard to figure out (and maybe more a problem on the Word-side).From which field do you get the headline? How is that field formatted? Can you please share a screenshot of the complete calculation? As a first step you can try:
@All of Print Calendar Description != "" ? @All of Print Calendar Description.toString() + " \n\n" : ''
Thanks Ranier for your help. Your question about the calculations is a bit complicated, because I am actually doing two different calculations to get to that output...the first, for each event entry, is encompassed in the following three calculations, plus a date calculation which is really long.
Then, those events are referenced in multiple sets in another app, and uses the following calculation:
I never thought it might be a Word-side problem...it does seem to work if I "paste and match formatting" in Word, but I'm trying to make this fail-proof for users so if there's any way to fix it on the Podio side, then great. I tried your suggested calculation but it didn't seem to make a difference.
Thanks for any help you can provide!
I'm pretty sure that there are some hidden html tags which have another effect in WORD than in the calculation field.
For detecting them you can do a browser inspect in the calculation field: Select a part of your calculation field (like you want to copy it), mouse right click, and then look at the end of the popup window for something like "Inspect", click it, a new window opnes. Maybe you have to click in that window onto the litte arrow which is highlighted to show the full text. There you can find some information which html tags there are. Can become complicated to elimate or to change them.
If you like, you can invite me to your workspace so I can have a look at it.
But maybe this helps: Change the line show.sort()... to
This is very helpful! In the one instance that I know it is happening, upon inspection it is wrapped in h2 tags, and when tracing that back, apparently it is set that way in the input field. So I don't know if the user did that or the nature of the text that was pasted made Podio autoselect Header 2, but either way changing it in that field to paragraph fixes the problem. While we may see issues with entries in the future again, at least thanks to your help I have a much better understanding about what is going on.
Please sign in to leave a comment.