I'd like to be able to use complex expressions to name my reports.
For example:
| OID | FieldA | FieldB |
| 1 | Squash | |
| 2 | Zucchini | Root |
| 3 | | Flower |
In this case, I want to name the report by both Field A and Field B if they're populated, separated by an underscore. If I use this expression:
${FieldA}_${FieldB}I get the following report names:
- Squash_
- Zucchini_Root
- _Flower
I'd like to use an If() to take care of that formatting if I can, so I don't have a leading underscore.
${if FieldA}${FieldA}_${/}${FieldB}This does not appear to be possible; I tried on my data and got the following error:
An error occurred when generating file name using ${if cse_nr}${cse_nr}_${/}${leg_cse_nr}. Failed to render ${if cse_nr}. [$parse:syntax] Syntax Error: Token 'cse_nr' is an unexpected token at column 4 of the expression [if cse_nr] starting at [cse_nr]. http://errors.angularjs.org/"NG_VERSION_FULL"/$parse/syntax?p0=cse_nr&p1=is%20an%20unexpected%20token&p2=4&p3=if%20cse_nr&p4=cse_nr
Being able to use complex expressions, particularly the IF() expression, would make survey naming a lot easier.