The incredible disappearing text

Mo’ reports, mo’ problems. I have a report that uses a few ifs statements. Most of the time, for some reason, the last bit doesn’t appear in the resulting report at all, not sure why. Here’s the template for the whole section:

Assessment Status:

Last Assessment: <<ifs([Current Level]=1,[Level 1 Assessment].[date],[Current Level]=2,[Level 2 Assessment].[date],[Current Level]=3,[Level 3 Assessment].[date])>>

Next Assessment Due: <<ifs

(and([Current Level]=1,isblank([Last Assessment Date])),[Program Start Date]+30,

and([Current Level]=2,isblank([Last Assessment Date])),[L1 Assessment Linked].[date]+62,

and([Current Level]=3,isblank([Last Assessment Date])),[L2 Assessment Linked].[date]+62,

True,

[Last Assessment Date]+62

)>>

Date Scheduled: <<[Actual Scheduled Date]>> <<if: OR([Actual Scheduled Date]<[Last Assessment Date],[Actual Scheduled Date]<today())>>

Please schedule a new assessment date in the TTS system or contact your area’s Trainer.<<endif>>

The last section that starts with “Date Scheduled” is sometimes missing from the report entirely, and it should at least say “Date Scheduled: (whatever the date is)”. Do I need an endifs in there somewhere? There is an endif at the very end, it just won’t show up on my post. I haven’t found any documentation on using ifs in a template. Other than that, it works a dream. Thanks!

Solved Solved
0 6 171
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

My understanding (which may be incomplete) is that template tags may not be split across lines; i.e., the tag’s << and >> must be on the same line. That makes long expressions ugly and difficult to read, but I believe it is a requirement.

Assessment Status:

Last Assessment: <<ifs([Current Level]=1,[Level 1 Assessment].[date],[Current Level]=2,[Level 2 Assessment].[date],[Current Level]=3,[Level 3 Assessment].[date])>>

Next Assessment Due: <<ifs(and([Current Level]=1,isblank([Last Assessment Date])),[Program Start Date]+30, and([Current Level]=2,isblank([Last Assessment Date])),[L1 Assessment Linked].[date]+62, and([Current Level]=3,isblank([Last Assessment Date])),[L2 Assessment Linked].[date]+62, True, [Last Assessment Date]+62)>>

Date Scheduled: <<[Actual Scheduled Date]>> <<if: OR([Actual Scheduled Date]<[Last Assessment Date],[Actual Scheduled Date]<today())>>

Please schedule a new assessment date in the TTS system or contact your area’s Trainer.<<endif>>

View solution in original post

6 REPLIES 6
Top Labels in this Space