The code below looks at my Client Number Field and if its greater then 5000, it concatenates and creates a hyperlink to a Jira item. This is working correctly. I need to add a "Then" statement, so if Client Number is less then 5000 then ignore and leave blank. They should be blank because the user will manually enter the the Jira URL and Jira number. When manually entered the data is not being displayed.
The statement I think should be:
If Client Number is Less then 5000 ignore, if Client Number is greater then 5000, then create url.
Any help would be appreciated?
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "a",
"txtContent": "='XYZ-' + [$Client_Number]",
"attributes": {
"target": "_blank",
"href": "='https://jira.com/browse/' + 'XYZ-' + [$Client_Number]"
},
"style": {
"display": "=if([$Client_Number] <= 5000, 'none', '')"
}
}
]
}