RE: Help with HTML formatting in saved search result

Hi everyone. I am having difficulty getting this search to run with conditional HTML formatting in the results. I keep running into either the page returning a “An unexpected error occurred…” error or the search column returning “Error: Invalid Expression”.

 

 

CASE WHEN {locationnohierarchy} = ‘My Location’

AND SUM(CASE WHEN TO_CHAR({trandate},’MON’) = ‘JUL’ THEN {amount} ELSE NULL END)

BETWEEN .97 * 1836674.72 AND 1.03 * 1836674.72

THEN ‘<b><span style=”color:#ADFF2F;”>’ || SUM(CASE WHEN TO_CHAR({trandate},’MON’) = ‘JUL’ THEN {amount} ELSE NULL END) || </span></b>’

ELSE NULL

END

 

Any help is appreciated, thanks!

d_a_v_i_d Rookie Asked on August 17, 2021 in Saved Searches.
Add Comment
3 Answers

I personally expect you to have more issues trying to use SUM over the html strings. Although it probably isnt what you want, I’d try getting rid of the SUM’s to at least get the syntax correct first.

The most obvious problem that is seen here is the missing single quote in front of </span></b>'

Intermediate Answered on August 17, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.