New answers tagged

0

In addition to @Harminder's correct suggestion, there is another way, if you only wish to show the closed or open message. Also, I believe that the question you are talking about should be the below: Conditional formatting based on date to expire If not, the answers show a way of solving your problem with column formatting using JSON syntax in order to ...


0

You can create scheduler flow/power automate that will run on daily basis which will check if the date column value is less than today' date and status is Open then change the status to Close https://docs.microsoft.com/en-us/power-automate/run-scheduled-tasks


0

If you just want to show the data in text column in list view, you can use below JSON code: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "[$PeoplePickerColumn.title]" } Make sure you are using correct ...


1

You can get the profile picture of user in JSON using: "elmType": "img", "attributes": { "src": "=@currentWeb + '/_layouts/15/userphoto.aspx?size=S&accountname=' + @currentField.email", "title": "@currentField.title" } ... You can use one of the below profile picture size in ...


1

Try using below JSON: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "a", "txtContent": "@currentField.desc", "style": { "font-size": "13pt" }, "attributes": { "href": &...


2

You will require button element to use action and actionParams. However, you can add children elements to button element to add icon & text (if required). Example: { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "button", "customRowAction": { ...


1

All Excel-style expressions begin with an equal (=) are only available in SharePoint Online (not in SharePoint 2019). In SharePoint 2019, you have to use the Abstract Syntax Tree (AST) expressions. So try using below JSON: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v1/column-formatting.schema.json", "elmType&...


1

Referring to your previous JSON given here, try using below JSON for your requirements: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "children": [ { "elmType": "span", "txtContent": "@...


0

Join() operator is only used in a context with multi-value field of type Person, Lookup, or Choice. multi-select person or choice field, it will not work for Managed metadata display value. Then I try to use replace operator, however only the first instance of the value will be replaced. Currently there is no OOB way to meet your requirements. More ...


1

Add below JSON on managed metadata column: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField" } Output: Or this: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/...


1

You have to add the column in list view in order to reference it in JSON formatting code. So there is no way to remove them from view & use it in JSON. My suggestion: Apply JSON formatting to all these utility columns which will just show the small icon (maybe information icon) in list view & on hover icon, you can show it's data in custom cards. ...


1

You can add color to hyperlink like below: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "style": { "margin-left": "=if([$IsChild] == 'Yes','40px','0px')", "width": "500px" }, "...


1

Use below JSON code: { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "txtContent": "=if(@currentField == '', '', '•')", "style": { "color": "=if(@currentField == 'Amber', '#FFBF00', @...


0

If you are using Number data type, you can remove thousand operator from column settings: Go to SharePoint list Click on column header/name Select Column settings Select Edit It will open column settings panel in modern experience like below. If you don't see the Use thousands separator on panel. click on More options. To remove thousands operator using ...


0

This is a known limitation of JSON formatting in SharePoint. You cannot format the column headers using JSON formatting in SharePoint online. Similar threads: SharePoint Online - formatting column headers SharePoint Modern Column Header cuts off I have created a SharePoint UserVoice for the exact same requirements before.


0

For now, SharePoint Online does not support JSON formatting on column header in view formatting. Here is the user voice post talking about this feature. You can vote on it to convey your thoughts and make MS develop team to consider about it.


0

Adding a second answer which uses the same concept as my other answer but includes renaming the files: The first thing you'll need to do is identify which documents need to be indented. In my previous answer I used the file name starts with "----". This time, I'm going to use a yes/no column "isChild". You could also use a choice column ...


1

Would this column formatting code work for you? If the file name starts with 4 dashes, it adds 25px padding-left and replaces the dashes with 4 spaces. You could add multiple conditions if required (such as 5 dashes = additional padding, etc). { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json"...


Top 50 recent answers are included