Just wondering how to create a list with line breaks in a calculated column without using data view. Stack Exchange Network Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. PowerApps customizing SharePoint form - Multiple lines of text column showing HTML When customizing a custom list using PowerApps, my multiple line of text fields no longer behave as expected. In the forms they turn into single line of text and start displaying HTML in the output. I need to add calculated column (or something else) to my list which can discover and write, if is something in column of 'multiple lines of text' within the bounds of this list. I can do it with Calculated column for 'Single line of text', or date, etc. I've used formula: =IF(Column10,'OK'). Using Multiple lines of text column in Libraries. Until now, we have seen and discussed the use of 'Multiple lines of text' column type in SharePoint List. Now, let’s talk about 'Multiple lines of text' column type in SharePoint. The configuration of this column in SharePoint lists and Libraries are different. I'm stuck on a particular scenario right now because of a recent change by Microsoft in Office 365 regarding the 'Multiple lines of text' column in a Sharepoint list. My main goal is to truncate this column. If this column will have a lot of characters in it, it'll eat up the display page because it can have up to 60k characters.
- Sharepoint Calculated Column Multiple Lines Of Text
- Sharepoint Calculated Column With Multiple Lines Of Text In Single Cell
- Sharepoint Calculated Column Concatenate Text
I stumbled upon this by accident. Try to do this by adding a multiple line of text field to a calculated column in SharePoint and it will tell you that it cannot be done. But it can with the use of InfoPath and some trickery:
For this example I will call the field that will be the multiple line of text field “Holder”.
1. Create a single line of text field and name it what you will be naming your multiple line of text field.
2. Create you calculated column and add the field you just create to it.
3. Open the form in InfoPath.
4. Delete the Single Line of Text field you just create and the publish.
5. In InfoPath create a Multiple Line of Plain Text field and name it EXACTLY the same as your old Single Line of Text field and publish once more.
You are now done and whatever you put in your multiple line of text field will show up in your Calculated Column.
I recently set up a custom list, and needed to create a column for users to paste links to specific document library folders within their site. I quickly realised that the Hyperlink column wasn’t going to work, because it has a character limit of 255. And, these document library folder URLs were going to be longer than 255 characters.
This is the error message you get when a URL is longer than 255 characters
As we all know SharePoint creates long URLs for folders and files in document libraries. And, the deeper the folder structure, the longer the address. This particular team had set up their document libraries with quite deep folder structures, resulting in the long URLs. (This one good reason to not use folders in SharePoint document libraries.)
The other issue I had was that the input of the URL needed to be as simple as possible for the users. I couldn’t ask them to do anything more than go to the library, copy the address, and then paste it into the field on the custom list. Even that was a bit of a stretch for some 😉
The only type of column that will accept a URL (i.e. a string of text) with more than 255 characters is a Multiple Lines of Text column. But it wasn’t feasible to expect the users to create the hyperlink themselves by adding anchor text and hyperlinking it. Nor did I want the full URL to display on the list view, as it would be too long and unattractive looking.
So, I thought I might be able to find a way to use a Multiple Lines of Text column, and then use a Calculated column to display it as a neat, short hyperlink. The only problem I needed to solve was the one of Calculated columns not allowing Multiple Lines of Text columns to be used in their formulas.
Sharepoint Calculated Column Multiple Lines Of Text
After much thinking and experimenting and googling, I came up with a solution. It’s not the simplest, but it’s quite fun in its wackiness.
I can’t profess that this is all my own solution – it’s based on bits and pieces I found on the internet – particularly a post from Nothing But SharePoint: Taming the Elusive “Calculated Column” – Referencing Multiple Lines of Text Column.
The solution
In my custom list, I created a new column named ‘File Location’ and made it a Single Line of Text type.
I then created a Calculated column named ‘Location’. I added this formula:
=CONCATENATE('<a href=',[File Location],'>View</a>')
This tells the column to create a hyperlink, using the value of the File Location column, and wrap it around the word ‘View’ (thus providing the neater, short link). Thanks to my manager for working out the exact structure of this formula.
A detailed explanation of the different bits of the formula (for non-techies like me)
I also set the Calculated column to return the data type ‘number‘ (rather than the default ‘Single line of text’). This ensures the text will display as html.
I then deleted the original ‘File Location’ column.
Next, I created a new column, also named ‘File Location’ (It MUST be the same name as the original column) and made it a Multiple Lines of Text type, with plain text. This will only work if the column is plain text, not rich text.
In the meantime, the ‘Location’ Calculated column continued to refer to a column named ‘File Location’. I just tricked it into referring to a Multiple Lines of Text column, rather than a Single Line of Text column.
Sharepoint Calculated Column With Multiple Lines Of Text In Single Cell
Now, when a user pastes a long URL into the ‘File Location’ column, the ‘Location’ Calculated column converts it to a nice hyperlink to be displayed on the list view.
Sharepoint Calculated Column Concatenate Text
Note: It’s important to get this all set up correctly the first time. If you need to go in and make any changes to the Calculated column and then save it again, it will error – resulting in you needing to start the whole set up all over again.