Select to view content in your preferred language

Reports: Greater than?

184
4
Jump to solution
4 weeks ago
AlfredBaldenweck
MVP Regular Contributor

I'm sure this is easy, but I'm in a rush so I'd figure I'd ask here.

How do you compare values in a report?

I want to rotate portrait photos.

This is not a valid expression, apparently.

${if genphotos.genimage | getValue: “width” < genphotos.genimage | getValue: “height”}${genphotos.genimage | size: 0:0:0:300 | rotate: 90}

Also, it doesn't tell me that it's invalid until it comes time to print, so...

Thanks!

0 Kudos
1 Solution

Accepted Solutions
AlfredBaldenweck
MVP Regular Contributor

It was totally the parentheses. I've been fighting to get this survey to work at all all day so I kind of panicked when I finally got to the report step and it failed.

Correct syntax:

${if (genphotos.genimage | getValue: “width”) < (genphotos.genimage | getValue: “height”)}${genphotos.genimage | size: 0:0:0:300 | rotate: 90}${/}

Thank you

View solution in original post

4 Replies
ZenMasterZeke
Frequent Contributor

Would the 'if' go in the variable name? Only done minor stuff in reports, but that seems wonky based on what I know about attributes in reports (not much).

0 Kudos
Neal-Kittelson
Frequent Contributor
0 Kudos
AlfredBaldenweck
MVP Regular Contributor

Thanks for the responses, guys.

I have an ${/} at the end. It gives a different error when that is the problem.

if is also supposed to be in there

https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereport-conditionalelements.htm

I agree that the formatting is wonky. The lack of an Else option, for one thing...

 

Reviewing the documentation again, I bet it's that i need to wrap each value in a parenthesis. I'll report back later

 

0 Kudos
AlfredBaldenweck
MVP Regular Contributor

It was totally the parentheses. I've been fighting to get this survey to work at all all day so I kind of panicked when I finally got to the report step and it failed.

Correct syntax:

${if (genphotos.genimage | getValue: “width”) < (genphotos.genimage | getValue: “height”)}${genphotos.genimage | size: 0:0:0:300 | rotate: 90}${/}

Thank you