Select to view content in your preferred language

Survey123 Report Conditional Formatting with number ranges

861
2
Jump to solution
11-17-2023 04:36 AM
BrendonJoyce1
Regular Contributor

Good morning all,

 

I am trying to put some conditional formatting in a Survey123 Report. I'd like to have a certain hydrant class show with color formatting for each report based on a flow in GPM in an integer field.

BrendonJoyce1_0-1700223174078.png

The formatting at both AA & C with just the >= or <= statements work for formatting, but I am having trouble with class A & B with the ranges. It doesn't appear to format the same way I am used to.

${if flow20 >=1500} hydrant class: AA${/}

${if 1000<= flow20 <=1499} hydrant class: A${/}

${if 500<= flow20 <=999} hydrant class: B${/}

${if flow20 <=499} hydrant class: C${/}

The report template is accepted, and when running reports, it seems that they are grabbing multiple classes regardless of the expression. I think I am missing some formatting.

 

Any help would be greatly appreciated, thanks!

0 Kudos
1 Solution

Accepted Solutions
abureaux
MVP Frequent Contributor

You need to do it like this:

${if flow20>=1000 && flow20<=1499} hydrant class: A${/}

EDIT: For additional logical operators in Feature Reports, check out the table at the bottom of this page.

View solution in original post

2 Replies
abureaux
MVP Frequent Contributor

You need to do it like this:

${if flow20>=1000 && flow20<=1499} hydrant class: A${/}

EDIT: For additional logical operators in Feature Reports, check out the table at the bottom of this page.

BrendonJoyce1
Regular Contributor

@abureaux Thank you, this works as intended. I had tried with "AND" and it didn't work.

 

Much appreciated!

0 Kudos