Forum Discussion

spineb13's avatar
spineb13
Copper Contributor
May 13, 2024

Search from MS Lists returning inconsistant results

I am running into two issues that are sort of playing off each other.

 

I use the MS Lists app to display a list of client names and corresponding items. The ClientName column is a lookup column with names formatted as Last, First Middle.

 

I have been able to format the JSON for ClientName so that the names are hyperlinks that will search for all entries with that client's name. However, I am running into issues where the search is returning incomplete results. The current codes is:

 

 

 

 

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "attributes": {
    "href": "='https://siteName.sharepoint.com/sites/listName/Lists/Hearings%20List/AllItems.aspx?env=WebViewList&q=' + [$Hearing_x0020__x0023_.lookupValue]",
    "target": "_top",
    "class": "sp-field-fontSizeSmall sp-css-color-BlackText sp-field-bold"
  },
  "txtContent": "[$Hearing_x0020__x0023_.lookupValue]"
}

 

 

 

 

 

I cannot figure out how to call a search natively within the MS Lists app (which would be the ideal solution, if anyone can point me to that), so the code I have runs a search in a browser version of Lists. However, I have found strange behaviors running searches in the browser version:

 

-Searching using the native Search bar at the top of the Lists app returns all results as expected.

-Searching using the browser version of Lists in Edge returns all results as expected.

-Searching using the browser version of Lists in Chrome (the system default browser) returns inconsistent results. (described below)

-Using the hyperlinks I formatted runs what seems to be an iframe in the Lists app, but returns the same inconsistent results as Chrome.

 

-Searching for a name that is Last, First Middle will usually only return one or two of the results.

-Searching for a name that is Last, First will return more than when including the Middle name, though with a few refreshes, might return all the results.

-Searching just the Last OR First name will return all the results (but also then returns results for more than one client).

 

Does anyone know how to correct these search behaviors and/or call the native search function within the Lists app?

No RepliesBe the first to reply

Resources