how to utilize if condition in Link for JSON column formatting in Sharepoint?

I am trying to remove all of “AAA” links from a link column called “LinkList” using JSON column formatting.

“AAA” is a link not txt. I am in trouble to hide all of this kind of cells in that column.

Tried some coding, but most of them hide all this column or just made some links unavailable. Please help me. Thanks!

{   "$  schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",   "elmType": "a",   "txtContent": "@currentField.desc",   "attributes": {     "href": "=if("LinkList"==[$  AAA], β€˜hide’ , '’)",     "Target": "_blank"   } } 

Column Formatting

I am trying to implement column formatting on a column that can have a value from (1-17)

Pseudocode =IF(value<=4,”Low”,
IF(value=5,”Low-Medium”, IF(value=6,”Low-Medium”,
IF(value=7,”Low-Medium”, IF(value=8,”Medium”, IF(value=9,”Medium”,
IF(value=10,”Medium”, IF(value=11,”Medium”, IF(value=12,”Medium-High”, IF(value=13,”Medium-High”,
IF(value=14,”Medium-High”, IF(value=15,”Medium-High”, IF(value=16,”Medium-High”, IF(value>=17,”High”))))))))))))))

Json

{     "$  schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",     "elmType": "div",     "attributes": {       "class": "=if(@currentField <= 4, 'sp-field-severity--blocked', '',if(@currentField == 5, 'sp-field-severity--warning', ''))"     },     "children": [       {         "elmType": "span",         "style": {           "display": "inline-block",           "padding": "0 4px"         },         "attributes": {           "iconName": "=if(@currentField <= 70, 'Error', '')"         }       },       {         "elmType": "span",         "txtContent": "=if(@currentField <= 4, 'Error', if(@currentField == 5, 'hello'))"       }     ]   }  

What am doing wrong? It just shows the json code in the display view

Retrieve data after formatting as well as change of format of the partation?

By mistake, I got my partition formatted. The partition’s file system format was changed from ext4 to NTFS.

I tried to retrieve the data using ‘testdisk’, it’s showing that the partition had been damaged.

Can’t open filesystem. Filesystem seems damaged.

Is there any way to retrieve the data?

SharePoint JSON tileProps breaks formatting

I am attempting to troubleshoot a formatting issue with JSON and actually found a Microsoft example that has the same problem for me. I developed a list using the same column names as the code below:

  "schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",   "tileProps": {     "height": "250",     "width": "350",     "hideSelection": true,     "formatter": {       "elmType": "div",       "style": {         "display": "flex",         "align-items": "stretch",         "margin-bottom": "16px",         "min-width": "150px",         "flex-grow": "1",         "justify-content": "space-around",         "padding": "5px"       },       "children": [         {           "elmType": "div",           "style": {             "width": "95%",             "height": "92%",             "box-shadow": "0px 1.6px 3.6px 0 #00000024, 0px 0.3px 0.9px 0 #00000024",             "overflow": "hidden",             "border-radius": "2px",             "padding-left": "16px",             "padding-top": "16px"           },           "attributes": {             "class": "ms-bgColor-neutralLighterAlt"           },           "children": [             {               "elmType": "div",               "style": {                 "text-align": "left"               },               "children": [                 {                   "elmType": "div",                   "style": {                     "color":"#333333",                     "font-size": "16px",                     "font-weight":"600",                     "margin-bottom":"5px"                 },                   "txtContent": "[$  Title]"                 },                 {                   "elmType": "div",                   "style": {                     "color":"#333333",                     "font-size": "14px",                     "line-height":"1.8"                 },                   "attributes": {                     "class": "sp-row-listPadding"                   },                   "txtContent": "[$  Feedback]"                 },                 {                   "elmType": "button",                   "customRowAction": {                     "action": "defaultClick"                   },                   "txtContent": "Give feedback",                   "attributes": {                     "class": "sp-row-button"                   },                   "style": {                     "display": {                       "operator": "?",                       "operands": [                         {                           "operator": "==",                           "operands": [                             "@me",                             "[$  Assigned_x0020_To.email]"                           ]                         },                         "",                         "none"                       ]                     }                   }                 }               ]             }           ]         }       ]     }   } } 

However I am not getting this nice flex box look: List items show horizontally

It simply breaks the JSON code and doesn’t work. Is there something I’m missing? I feel like it might be something glaringly obvious but after a day and a half of staring, I think I’m too close to the picture.

SharePoint Column JSON formatting alignment

As mentioned in the Title I have some issues with trying to align my background color formatting as shown in the screenshot below:

enter image description here

What I hope to do is to get the BACKGROUND COLOR to align WITHOUT causing the words to move upwards as shown in the 2nd screenshot below:

enter image description here

Below is the code that I am currently using:

 {   "elmType": "div",   "txtContent": "=if([$  FlowStatus] == 'Expired', 'Expired', @currentField",   "attributes": {},   "style": {     "display": "table-cell",     "text-align": "center",     "vertical-align": "middle",     "background-color": {       "operator": "?",       "operands": [         {           "operator": "==",           "operands": [             "@currentField",             "Approved"           ]         },         "#ABDB77",         {           "operator": "?",           "operands": [             {               "operator": "==",               "operands": [                 "[$  FlowStatus]",                 "Expired"               ]             },             "#FF6347",             {               "operator": "?",               "operands": [                 {                   "operator": "==",                   "operands": [                     "@currentField",                     "Pending"                   ]                 },                 "#FFD700",                 {                   "operator": "?",                   "operands": [                     {                       "operator": "==",                       "operands": [                         "@currentField",                         "Rejected"                       ]                     },                     "#bcbcbc",                     ""                   ]                 }               ]             }           ]         }       ]     }   },   "customRowAction": {},   "children": [] } 

Thank you in advance for any help!

Suggestions are welcomed too.

SharePoint Column Formatting: Referencing External Columns in Mail To Body

Hello Stack Exchange Community,

I have a question regarding referencing external columns. In my code below, external columns are referenced using square brackets as specified in Microsoft’s online documentation.

{   "$  schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",   "elmType": "a",   "txtContent": "@currentField",   "attributes": {     "href": {       "operator": "+",       "operands": [         "mailto:",         "[$  Email]",         "?subject=Task status&body=Follow Up: Agreements.\r\n---\r\n",         "Dear [$  ContactName]",         "\r\nJust writing to follow up on that agreement that has been sent on [$  StartDate]. Let me know if you have any questions."       ]     }   } } 

However, after doing so fields such as $ ContactName and $ StarDate do not appear to be properly displaying their associated values. Instead, what appears on my email body is the literal code used to reference the columns (e.g Just writing to follow up on that agreement that has been sent on [$ StartDate]).

If anyone knows of the proper way to reference values in external columns within the email body using JSON column formatting please do let me know !

Much appreciated !

How can JSON column formatting be used to highlight duplicate entries in a list?

Column formatting is used in SharePoint Online to customize how fields in lists are displayed. Microsoft provide documentation regarding the use of JSON for column formatting.

As is described in the documentation, this works well for basic things such as adding a class depending on the name of the current field. For example:

  "attributes": {     "class": "=if(@currentField == 'Done', 'sp-field-severity--good', if(@currentField == 'In progress', 'sp-field-severity--low', if(@currentField == 'In review', 'sp-field-severity--warning', if(@currentField == 'Has issues', 'sp-field-severity--severeWarning', 'sp-field-severity--blocked')))) + ' ms-fontColor-neutralSecondary'"   }, 

The end result being:

Column formatting on the status of a column

However, is there a way to check values in the current column and apply a class or color to duplicate entries in that column?

For example, if there is a Person column entitled Participants. One list entry has the value, Smith, John. If another entry gets created and Smith, John is added again, both of these values would be highlighted or have a class applied.

Files missing on new 5TB hard drive after formatting as ext4 with parted and mkfs

After connecting a new external 5TB hard drive and formatting it as ext4 with parted and mkfs with the procedure below, I then mounted the drive, copied files onto it, unmounted the drive and restarted its host computer (running Ubuntu 18.04.3 LTS). Upon mounting the drive again, the files were no longer on the drive. What am I doing wrong?

  1. Got drive information using lshw:

sudo lshw -C disk

*-disk description: ATA Disk product: ST2000LM015-2E81 vendor: Seagate physical id: 0.0.0 bus info: scsi@2:0.0.0 logical name: /dev/sda version: SDM1 serial: ZDZ5H230 size: 1863GiB (2TB) capabilities: gpt-1.00 partitioned partitioned:gpt configuration: ansiversion=5 guid=2f8a9ef2-85cf-49fe-8cf6-04d7caae1a08 logicalsectorsize=512 sectorsize=4096 *-disk description: SCSI Disk product: Portable vendor: Seagate physical id: 0.0.0 bus info: scsi@3:0.0.0 logical name: /dev/sdb version: 9300 serial: NAA5C9V7 size: 4657GiB (5TB) capabilities: gpt-1.00 partitioned partitioned:gpt configuration: ansiversion=6 guid=bea19262-56ed-43c1-a4cd-62bca45eeb62 logicalsectorsize=512 sectorsize=4096

  1. Implemented ext4 file system using parted:

sudo parted /dev/sdb

GNU Parted 3.2 Using /dev/sdb Welcome to GNU Parted! Type ‘help’ to view a list of commands. (parted) mklabel gpt Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No? Yes (parted) unit TB (parted) mkpart Partition name? []? 5tb File system type? [ext2]? ext4 Start? 0 End? 5 (parted) print Model: Seagate Portable (scsi) Disk /dev/sdb: 5.00TB Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags:

Number Start End Size File system Name Flags 1 0.00TB 5.00TB 5.00TB ext4 5tb

(parted) quit Information: You may need to update /etc/fstab.

  1. Make or Build a Linux File System (use mkfs)

sudo mkfs -t ext4 /dev/sdb1

mke2fs 1.44.1 (24-Mar-2018) /dev/sdb1 alignment is offset by 512 bytes. This may result in very poor performance, (re)-partitioning suggested. Creating filesystem with 1220933433 4k blocks and 152616960 inodes Filesystem UUID: e29ea500-1588-4128-9e12-b2f62891b318 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: done Writing inode tables: done Creating journal (262144 blocks): done Writing superblocks and filesystem accounting information: done

  1. Manually mounted/unmount the Hard Drive using mount:

Create a mount point:

sudo mkdir /media/5tb

Manually mount the drive (not automatic at boot)

sudo mount /dev/sdb1 /media/5tb

Unmount the drive

sudo umount /media/5tb

Modern view – List – Formatting the Like “button”

I am trying to do something that I thought was simple but I am getting lots of difficulty finding my way… I spent more than a week looking for that info now πŸ™

I want to customize two columns in the Json Formatting space:

  • Column 1: A customized “Like/Unlike” button:

     button text: "Register" instead of Like  Action triggered when clicking on the like button => Like=True  If true then button text = "Unregister" 
  • Column 2: An organized view of “LikedBy” emails.

Would be fantastic to get some help here… would really appreciate Many Thanks++ Bastien