8

Yep, your alternative to an inline expression is this for concatenating values: { "elmType": "div", "txtContent": { "operator": "+", "operands": [ "[$Duration]", " ", "[$DurationUnits]" ] } } or also { "elmType": "div", "txtContent": "=[$Duration] + ' ' + [$DurationUnits]" } Output (example): 8 hour(s)


5

Adding to what Lukas has mentioned . Long story short, just look at the snip below (Taken from the Microsoft official description) for complete view of what Formatting can do.


4

Improve the display of views in SharePoint lists with formatting. The view-formatting text describes the elements that are displayed and their display style. The data in the list doesn't change. In other words you can create new formatted view, that can look completely different then the out-of-the-box one. Official description: https://support.office.com/...


3

You can do it similar to that in Excel :) You can checkout the below sample to get an idea: "background-color": "= if([$OtherColumn] == 'Red', 'red', if([$OtherColumn] == 'Green', 'green', if([$OtherColumn] == 'Amber', 'amber', if([$OtherColumn] == 'Gray', 'gray', 'blue'))))"


3

You almost got it. Set src attribute directly. src is just URL to an image, so why to use description at all. If you look at the rendered HTML code using Developer dashboard (F12) you will find that the src of img tag contains url and description. Simply use: { "elmType": "img", "style": { "width": "100px" }, "attributes": { "src": "@...


3

For Modern UI: Yes, you can use json formatting to conditionally color fields in sharepoint online. The following example colors the current date field red when the value inside an item's ExpirationDate is before the current date/time. { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div",...


3

Using format view, you can format rendering of your library view. As in Previous version of SharePoint/Classic experience SharePoint developers are using Client side rendering(CSR) option to customize the List/Library view, you can achieve something similar to that using View Formatting(Format View) option. You can use view formatting to customize how ...


2

In Classic UI, we can add the following code into a script editor web part in list view to achieve it. <script type="text/javascript"> (function () { // Create object that have the context information about the field that we want to change it's output render var fieldContext = {}; fieldContext.Templates = {}; fieldContext....


2

When you add a image to Picture Library SharePoint creates a thumbnail for that image and show it in your default view of the list. In response for your question: Yes, the thumbnail URL differ from the URL of the full size image. And how does the thumbnail URL differ from the URL of the full size image. Example: Original URL http://yoursite.com/Images/...


2

You could use $ID. Sample demo: { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "a", "txtContent": "@currentField", "attributes": { "target": "_blank", "href": "= @currentWeb + '/ChildB/DispForm.aspx?ID=' + [$ID]" } }


2

You cannot use column formatting using JSON in SharePoint 2013. Column formatting using JSON is available for SharePoint Online, SharePoint Server 2019, and SharePoint Online Small Business only. Reference: Column Formatting. Alternative solution: You can use Client Side Rendering (CSR) to highlight rows based on choice columns: Reference: How to ...


2

The way I understood, you want to display text like 'expired', 'expiring','current' instead of date. Extending jerry's answer, you can use below { "elmType": "div", "style": { "background-color": "=if(@currentField >= @now - 25920000000 ,'green', (if(@currentField >= @now - 31104000000, '#ffa59b','red'))" }, "children" :[ { "elmType":...


2

We can use the JSON formatting below to achieve it. { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "style": { "background-color": "=if(indexOf(@currentField, '.0')!=-1, 'green', 'red')", "color":"white" }, "children": [ { "elmType": "span", "style": { ...


2

Column Formatting: If you have formatted your column using JSON formatting, it will support Sorting and Filtering. See below image, "Container Content" column is sorted in descending order and you can use Filter by option to filter the rows based on column value. View Formatting: SharePoint Online Modern Experience View formatting does not supports ...


2

No. In column formatting, you cannot access/use the column values from another list item/row. You can only access the column values from the same list item/row like [$AnotherColumnFromSameRow]. Where AnotherColumnFromSameRow is internal name another column from same list item/row.


2

This view formatting only works in the Tiles view. The format expects the Title field The format expects a text column with an internal name of Feedback The format expects a person column with an internal name of Assigned_x0020_To If you want to works in the List view, we can use the formatting below. { "schema": "https://developer.microsoft.com/json-...


2

Would this one help you? { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "children": [ { "elmType": "span", "txtContent": "@currentField", "style": { "padding-left": "8px", "white-space": "nowrap" } } ], "attributes": { "class": "sp-...


2

Solution: Create SPFx Field Customizer so you could get the view id by this.context.pageContext.legacyPageContext


2

Try using below JSON code: { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField", "style": { "background-color": "=if(@currentField == 'XYZ', 'blue', if(@currentField == 'ABC', 'red', 'white'))", } } Reference: Use column formatting to ...


2

Try this: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "debugMode": true, "txtContent": "@currentField", "style": { "color": "=if([$Ev_x002e__x0020_sluttid] <=[$_x00c4_rende_x0020_p_x00e5_b_x00], '#ff0000', '#32CD32')", "font-weight": "bold" } } References: CSS ...


2

You can use Column/JSON formatting to achieve this. Use below JSON code to change the color of the text: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "debugMode": true, "txtContent": "@currentField", "style": { "color": "=if(@currentField == 'Open', '#ff0000', '#00ff00')" }...


2

Try with this json: { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "a", "txtContent": "[$InternalNameOfYourNameColumn]", "attributes": { "target": "_blank", "href": "[$URL]" } } Btw, Name should be reserved name, so the internal name of your Name column is probably different ...


2

We can use the JSON formatting below to achieve it. { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "style": { "display": "table", "width": "100%" }, "children": [ { "elmType": "a", "txtContent": "[$Name]", "attributes": { "target": "...


2

If you want to use floor() then try below: { "elmType": "div", "txtContent": "=floor((Number('@now')-Number('[$Date]'))/86400000)" } Note: floor: returns the largest integer less than or equal to a given number. - Only available in SharePoint Online "txtContent":"=floor(45.5)" results in 45 Source: Use column formatting to customize ...


2

The first approach in your link could work, you only need to download SharePoint Designer from Microsoft to your computer to set that up. That is a legacy workflow. In Power Automate it is not possible to do this directly unless you also set up an Azure Function to handle setting item level permissions. I included the word directly because there might be ...


1

Modify the JSON formatting as below. { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "txtContent": "=if([$Review_x0020_Status] == '', @currentField, '• '+@currentField)", "style": { "color": "=if([$Review_x0020_Status] == 'Not Due', 'green', if([$Review_x0020_Status] ...


1

Use below formula: ="<DIV style='font-weight:bold; font-size:24px; color:"&IF([Review Status]="Approaching","Green",IF([Review Status]="OverDue","Red","Yellow"))&";'>•</DIV>" Note: Return this field as Number field. Microsoft blocked handling HTML markup in SharePoint calculated fields for recent versions, see here. If you are using ...


1

We found that the issues was caused by the browser. Used Edge and it worked fine.


1

You can use JSON to do the work. use the JSON code below { "elmType": "div", "txtContent": "@currentField", "style": { "background-color": "=if(@currentField >= @now - 25920000000 ,'green', (if(@currentField >= @now - 31104000000, '#ffa59b','red'))" } } Reference: http://thebaretta.blogspot.com/2018/08/sharepoint-online-conditional.html


1

Unfortunately, after looking into this further, you won't be able to properly work with mulit-value projected fields at this time. While the primary lookup value comes back as an array of objects with the lookupId and lookupValue properties, the projected fields come back as a single string with the semi-colon already inserted. This is super frustrating. If ...


Only top voted, non community-wiki answers of a minimum length are eligible