JSON nested if's limit?

%3CLINGO-SUB%20id%3D%22lingo-sub-1754484%22%20slang%3D%22en-US%22%3EJSON%20nested%20if's%20limit%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1754484%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20got%20a%20problem%20with%20my%20column%20formatting%20JSON.%20Some%20rows%20it's%20not%20applying%20any%20formatting%20to%2C%20and%20thus%20are%20blank%2C%20even%20though%20there%20is%20data%20in%20them.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20assuming%20that%20there%20is%20either%20an%20item%20limit%20(too%20many%20items%20in%20list%2C%20then%20the%20formatting%20doesn't%20format%20everything%2C%20or%20too%20many%20nested%20if's.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EList%20view%20currently%20has%20215%20items%20in%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20my%20JSON%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%20%22%24schema%22%3A%20%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fv2%2Fcolumn-formatting.schema.json%22%2C%0A%20%20%22elmType%22%3A%20%22div%22%2C%0A%20%20%22attributes%22%3A%20%7B%0A%20%20%20%20%22class%22%3A%20%22%3D%20if(%5B%24Shipper%5D%3D%3D'Seago'%2Cif(%5B%24GIN_x0020_Date%5D%3D%3D''%2C''%2Cif(%5B%24Tracking_x0020_ETA%5D%3D%3D''%2C''%2Cif(%5B%24GIN_x0020_Date%5D%26gt%3B%5B%24Tracking_x0020_ETA%5D%2B864000000%2C'sp-field-severity--blocked'%2Cif(%5B%24GIN_x0020_Date%5D%26gt%3B%5B%24Tracking_x0020_ETA%5D%2B777600000%2C'sp-field-severity--warning'%2Cif(%5B%24GIN_x0020_Date%5D%26lt%3B%5B%24Tracking_x0020_ETA%5D%2B86400000%2C'sp-field-severity--blocked'%2Cif(%5B%24GIN_x0020_Date%5D%26lt%3B%5B%24Tracking_x0020_ETA%5D%2B129600000%2C'sp-field-severity--warning'%2C'sp-field-severity--good'))))))%2Cif(%5B%24GIN_x0020_Date%5D%3D%3D''%2C''%2Cif(%5B%24Tracking_x0020_ETA%5D%3D%3D''%2C''%2Cif(%5B%24GIN_x0020_Date%5D%26gt%3B%5B%24Tracking_x0020_ETA%5D%2B604800000%2C'sp-field-severity--blocked'%2Cif(%5B%24GIN_x0020_Date%5D%26gt%3B%5B%24Tracking_x0020_ETA%5D%2B518400000%2C'sp-field-severity--warning'%2Cif(%5B%24GIN_x0020_Date%5D%26lt%3B%5B%24Tracking_x0020_ETA%5D%2B86400000%2C'sp-field-severity--blocked'%2Cif(%5B%24GIN_x0020_Date%5D%26lt%3B%5B%24Tracking_x0020_ETA%5D%2B129600000%2C'sp-field-severity--warning'%2C'sp-field-severity--good'))))))%22%0A%20%20%7D%2C%0A%20%20%22children%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22elmType%22%3A%20%22span%22%2C%0A%20%20%20%20%20%20%22style%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22display%22%3A%20%22inline-block%22%2C%0A%20%20%20%20%20%20%20%20%22padding%22%3A%20%220%204px%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22attributes%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22iconName%22%3A%20%22%3D%20if(%5B%24Shipper%5D%3D%3D'Seago'%2Cif(%5B%24GIN_x0020_Date%5D%3D%3D''%2C''%2Cif(%5B%24Tracking_x0020_ETA%5D%3D%3D''%2C''%2Cif(%5B%24GIN_x0020_Date%5D%26gt%3B%5B%24Tracking_x0020_ETA%5D%2B864000000%2C'StatusErrorFull'%2Cif(%5B%24GIN_x0020_Date%5D%26gt%3B%5B%24Tracking_x0020_ETA%5D%2B777600000%2C'WarningSolid'%2Cif(%5B%24GIN_x0020_Date%5D%26lt%3B%5B%24Tracking_x0020_ETA%5D%2B86400000%2C'ErrorBadge'%2Cif(%5B%24GIN_x0020_Date%5D%26lt%3B%5B%24Tracking_x0020_ETA%5D%2B129600000%2C'Warning'%2C'Ferry'))))))%2Cif(%5B%24GIN_x0020_Date%5D%3D%3D''%2C''%2Cif(%5B%24Tracking_x0020_ETA%5D%3D%3D''%2C''%2Cif(%5B%24GIN_x0020_Date%5D%26gt%3B%5B%24Tracking_x0020_ETA%5D%2B604800000%2C'StatusErrorFull'%2Cif(%5B%24GIN_x0020_Date%5D%26gt%3B%5B%24Tracking_x0020_ETA%5D%2B518400000%2C'WarningSolid'%2Cif(%5B%24GIN_x0020_Date%5D%26lt%3B%5B%24Tracking_x0020_ETA%5D%2B86400000%2C'ErrorBadge'%2Cif(%5B%24GIN_x0020_Date%5D%26lt%3B%5B%24Tracking_x0020_ETA%5D%2B129600000%2C'Warning'%2C'Ferry'))))))%22%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22elmType%22%3A%20%22span%22%2C%0A%20%20%20%20%20%20%22txtContent%22%3A%20%22%40currentField%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20a%20pic%20of%20the%20list%20showing%20the%20'blank'%20fields%20-%20that%20do%20actually%20have%20values%20in%20them!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SPerr.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F224857iE521004D6309F089%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22SPerr.png%22%20alt%3D%22SPerr.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20help!%3CBR%20%2F%3E%3CBR%20%2F%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1754484%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EUsage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Contributor

I've got a problem with my column formatting JSON. Some rows it's not applying any formatting to, and thus are blank, even though there is data in them.

 

I'm assuming that there is either an item limit (too many items in list, then the formatting doesn't format everything, or too many nested if's.


List view currently has 215 items in it.

 

This is my JSON,

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "attributes": {
    "class": "= if([$Shipper]=='Seago',if([$GIN_x0020_Date]=='','',if([$Tracking_x0020_ETA]=='','',if([$GIN_x0020_Date]>[$Tracking_x0020_ETA]+864000000,'sp-field-severity--blocked',if([$GIN_x0020_Date]>[$Tracking_x0020_ETA]+777600000,'sp-field-severity--warning',if([$GIN_x0020_Date]<[$Tracking_x0020_ETA]+86400000,'sp-field-severity--blocked',if([$GIN_x0020_Date]<[$Tracking_x0020_ETA]+129600000,'sp-field-severity--warning','sp-field-severity--good')))))),if([$GIN_x0020_Date]=='','',if([$Tracking_x0020_ETA]=='','',if([$GIN_x0020_Date]>[$Tracking_x0020_ETA]+604800000,'sp-field-severity--blocked',if([$GIN_x0020_Date]>[$Tracking_x0020_ETA]+518400000,'sp-field-severity--warning',if([$GIN_x0020_Date]<[$Tracking_x0020_ETA]+86400000,'sp-field-severity--blocked',if([$GIN_x0020_Date]<[$Tracking_x0020_ETA]+129600000,'sp-field-severity--warning','sp-field-severity--good'))))))"
  },
  "children": [
    {
      "elmType": "span",
      "style": {
        "display": "inline-block",
        "padding": "0 4px"
      },
      "attributes": {
        "iconName": "= if([$Shipper]=='Seago',if([$GIN_x0020_Date]=='','',if([$Tracking_x0020_ETA]=='','',if([$GIN_x0020_Date]>[$Tracking_x0020_ETA]+864000000,'StatusErrorFull',if([$GIN_x0020_Date]>[$Tracking_x0020_ETA]+777600000,'WarningSolid',if([$GIN_x0020_Date]<[$Tracking_x0020_ETA]+86400000,'ErrorBadge',if([$GIN_x0020_Date]<[$Tracking_x0020_ETA]+129600000,'Warning','Ferry')))))),if([$GIN_x0020_Date]=='','',if([$Tracking_x0020_ETA]=='','',if([$GIN_x0020_Date]>[$Tracking_x0020_ETA]+604800000,'StatusErrorFull',if([$GIN_x0020_Date]>[$Tracking_x0020_ETA]+518400000,'WarningSolid',if([$GIN_x0020_Date]<[$Tracking_x0020_ETA]+86400000,'ErrorBadge',if([$GIN_x0020_Date]<[$Tracking_x0020_ETA]+129600000,'Warning','Ferry'))))))"
      }
    },
    {
      "elmType": "span",
      "txtContent": "@currentField"
    }
  ]
}

 

Here's a pic of the list showing the 'blank' fields - that do actually have values in them!

 

SPerr.png

 

Please help!

Thanks!

0 Replies