Forum Discussion

mziemba's avatar
mziemba
Copper Contributor
Sep 19, 2022
Solved

SharePoint list and Galery view with links to filtered sub list

Hi, 

I've created an SharePoint list of programs and have a separate list of projects, where each project refers to a program (it has a lookup column to a program list). 

I have found an inspirational article about cascade lists (Working with Cascading Lists in SharePoint and Power Apps) and I changed the format of the Title of the program on my list, so when you click on it, it will open the list of projects filtered by the program. But this works only for the List view, not a Galery (Tiles) view. 

 

Here is the column format I used on the Title column of the program list. 

 

 

 

 

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "children": [
    {
      "elmType": "a",
      "txtContent": "[$Title]",
      "attributes": {
        "target": "_top",
        "href": {
          "operator": "+",
          "operands": [
            "https://company.sharepoint.com/teams/ProjectManagement/Lists/Projects/GroupedByProgram.aspx?viewid=a5d9b369%2Df9db%2D498b%2Dbd43%2Df339dd030bd1&?FilterField1=Program%5Fname&FilterValue1=",
            "[$Title]",
            "&FilterType1=Lookup"
          ]
        }
      }
    }
  ]
}

 

 

 

 

 

 

How to make it possible on the Gallery (Tile) view of programs, so when the user clicks on the tile it will not open the view/edit of the specific program. Instead, it will open the project list filtered by the program. 

 

I was experimenting a bit with the JSON Format View of the Gallery (Tile) view. I have replaced the section 

 

 

 

 

    "children": [
      {
        "elmType": "button",
        "attributes": {
          "class": "sp-card-defaultClickButton",
          "role": "presentation"
        },
        "customRowAction": {
          "action": "defaultClick"
        }

 

 

 

 

To the one 

 

 

 

 

  "children": [
    {
      "elmType": "a",
      "txtContent": "[$Title]",
      "attributes": {
        "target": "_top",
        "href": {
          "operator": "+",
          "operands": [
            "https://company.sharepoint.com/teams/ProjectManagement/Lists/Projects/GroupedByProgram.aspx?viewid=a5d9b369%2Df9db%2D498b%2Dbd43%2Df339dd030bd1&?FilterField1=Program%5Fname&FilterValue1=",
            "[$Title]",
            "&FilterType1=Lookup"
          ]
        }
      }
    },

 

 

 

 

This only showed me the Program name on the left side of each Tile which was clickable and open the list of projects filtered by the program name. But is not the experience I wanted. 

 

Do you have any tips on what to change in JSON format of the JSON Format View of Gallery (Tile) view so when the user clicks the tile it will open the filtered project list?

 

/Mike

  • Michal_Z Below JSON works for multiple fields: 

     

    {
        "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
        "height": 123,
        "width": 254,
        "hideSelection": true,
        "fillHorizontally": true,
        "formatter": {
            "elmType": "div",
            "attributes": {
                "class": "sp-card-container"
            },
            "children": [
                {
                    "elmType": "a",
                    "style": {
                        "text-decoration": "none"
                    },
                    "attributes": {
                        "class": "ms-bgColor-white sp-css-borderColor-neutralLight sp-card-borderHighlight sp-card-subContainer",
                        "target": "_top",
                        "href": "='https://company.sharepoint.com/teams/ProjectManagement/Lists/Projects/GroupedByProgram.aspx?viewid=a5d9b369%2Df9db%2D498b%2Dbd43%2Df339dd030bd1&?FilterField1=Program%5Fname&FilterValue1=' + [$Title] + '&FilterType1=Lookup'"
                    },
                    "children": [
                        {
                            "elmType": "div",
                            "attributes": {
                                "class": "sp-card-displayColumnContainer"
                            },
                            "children": [
                                {
                                    "elmType": "p",
                                    "attributes": {
                                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                                    },
                                    "txtContent": "[!Title.DisplayName]"
                                },
                                {
                                    "elmType": "p",
                                    "attributes": {
                                        "title": "[$Title]",
                                        "class": "ms-fontColor-neutralPrimary sp-card-content sp-card-highlightedContent",
                                        "role": "heading",
                                        "aria-level": "3"
                                    },
                                    "txtContent": "=if ([$Title] == '', '–', [$Title])"
                                }
                            ]
                        },
                        {
                            "elmType": "div",
                            "attributes": {
                                "class": "sp-card-lastTextColumnContainer"
                            },
                            "children": [
                                {
                                    "elmType": "p",
                                    "attributes": {
                                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                                    },
                                    "txtContent": "[!URL.DisplayName]"
                                },
                                {
                                    "elmType": "p",
                                    "attributes": {
                                        "title": "[$URL]",
                                        "class": "ms-fontColor-neutralPrimary sp-card-content "
                                    },
                                    "txtContent": "=if ([$URL] == '', '–', [$URL])"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    }

     


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

  • mziemba Can you provide current complete JSON available in gallery view (advanced mode)? 

     

    I will provide you updated JSON which will work for your requirements.


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

    • mziemba's avatar
      mziemba
      Copper Contributor

      Hi ganeshsanap 

      Here it comes:

       

       

      {
        "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
        "height": 911,
        "width": 254,
        "hideSelection": false,
        "fillHorizontally": true,
        "formatter": {
          "elmType": "div",
          "attributes": {
            "class": "sp-card-container"
          },
          "children": [
            {
              "elmType": "button",
              "attributes": {
                "class": "sp-card-defaultClickButton",
                "role": "presentation"
              },
              "customRowAction": {
                "action": "defaultClick"
              }
            },
            {
              "elmType": "div",
              "attributes": {
                "class": "ms-bgColor-white sp-css-borderColor-neutralLight sp-card-borderHighlight sp-card-subContainer"
              },
              "children": [
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-displayColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!ProgramID.DisplayName]"
                    },
                    {
                      "elmType": "p",
                      "attributes": {
                        "title": "=if ([$ProgramID.displayValue] == '', '–', [$ProgramID.displayValue])",
                        "class": "ms-fontColor-neutralPrimary sp-card-content sp-card-highlightedContent",
                        "role": "heading",
                        "aria-level": "3"
                      },
                      "txtContent": "=if ([$ProgramID.displayValue] == '', '–', [$ProgramID.displayValue])"
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-displayColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!Title.DisplayName]"
                    },
                    {
                      "elmType": "p",
                      "attributes": {
                        "title": "[$Title]",
                        "class": "ms-fontColor-neutralPrimary sp-card-content "
                      },
                      "txtContent": "=if ([$Title] == '', '–', [$Title])"
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-previewColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!Program_owner.DisplayName]"
                    },
                    {
                      "elmType": "div",
                      "style": {
                        "display": "flex"
                      },
                      "children": [
                        {
                          "elmType": "p",
                          "attributes": {
                            "class": "sp-card-userEmptyText"
                          },
                          "txtContent": "=if(length([$Program_owner]) == 0, '–', '')"
                        },
                        {
                          "forEach": "personIterator in [$Program_owner]",
                          "elmType": "a",
                          "attributes": {
                            "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                          },
                          "style": {
                            "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                          },
                          "children": [
                            {
                              "elmType": "img",
                              "defaultHoverField": "[$personIterator]",
                              "attributes": {
                                "src": "=getUserImage([$personIterator.email], 'S')",
                                "title": "[$personIterator.title]",
                                "class": "sp-card-userThumbnail"
                              },
                              "style": {
                                "display": "=if(length([$Program_owner]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                              }
                            },
                            {
                              "elmType": "div",
                              "attributes": {
                                "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                              },
                              "style": {
                                "display": "=if(length([$Program_owner]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                              },
                              "customCardProps": {
                                "formatter": {
                                  "elmType": "div",
                                  "attributes": {
                                    "class": "sp-card-personCallout"
                                  },
                                  "children": [
                                    {
                                      "forEach": "personIterator in [$Program_owner]",
                                      "elmType": "div",
                                      "attributes": {
                                        "class": "sp-card-userContainer sp-card-userCustomCard"
                                      },
                                      "style": {
                                        "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                      },
                                      "children": [
                                        {
                                          "elmType": "img",
                                          "defaultHoverField": "[$personIterator]",
                                          "attributes": {
                                            "src": "=getUserImage([$personIterator.email], 'S')",
                                            "title": "[$personIterator.title]",
                                            "class": "sp-card-userThumbnail"
                                          }
                                        }
                                      ]
                                    }
                                  ]
                                },
                                "openOnEvent": "hover"
                              },
                              "children": [
                                {
                                  "elmType": "span",
                                  "txtContent": "='+' + toString(length([$Program_owner]) - (4))"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "elmType": "div",
                          "attributes": {
                            "class": "sp-card-userTitle"
                          },
                          "style": {
                            "display": "=if(length([$Program_owner]) == 1, '', 'none')"
                          },
                          "defaultHoverField": "[$personIterator]",
                          "txtContent": "[$Program_owner.title]"
                        }
                      ]
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-previewColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!Sponsor.DisplayName]"
                    },
                    {
                      "elmType": "div",
                      "style": {
                        "display": "flex"
                      },
                      "children": [
                        {
                          "elmType": "p",
                          "attributes": {
                            "class": "sp-card-userEmptyText"
                          },
                          "txtContent": "=if(length([$Sponsor]) == 0, '–', '')"
                        },
                        {
                          "forEach": "personIterator in [$Sponsor]",
                          "elmType": "a",
                          "attributes": {
                            "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                          },
                          "style": {
                            "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                          },
                          "children": [
                            {
                              "elmType": "img",
                              "defaultHoverField": "[$personIterator]",
                              "attributes": {
                                "src": "=getUserImage([$personIterator.email], 'S')",
                                "title": "[$personIterator.title]",
                                "class": "sp-card-userThumbnail"
                              },
                              "style": {
                                "display": "=if(length([$Sponsor]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                              }
                            },
                            {
                              "elmType": "div",
                              "attributes": {
                                "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                              },
                              "style": {
                                "display": "=if(length([$Sponsor]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                              },
                              "customCardProps": {
                                "formatter": {
                                  "elmType": "div",
                                  "attributes": {
                                    "class": "sp-card-personCallout"
                                  },
                                  "children": [
                                    {
                                      "forEach": "personIterator in [$Sponsor]",
                                      "elmType": "div",
                                      "attributes": {
                                        "class": "sp-card-userContainer sp-card-userCustomCard"
                                      },
                                      "style": {
                                        "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                      },
                                      "children": [
                                        {
                                          "elmType": "img",
                                          "defaultHoverField": "[$personIterator]",
                                          "attributes": {
                                            "src": "=getUserImage([$personIterator.email], 'S')",
                                            "title": "[$personIterator.title]",
                                            "class": "sp-card-userThumbnail"
                                          }
                                        }
                                      ]
                                    }
                                  ]
                                },
                                "openOnEvent": "hover"
                              },
                              "children": [
                                {
                                  "elmType": "span",
                                  "txtContent": "='+' + toString(length([$Sponsor]) - (4))"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "elmType": "div",
                          "attributes": {
                            "class": "sp-card-userTitle"
                          },
                          "style": {
                            "display": "=if(length([$Sponsor]) == 1, '', 'none')"
                          },
                          "defaultHoverField": "[$personIterator]",
                          "txtContent": "[$Sponsor.title]"
                        }
                      ]
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-previewColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!Senior_Users.DisplayName]"
                    },
                    {
                      "elmType": "div",
                      "style": {
                        "display": "flex"
                      },
                      "children": [
                        {
                          "elmType": "p",
                          "attributes": {
                            "class": "sp-card-userEmptyText"
                          },
                          "txtContent": "=if(length([$Senior_Users]) == 0, '–', '')"
                        },
                        {
                          "forEach": "personIterator in [$Senior_Users]",
                          "elmType": "a",
                          "attributes": {
                            "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                          },
                          "style": {
                            "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                          },
                          "children": [
                            {
                              "elmType": "img",
                              "defaultHoverField": "[$personIterator]",
                              "attributes": {
                                "src": "=getUserImage([$personIterator.email], 'S')",
                                "title": "[$personIterator.title]",
                                "class": "sp-card-userThumbnail"
                              },
                              "style": {
                                "display": "=if(length([$Senior_Users]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                              }
                            },
                            {
                              "elmType": "div",
                              "attributes": {
                                "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                              },
                              "style": {
                                "display": "=if(length([$Senior_Users]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                              },
                              "customCardProps": {
                                "formatter": {
                                  "elmType": "div",
                                  "attributes": {
                                    "class": "sp-card-personCallout"
                                  },
                                  "children": [
                                    {
                                      "forEach": "personIterator in [$Senior_Users]",
                                      "elmType": "div",
                                      "attributes": {
                                        "class": "sp-card-userContainer sp-card-userCustomCard"
                                      },
                                      "style": {
                                        "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                      },
                                      "children": [
                                        {
                                          "elmType": "img",
                                          "defaultHoverField": "[$personIterator]",
                                          "attributes": {
                                            "src": "=getUserImage([$personIterator.email], 'S')",
                                            "title": "[$personIterator.title]",
                                            "class": "sp-card-userThumbnail"
                                          }
                                        }
                                      ]
                                    }
                                  ]
                                },
                                "openOnEvent": "hover"
                              },
                              "children": [
                                {
                                  "elmType": "span",
                                  "txtContent": "='+' + toString(length([$Senior_Users]) - (4))"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "elmType": "div",
                          "attributes": {
                            "class": "sp-card-userTitle"
                          },
                          "style": {
                            "display": "=if(length([$Senior_Users]) == 1, '', 'none')"
                          },
                          "defaultHoverField": "[$personIterator]",
                          "txtContent": "[$Senior_Users.title]"
                        }
                      ]
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-previewColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!Project_Change_Authority.DisplayName]"
                    },
                    {
                      "elmType": "div",
                      "style": {
                        "display": "flex"
                      },
                      "children": [
                        {
                          "elmType": "p",
                          "attributes": {
                            "class": "sp-card-userEmptyText"
                          },
                          "txtContent": "=if(length([$Project_Change_Authority]) == 0, '–', '')"
                        },
                        {
                          "forEach": "personIterator in [$Project_Change_Authority]",
                          "elmType": "a",
                          "attributes": {
                            "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                          },
                          "style": {
                            "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                          },
                          "children": [
                            {
                              "elmType": "img",
                              "defaultHoverField": "[$personIterator]",
                              "attributes": {
                                "src": "=getUserImage([$personIterator.email], 'S')",
                                "title": "[$personIterator.title]",
                                "class": "sp-card-userThumbnail"
                              },
                              "style": {
                                "display": "=if(length([$Project_Change_Authority]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                              }
                            },
                            {
                              "elmType": "div",
                              "attributes": {
                                "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                              },
                              "style": {
                                "display": "=if(length([$Project_Change_Authority]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                              },
                              "customCardProps": {
                                "formatter": {
                                  "elmType": "div",
                                  "attributes": {
                                    "class": "sp-card-personCallout"
                                  },
                                  "children": [
                                    {
                                      "forEach": "personIterator in [$Project_Change_Authority]",
                                      "elmType": "div",
                                      "attributes": {
                                        "class": "sp-card-userContainer sp-card-userCustomCard"
                                      },
                                      "style": {
                                        "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                      },
                                      "children": [
                                        {
                                          "elmType": "img",
                                          "defaultHoverField": "[$personIterator]",
                                          "attributes": {
                                            "src": "=getUserImage([$personIterator.email], 'S')",
                                            "title": "[$personIterator.title]",
                                            "class": "sp-card-userThumbnail"
                                          }
                                        }
                                      ]
                                    }
                                  ]
                                },
                                "openOnEvent": "hover"
                              },
                              "children": [
                                {
                                  "elmType": "span",
                                  "txtContent": "='+' + toString(length([$Project_Change_Authority]) - (4))"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "elmType": "div",
                          "attributes": {
                            "class": "sp-card-userTitle"
                          },
                          "style": {
                            "display": "=if(length([$Project_Change_Authority]) == 1, '', 'none')"
                          },
                          "defaultHoverField": "[$personIterator]",
                          "txtContent": "[$Project_Change_Authority.title]"
                        }
                      ]
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-previewColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!Team_Managers.DisplayName]"
                    },
                    {
                      "elmType": "div",
                      "style": {
                        "display": "flex"
                      },
                      "children": [
                        {
                          "elmType": "p",
                          "attributes": {
                            "class": "sp-card-userEmptyText"
                          },
                          "txtContent": "=if(length([$Team_Managers]) == 0, '–', '')"
                        },
                        {
                          "forEach": "personIterator in [$Team_Managers]",
                          "elmType": "a",
                          "attributes": {
                            "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                          },
                          "style": {
                            "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                          },
                          "children": [
                            {
                              "elmType": "img",
                              "defaultHoverField": "[$personIterator]",
                              "attributes": {
                                "src": "=getUserImage([$personIterator.email], 'S')",
                                "title": "[$personIterator.title]",
                                "class": "sp-card-userThumbnail"
                              },
                              "style": {
                                "display": "=if(length([$Team_Managers]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                              }
                            },
                            {
                              "elmType": "div",
                              "attributes": {
                                "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                              },
                              "style": {
                                "display": "=if(length([$Team_Managers]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                              },
                              "customCardProps": {
                                "formatter": {
                                  "elmType": "div",
                                  "attributes": {
                                    "class": "sp-card-personCallout"
                                  },
                                  "children": [
                                    {
                                      "forEach": "personIterator in [$Team_Managers]",
                                      "elmType": "div",
                                      "attributes": {
                                        "class": "sp-card-userContainer sp-card-userCustomCard"
                                      },
                                      "style": {
                                        "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                      },
                                      "children": [
                                        {
                                          "elmType": "img",
                                          "defaultHoverField": "[$personIterator]",
                                          "attributes": {
                                            "src": "=getUserImage([$personIterator.email], 'S')",
                                            "title": "[$personIterator.title]",
                                            "class": "sp-card-userThumbnail"
                                          }
                                        }
                                      ]
                                    }
                                  ]
                                },
                                "openOnEvent": "hover"
                              },
                              "children": [
                                {
                                  "elmType": "span",
                                  "txtContent": "='+' + toString(length([$Team_Managers]) - (4))"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "elmType": "div",
                          "attributes": {
                            "class": "sp-card-userTitle"
                          },
                          "style": {
                            "display": "=if(length([$Team_Managers]) == 1, '', 'none')"
                          },
                          "defaultHoverField": "[$personIterator]",
                          "txtContent": "[$Team_Managers.title]"
                        }
                      ]
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-previewColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!Program_Manager.DisplayName]"
                    },
                    {
                      "elmType": "div",
                      "style": {
                        "display": "flex"
                      },
                      "children": [
                        {
                          "elmType": "p",
                          "attributes": {
                            "class": "sp-card-userEmptyText"
                          },
                          "txtContent": "=if(length([$Program_Manager]) == 0, '–', '')"
                        },
                        {
                          "forEach": "personIterator in [$Program_Manager]",
                          "elmType": "a",
                          "attributes": {
                            "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                          },
                          "style": {
                            "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                          },
                          "children": [
                            {
                              "elmType": "img",
                              "defaultHoverField": "[$personIterator]",
                              "attributes": {
                                "src": "=getUserImage([$personIterator.email], 'S')",
                                "title": "[$personIterator.title]",
                                "class": "sp-card-userThumbnail"
                              },
                              "style": {
                                "display": "=if(length([$Program_Manager]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                              }
                            },
                            {
                              "elmType": "div",
                              "attributes": {
                                "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                              },
                              "style": {
                                "display": "=if(length([$Program_Manager]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                              },
                              "customCardProps": {
                                "formatter": {
                                  "elmType": "div",
                                  "attributes": {
                                    "class": "sp-card-personCallout"
                                  },
                                  "children": [
                                    {
                                      "forEach": "personIterator in [$Program_Manager]",
                                      "elmType": "div",
                                      "attributes": {
                                        "class": "sp-card-userContainer sp-card-userCustomCard"
                                      },
                                      "style": {
                                        "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                      },
                                      "children": [
                                        {
                                          "elmType": "img",
                                          "defaultHoverField": "[$personIterator]",
                                          "attributes": {
                                            "src": "=getUserImage([$personIterator.email], 'S')",
                                            "title": "[$personIterator.title]",
                                            "class": "sp-card-userThumbnail"
                                          }
                                        }
                                      ]
                                    }
                                  ]
                                },
                                "openOnEvent": "hover"
                              },
                              "children": [
                                {
                                  "elmType": "span",
                                  "txtContent": "='+' + toString(length([$Program_Manager]) - (4))"
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "elmType": "div",
                          "attributes": {
                            "class": "sp-card-userTitle"
                          },
                          "style": {
                            "display": "=if(length([$Program_Manager]) == 1, '', 'none')"
                          },
                          "defaultHoverField": "[$personIterator]",
                          "txtContent": "[$Program_Manager.title]"
                        }
                      ]
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-displayColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!Program_type.DisplayName]"
                    },
                    {
                      "elmType": "div",
                      "attributes": {
                        "class": "sp-card-content "
                      },
                      "children": [
                        {
                          "elmType": "p",
                          "txtContent": "=if(length([$Program_type]) == 0, '–', '')"
                        },
                        {
                          "forEach": "lookupIterator in [$Program_type]",
                          "elmType": "a",
                          "attributes": {
                            "target": "_blank",
                            "class": "ms-fontColor-neutralPrimary sp-card-urlContent sp-card-lookupInlineValues sp-card-keyboard-focusable ",
                            "href": {
                              "operator": "+",
                              "operands": [
                                "&ID=",
                                "[$lookupIterator.lookupId]"
                              ]
                            }
                          },
                          "txtContent": "[$lookupIterator.lookupValue]"
                        }
                      ]
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-displayColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!KPI_Overall.DisplayName]"
                    },
                    {
                      "elmType": "p",
                      "attributes": {
                        "title": "[$KPI_Overall]",
                        "class": "ms-fontColor-neutralPrimary sp-card-content "
                      },
                      "txtContent": "=if ([$KPI_Overall] == '', '–', [$KPI_Overall])"
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-displayColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!KPI_Progress.DisplayName]"
                    },
                    {
                      "elmType": "p",
                      "attributes": {
                        "title": "[$KPI_Progress]",
                        "class": "ms-fontColor-neutralPrimary sp-card-content "
                      },
                      "txtContent": "=if ([$KPI_Progress] == '', '–', [$KPI_Progress])"
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-displayColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!KPI_Resources.DisplayName]"
                    },
                    {
                      "elmType": "p",
                      "attributes": {
                        "title": "[$KPI_Resources]",
                        "class": "ms-fontColor-neutralPrimary sp-card-content "
                      },
                      "txtContent": "=if ([$KPI_Resources] == '', '–', [$KPI_Resources])"
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-displayColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!KPI_Economy.DisplayName]"
                    },
                    {
                      "elmType": "p",
                      "attributes": {
                        "title": "[$KPI_Economy]",
                        "class": "ms-fontColor-neutralPrimary sp-card-content "
                      },
                      "txtContent": "=if ([$KPI_Economy] == '', '–', [$KPI_Economy])"
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-displayColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!KPI_Risk.DisplayName]"
                    },
                    {
                      "elmType": "p",
                      "attributes": {
                        "title": "[$KPI_Risk]",
                        "class": "ms-fontColor-neutralPrimary sp-card-content "
                      },
                      "txtContent": "=if ([$KPI_Risk] == '', '–', [$KPI_Risk])"
                    }
                  ]
                },
                {
                  "elmType": "div",
                  "attributes": {
                    "class": "sp-card-lastTextColumnContainer"
                  },
                  "children": [
                    {
                      "elmType": "p",
                      "attributes": {
                        "class": "ms-fontColor-neutralSecondary sp-card-label"
                      },
                      "txtContent": "[!KPI_Gains.DisplayName]"
                    },
                    {
                      "elmType": "p",
                      "attributes": {
                        "title": "[$KPI_Gains]",
                        "class": "ms-fontColor-neutralPrimary sp-card-content "
                      },
                      "txtContent": "=if ([$KPI_Gains] == '', '–', [$KPI_Gains])"
                    }
                  ]
                }
              ]
            }
          ]
        }
      }

      Here is what is on the screen 

       

       

      • mziemba Try using this JSON: 

         

        {
            "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
            "height": 911,
            "width": 254,
            "hideSelection": false,
            "fillHorizontally": true,
            "formatter": {
                "elmType": "div",
                "attributes": {
                    "class": "sp-card-container"
                },
                "children": [
                    {
                        "elmType": "a",
                        "attributes": {
                            "target": "_top",
                            "href": {
                                "operator": "+",
                                "operands": [
                                    "https://company.sharepoint.com/teams/ProjectManagement/Lists/Projects/GroupedByProgram.aspx?viewid=a5d9b369%2Df9db%2D498b%2Dbd43%2Df339dd030bd1&?FilterField1=Program%5Fname&FilterValue1=",
                                    "[$Title]",
                                    "&FilterType1=Lookup"
                                ]
                            }
                        },
                        "children": [
                            {
                                "elmType": "div",
                                "attributes": {
                                    "class": "ms-bgColor-white sp-css-borderColor-neutralLight sp-card-borderHighlight sp-card-subContainer"
                                },
                                "children": [
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-displayColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!ProgramID.DisplayName]"
                                            },
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "title": "=if ([$ProgramID.displayValue] == '', '–', [$ProgramID.displayValue])",
                                                    "class": "ms-fontColor-neutralPrimary sp-card-content sp-card-highlightedContent",
                                                    "role": "heading",
                                                    "aria-level": "3"
                                                },
                                                "txtContent": "=if ([$ProgramID.displayValue] == '', '–', [$ProgramID.displayValue])"
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-displayColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!Title.DisplayName]"
                                            },
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "title": "[$Title]",
                                                    "class": "ms-fontColor-neutralPrimary sp-card-content "
                                                },
                                                "txtContent": "=if ([$Title] == '', '–', [$Title])"
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-previewColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!Program_owner.DisplayName]"
                                            },
                                            {
                                                "elmType": "div",
                                                "style": {
                                                    "display": "flex"
                                                },
                                                "children": [
                                                    {
                                                        "elmType": "p",
                                                        "attributes": {
                                                            "class": "sp-card-userEmptyText"
                                                        },
                                                        "txtContent": "=if(length([$Program_owner]) == 0, '–', '')"
                                                    },
                                                    {
                                                        "forEach": "personIterator in [$Program_owner]",
                                                        "elmType": "a",
                                                        "attributes": {
                                                            "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                                                        },
                                                        "style": {
                                                            "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                                                        },
                                                        "children": [
                                                            {
                                                                "elmType": "img",
                                                                "defaultHoverField": "[$personIterator]",
                                                                "attributes": {
                                                                    "src": "=getUserImage([$personIterator.email], 'S')",
                                                                    "title": "[$personIterator.title]",
                                                                    "class": "sp-card-userThumbnail"
                                                                },
                                                                "style": {
                                                                    "display": "=if(length([$Program_owner]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                                                                }
                                                            },
                                                            {
                                                                "elmType": "div",
                                                                "attributes": {
                                                                    "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                                                                },
                                                                "style": {
                                                                    "display": "=if(length([$Program_owner]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                                                                },
                                                                "customCardProps": {
                                                                    "formatter": {
                                                                        "elmType": "div",
                                                                        "attributes": {
                                                                            "class": "sp-card-personCallout"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "forEach": "personIterator in [$Program_owner]",
                                                                                "elmType": "div",
                                                                                "attributes": {
                                                                                    "class": "sp-card-userContainer sp-card-userCustomCard"
                                                                                },
                                                                                "style": {
                                                                                    "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                                                                },
                                                                                "children": [
                                                                                    {
                                                                                        "elmType": "img",
                                                                                        "defaultHoverField": "[$personIterator]",
                                                                                        "attributes": {
                                                                                            "src": "=getUserImage([$personIterator.email], 'S')",
                                                                                            "title": "[$personIterator.title]",
                                                                                            "class": "sp-card-userThumbnail"
                                                                                        }
                                                                                    }
                                                                                ]
                                                                            }
                                                                        ]
                                                                    },
                                                                    "openOnEvent": "hover"
                                                                },
                                                                "children": [
                                                                    {
                                                                        "elmType": "span",
                                                                        "txtContent": "='+' + toString(length([$Program_owner]) - (4))"
                                                                    }
                                                                ]
                                                            }
                                                        ]
                                                    },
                                                    {
                                                        "elmType": "div",
                                                        "attributes": {
                                                            "class": "sp-card-userTitle"
                                                        },
                                                        "style": {
                                                            "display": "=if(length([$Program_owner]) == 1, '', 'none')"
                                                        },
                                                        "defaultHoverField": "[$personIterator]",
                                                        "txtContent": "[$Program_owner.title]"
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-previewColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!Sponsor.DisplayName]"
                                            },
                                            {
                                                "elmType": "div",
                                                "style": {
                                                    "display": "flex"
                                                },
                                                "children": [
                                                    {
                                                        "elmType": "p",
                                                        "attributes": {
                                                            "class": "sp-card-userEmptyText"
                                                        },
                                                        "txtContent": "=if(length([$Sponsor]) == 0, '–', '')"
                                                    },
                                                    {
                                                        "forEach": "personIterator in [$Sponsor]",
                                                        "elmType": "a",
                                                        "attributes": {
                                                            "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                                                        },
                                                        "style": {
                                                            "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                                                        },
                                                        "children": [
                                                            {
                                                                "elmType": "img",
                                                                "defaultHoverField": "[$personIterator]",
                                                                "attributes": {
                                                                    "src": "=getUserImage([$personIterator.email], 'S')",
                                                                    "title": "[$personIterator.title]",
                                                                    "class": "sp-card-userThumbnail"
                                                                },
                                                                "style": {
                                                                    "display": "=if(length([$Sponsor]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                                                                }
                                                            },
                                                            {
                                                                "elmType": "div",
                                                                "attributes": {
                                                                    "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                                                                },
                                                                "style": {
                                                                    "display": "=if(length([$Sponsor]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                                                                },
                                                                "customCardProps": {
                                                                    "formatter": {
                                                                        "elmType": "div",
                                                                        "attributes": {
                                                                            "class": "sp-card-personCallout"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "forEach": "personIterator in [$Sponsor]",
                                                                                "elmType": "div",
                                                                                "attributes": {
                                                                                    "class": "sp-card-userContainer sp-card-userCustomCard"
                                                                                },
                                                                                "style": {
                                                                                    "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                                                                },
                                                                                "children": [
                                                                                    {
                                                                                        "elmType": "img",
                                                                                        "defaultHoverField": "[$personIterator]",
                                                                                        "attributes": {
                                                                                            "src": "=getUserImage([$personIterator.email], 'S')",
                                                                                            "title": "[$personIterator.title]",
                                                                                            "class": "sp-card-userThumbnail"
                                                                                        }
                                                                                    }
                                                                                ]
                                                                            }
                                                                        ]
                                                                    },
                                                                    "openOnEvent": "hover"
                                                                },
                                                                "children": [
                                                                    {
                                                                        "elmType": "span",
                                                                        "txtContent": "='+' + toString(length([$Sponsor]) - (4))"
                                                                    }
                                                                ]
                                                            }
                                                        ]
                                                    },
                                                    {
                                                        "elmType": "div",
                                                        "attributes": {
                                                            "class": "sp-card-userTitle"
                                                        },
                                                        "style": {
                                                            "display": "=if(length([$Sponsor]) == 1, '', 'none')"
                                                        },
                                                        "defaultHoverField": "[$personIterator]",
                                                        "txtContent": "[$Sponsor.title]"
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-previewColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!Senior_Users.DisplayName]"
                                            },
                                            {
                                                "elmType": "div",
                                                "style": {
                                                    "display": "flex"
                                                },
                                                "children": [
                                                    {
                                                        "elmType": "p",
                                                        "attributes": {
                                                            "class": "sp-card-userEmptyText"
                                                        },
                                                        "txtContent": "=if(length([$Senior_Users]) == 0, '–', '')"
                                                    },
                                                    {
                                                        "forEach": "personIterator in [$Senior_Users]",
                                                        "elmType": "a",
                                                        "attributes": {
                                                            "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                                                        },
                                                        "style": {
                                                            "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                                                        },
                                                        "children": [
                                                            {
                                                                "elmType": "img",
                                                                "defaultHoverField": "[$personIterator]",
                                                                "attributes": {
                                                                    "src": "=getUserImage([$personIterator.email], 'S')",
                                                                    "title": "[$personIterator.title]",
                                                                    "class": "sp-card-userThumbnail"
                                                                },
                                                                "style": {
                                                                    "display": "=if(length([$Senior_Users]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                                                                }
                                                            },
                                                            {
                                                                "elmType": "div",
                                                                "attributes": {
                                                                    "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                                                                },
                                                                "style": {
                                                                    "display": "=if(length([$Senior_Users]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                                                                },
                                                                "customCardProps": {
                                                                    "formatter": {
                                                                        "elmType": "div",
                                                                        "attributes": {
                                                                            "class": "sp-card-personCallout"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "forEach": "personIterator in [$Senior_Users]",
                                                                                "elmType": "div",
                                                                                "attributes": {
                                                                                    "class": "sp-card-userContainer sp-card-userCustomCard"
                                                                                },
                                                                                "style": {
                                                                                    "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                                                                },
                                                                                "children": [
                                                                                    {
                                                                                        "elmType": "img",
                                                                                        "defaultHoverField": "[$personIterator]",
                                                                                        "attributes": {
                                                                                            "src": "=getUserImage([$personIterator.email], 'S')",
                                                                                            "title": "[$personIterator.title]",
                                                                                            "class": "sp-card-userThumbnail"
                                                                                        }
                                                                                    }
                                                                                ]
                                                                            }
                                                                        ]
                                                                    },
                                                                    "openOnEvent": "hover"
                                                                },
                                                                "children": [
                                                                    {
                                                                        "elmType": "span",
                                                                        "txtContent": "='+' + toString(length([$Senior_Users]) - (4))"
                                                                    }
                                                                ]
                                                            }
                                                        ]
                                                    },
                                                    {
                                                        "elmType": "div",
                                                        "attributes": {
                                                            "class": "sp-card-userTitle"
                                                        },
                                                        "style": {
                                                            "display": "=if(length([$Senior_Users]) == 1, '', 'none')"
                                                        },
                                                        "defaultHoverField": "[$personIterator]",
                                                        "txtContent": "[$Senior_Users.title]"
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-previewColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!Project_Change_Authority.DisplayName]"
                                            },
                                            {
                                                "elmType": "div",
                                                "style": {
                                                    "display": "flex"
                                                },
                                                "children": [
                                                    {
                                                        "elmType": "p",
                                                        "attributes": {
                                                            "class": "sp-card-userEmptyText"
                                                        },
                                                        "txtContent": "=if(length([$Project_Change_Authority]) == 0, '–', '')"
                                                    },
                                                    {
                                                        "forEach": "personIterator in [$Project_Change_Authority]",
                                                        "elmType": "a",
                                                        "attributes": {
                                                            "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                                                        },
                                                        "style": {
                                                            "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                                                        },
                                                        "children": [
                                                            {
                                                                "elmType": "img",
                                                                "defaultHoverField": "[$personIterator]",
                                                                "attributes": {
                                                                    "src": "=getUserImage([$personIterator.email], 'S')",
                                                                    "title": "[$personIterator.title]",
                                                                    "class": "sp-card-userThumbnail"
                                                                },
                                                                "style": {
                                                                    "display": "=if(length([$Project_Change_Authority]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                                                                }
                                                            },
                                                            {
                                                                "elmType": "div",
                                                                "attributes": {
                                                                    "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                                                                },
                                                                "style": {
                                                                    "display": "=if(length([$Project_Change_Authority]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                                                                },
                                                                "customCardProps": {
                                                                    "formatter": {
                                                                        "elmType": "div",
                                                                        "attributes": {
                                                                            "class": "sp-card-personCallout"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "forEach": "personIterator in [$Project_Change_Authority]",
                                                                                "elmType": "div",
                                                                                "attributes": {
                                                                                    "class": "sp-card-userContainer sp-card-userCustomCard"
                                                                                },
                                                                                "style": {
                                                                                    "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                                                                },
                                                                                "children": [
                                                                                    {
                                                                                        "elmType": "img",
                                                                                        "defaultHoverField": "[$personIterator]",
                                                                                        "attributes": {
                                                                                            "src": "=getUserImage([$personIterator.email], 'S')",
                                                                                            "title": "[$personIterator.title]",
                                                                                            "class": "sp-card-userThumbnail"
                                                                                        }
                                                                                    }
                                                                                ]
                                                                            }
                                                                        ]
                                                                    },
                                                                    "openOnEvent": "hover"
                                                                },
                                                                "children": [
                                                                    {
                                                                        "elmType": "span",
                                                                        "txtContent": "='+' + toString(length([$Project_Change_Authority]) - (4))"
                                                                    }
                                                                ]
                                                            }
                                                        ]
                                                    },
                                                    {
                                                        "elmType": "div",
                                                        "attributes": {
                                                            "class": "sp-card-userTitle"
                                                        },
                                                        "style": {
                                                            "display": "=if(length([$Project_Change_Authority]) == 1, '', 'none')"
                                                        },
                                                        "defaultHoverField": "[$personIterator]",
                                                        "txtContent": "[$Project_Change_Authority.title]"
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-previewColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!Team_Managers.DisplayName]"
                                            },
                                            {
                                                "elmType": "div",
                                                "style": {
                                                    "display": "flex"
                                                },
                                                "children": [
                                                    {
                                                        "elmType": "p",
                                                        "attributes": {
                                                            "class": "sp-card-userEmptyText"
                                                        },
                                                        "txtContent": "=if(length([$Team_Managers]) == 0, '–', '')"
                                                    },
                                                    {
                                                        "forEach": "personIterator in [$Team_Managers]",
                                                        "elmType": "a",
                                                        "attributes": {
                                                            "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                                                        },
                                                        "style": {
                                                            "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                                                        },
                                                        "children": [
                                                            {
                                                                "elmType": "img",
                                                                "defaultHoverField": "[$personIterator]",
                                                                "attributes": {
                                                                    "src": "=getUserImage([$personIterator.email], 'S')",
                                                                    "title": "[$personIterator.title]",
                                                                    "class": "sp-card-userThumbnail"
                                                                },
                                                                "style": {
                                                                    "display": "=if(length([$Team_Managers]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                                                                }
                                                            },
                                                            {
                                                                "elmType": "div",
                                                                "attributes": {
                                                                    "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                                                                },
                                                                "style": {
                                                                    "display": "=if(length([$Team_Managers]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                                                                },
                                                                "customCardProps": {
                                                                    "formatter": {
                                                                        "elmType": "div",
                                                                        "attributes": {
                                                                            "class": "sp-card-personCallout"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "forEach": "personIterator in [$Team_Managers]",
                                                                                "elmType": "div",
                                                                                "attributes": {
                                                                                    "class": "sp-card-userContainer sp-card-userCustomCard"
                                                                                },
                                                                                "style": {
                                                                                    "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                                                                },
                                                                                "children": [
                                                                                    {
                                                                                        "elmType": "img",
                                                                                        "defaultHoverField": "[$personIterator]",
                                                                                        "attributes": {
                                                                                            "src": "=getUserImage([$personIterator.email], 'S')",
                                                                                            "title": "[$personIterator.title]",
                                                                                            "class": "sp-card-userThumbnail"
                                                                                        }
                                                                                    }
                                                                                ]
                                                                            }
                                                                        ]
                                                                    },
                                                                    "openOnEvent": "hover"
                                                                },
                                                                "children": [
                                                                    {
                                                                        "elmType": "span",
                                                                        "txtContent": "='+' + toString(length([$Team_Managers]) - (4))"
                                                                    }
                                                                ]
                                                            }
                                                        ]
                                                    },
                                                    {
                                                        "elmType": "div",
                                                        "attributes": {
                                                            "class": "sp-card-userTitle"
                                                        },
                                                        "style": {
                                                            "display": "=if(length([$Team_Managers]) == 1, '', 'none')"
                                                        },
                                                        "defaultHoverField": "[$personIterator]",
                                                        "txtContent": "[$Team_Managers.title]"
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-previewColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!Program_Manager.DisplayName]"
                                            },
                                            {
                                                "elmType": "div",
                                                "style": {
                                                    "display": "flex"
                                                },
                                                "children": [
                                                    {
                                                        "elmType": "p",
                                                        "attributes": {
                                                            "class": "sp-card-userEmptyText"
                                                        },
                                                        "txtContent": "=if(length([$Program_Manager]) == 0, '–', '')"
                                                    },
                                                    {
                                                        "forEach": "personIterator in [$Program_Manager]",
                                                        "elmType": "a",
                                                        "attributes": {
                                                            "class": "=if(loopIndex('personIterator') >= 5, 'sp-card-userContainer', 'sp-card-userContainer sp-card-keyboard-focusable')"
                                                        },
                                                        "style": {
                                                            "display": "=if(loopIndex('personIterator') >= 5, 'none', '')"
                                                        },
                                                        "children": [
                                                            {
                                                                "elmType": "img",
                                                                "defaultHoverField": "[$personIterator]",
                                                                "attributes": {
                                                                    "src": "=getUserImage([$personIterator.email], 'S')",
                                                                    "title": "[$personIterator.title]",
                                                                    "class": "sp-card-userThumbnail"
                                                                },
                                                                "style": {
                                                                    "display": "=if(length([$Program_Manager]) > 5 && loopIndex('personIterator') >= 4, 'none', '')"
                                                                }
                                                            },
                                                            {
                                                                "elmType": "div",
                                                                "attributes": {
                                                                    "class": "ms-bgColor-neutralLight ms-fontColor-neutralSecondary sp-card-userOthers"
                                                                },
                                                                "style": {
                                                                    "display": "=if(length([$Program_Manager]) > 5 && loopIndex('personIterator') == 4, '', 'none')"
                                                                },
                                                                "customCardProps": {
                                                                    "formatter": {
                                                                        "elmType": "div",
                                                                        "attributes": {
                                                                            "class": "sp-card-personCallout"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "forEach": "personIterator in [$Program_Manager]",
                                                                                "elmType": "div",
                                                                                "attributes": {
                                                                                    "class": "sp-card-userContainer sp-card-userCustomCard"
                                                                                },
                                                                                "style": {
                                                                                    "display": "=if(loopIndex('personIterator') < 4, 'none', '')"
                                                                                },
                                                                                "children": [
                                                                                    {
                                                                                        "elmType": "img",
                                                                                        "defaultHoverField": "[$personIterator]",
                                                                                        "attributes": {
                                                                                            "src": "=getUserImage([$personIterator.email], 'S')",
                                                                                            "title": "[$personIterator.title]",
                                                                                            "class": "sp-card-userThumbnail"
                                                                                        }
                                                                                    }
                                                                                ]
                                                                            }
                                                                        ]
                                                                    },
                                                                    "openOnEvent": "hover"
                                                                },
                                                                "children": [
                                                                    {
                                                                        "elmType": "span",
                                                                        "txtContent": "='+' + toString(length([$Program_Manager]) - (4))"
                                                                    }
                                                                ]
                                                            }
                                                        ]
                                                    },
                                                    {
                                                        "elmType": "div",
                                                        "attributes": {
                                                            "class": "sp-card-userTitle"
                                                        },
                                                        "style": {
                                                            "display": "=if(length([$Program_Manager]) == 1, '', 'none')"
                                                        },
                                                        "defaultHoverField": "[$personIterator]",
                                                        "txtContent": "[$Program_Manager.title]"
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-displayColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!Program_type.DisplayName]"
                                            },
                                            {
                                                "elmType": "div",
                                                "attributes": {
                                                    "class": "sp-card-content "
                                                },
                                                "children": [
                                                    {
                                                        "elmType": "p",
                                                        "txtContent": "=if(length([$Program_type]) == 0, '–', '')"
                                                    },
                                                    {
                                                        "forEach": "lookupIterator in [$Program_type]",
                                                        "elmType": "a",
                                                        "attributes": {
                                                            "target": "_blank",
                                                            "class": "ms-fontColor-neutralPrimary sp-card-urlContent sp-card-lookupInlineValues sp-card-keyboard-focusable ",
                                                            "href": {
                                                                "operator": "+",
                                                                "operands": [
                                                                    "&ID=",
                                                                    "[$lookupIterator.lookupId]"
                                                                ]
                                                            }
                                                        },
                                                        "txtContent": "[$lookupIterator.lookupValue]"
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-displayColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!KPI_Overall.DisplayName]"
                                            },
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "title": "[$KPI_Overall]",
                                                    "class": "ms-fontColor-neutralPrimary sp-card-content "
                                                },
                                                "txtContent": "=if ([$KPI_Overall] == '', '–', [$KPI_Overall])"
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-displayColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!KPI_Progress.DisplayName]"
                                            },
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "title": "[$KPI_Progress]",
                                                    "class": "ms-fontColor-neutralPrimary sp-card-content "
                                                },
                                                "txtContent": "=if ([$KPI_Progress] == '', '–', [$KPI_Progress])"
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-displayColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!KPI_Resources.DisplayName]"
                                            },
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "title": "[$KPI_Resources]",
                                                    "class": "ms-fontColor-neutralPrimary sp-card-content "
                                                },
                                                "txtContent": "=if ([$KPI_Resources] == '', '–', [$KPI_Resources])"
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-displayColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!KPI_Economy.DisplayName]"
                                            },
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "title": "[$KPI_Economy]",
                                                    "class": "ms-fontColor-neutralPrimary sp-card-content "
                                                },
                                                "txtContent": "=if ([$KPI_Economy] == '', '–', [$KPI_Economy])"
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-displayColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!KPI_Risk.DisplayName]"
                                            },
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "title": "[$KPI_Risk]",
                                                    "class": "ms-fontColor-neutralPrimary sp-card-content "
                                                },
                                                "txtContent": "=if ([$KPI_Risk] == '', '–', [$KPI_Risk])"
                                            }
                                        ]
                                    },
                                    {
                                        "elmType": "div",
                                        "attributes": {
                                            "class": "sp-card-lastTextColumnContainer"
                                        },
                                        "children": [
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "class": "ms-fontColor-neutralSecondary sp-card-label"
                                                },
                                                "txtContent": "[!KPI_Gains.DisplayName]"
                                            },
                                            {
                                                "elmType": "p",
                                                "attributes": {
                                                    "title": "[$KPI_Gains]",
                                                    "class": "ms-fontColor-neutralPrimary sp-card-content "
                                                },
                                                "txtContent": "=if ([$KPI_Gains] == '', '–', [$KPI_Gains])"
                                            }
                                        ]
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        }

         


        Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources