If then else in reports?

Does the code for report templates offer an “if, then, else” type structure? I have 600+ report items that I need to turn green if they have “Yes” or “Proficient” as the data, or red if not (there are up to three possible “other” responses). The code to accomplish this is taking forever. I’d love it to be able to do something like:
IF(OR([_THIS]=Proficient, [_THIS]=Yes), turn it green!, turn it red!)

But I’m assuming that would be waaaay too simple (and impossible) in a report. I’d settle for an If, then, else statement just to eliminate the need to code for every single possibility when it should be red.

Thanks in advance!

0 7 498
7 REPLIES 7

I read that before, I didn’t see an “else”… Is that not possible?

Nope. Just construct another IF for the possible ELSE.

That’s what I was afraid of, it’s just extremely time-consuming. But I get it, this is basically a “markup language” at this point.

It totally depends how you construct your workflow template. Template IF expressions are used to show/hide certain workflow data. Thus there’s no need for an ELSE expression because IF your workflow will be using the same table/data structure for the ELSE condition, than you can already create a re-direction to a different data set using an IFS expression within the <<Start>> expression. That said; I believe there’s no need or room for the ELSE expression in a template. IF there is/are other option(s), than it can be defined easily by addtional IF expression(s).

Thanks for your help! I’ll just throw out that an ELSE would be helpful because it allows for the handling of “exceptions” and also to not require explicit coding for every possible eventuality. For example, in my case, I have five possible outcomes, two of which I deal with one way, three another. I could use an IF(OR()) for the first two, then an “ELSE” for the remaining three without having to write code dealing with each of them explicitly. Just a thought for a future update if that would be possible.

Depending on the evaluation criteria, you can use IFS() or SWITCH() expressions within the START expression and thus eliminate the use of template IF. I don’t have an idea about your app, data, table and/or template structure, thus just brainstorming.

Top Labels in this Space