You can try below JSON formatting for your list view. You will have to apply this on your status
column and make sure to include Modified By
column in your view.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"background-color": "=if(@currentField == 'Low' || @currentField == 'Medium' || @currentField == 'High', if([$Editor.email] == '[email protected]' || [$Editor.email] == '[email protected]' || [$Editor.email] == '[email protected]', '#FFBF00', ''), '')"
}
}
JQuery solution with script editor web part:
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("table.ms-listviewtable tr").each(function() {
var statusColumn = $(this).find("td[aria-labelledby='Status']");
var modifiedByColumn = $(this).find("td[aria-labelledby='Editor']");
if (statusColumn.length > 0 && modifiedByColumn.length > 0) {
var statusText = statusColumn.text().trim();
var modifiedByEmail = modifiedByColumn.find("span.ms-imnSpan span a").attr("email");
if ((statusText === "Low" || statusText === "Medium" || statusText === "High") &&
(modifiedByEmail === "[email protected]" ||
modifiedByEmail === "[email protected]" ||
modifiedByEmail === "[email protected]")) {
statusColumn.css("background-color", "#FFBF00");
}
}
});
});
</script>