POST
|
Well, good find on your part! That's definitely interesting that it references the label - and a smart move on your part to make sure it would always work. I've normally had my labels and names separate so I don't get them mixed up in other instances, but I may just have to keep them identical to keep this from happening in the future.
... View more
07-22-2019
11:57 AM
|
2
|
2
|
367
|
POST
|
That worked! Odd, though, that it uses the label name and not the data field, I had anticipated it working the other way around. Good to know for the future, though! Thank you so much for your help! Marlene McGraw
... View more
07-22-2019
11:49 AM
|
1
|
0
|
1620
|
POST
|
Good thought there; I have all the names in lowercase, so I don't think that's the problem. Marlene McGraw
... View more
07-22-2019
09:54 AM
|
0
|
6
|
1620
|
POST
|
Hey Christopher! I appreciate you taking the time to give this a look. My photo_type is inside the repeat; you can see that in the image I attached to my original question, but I've also attached it here for convenience, alongside a screenshot of the report template and then the generated report (I switched the size just in case that had any effect, but it didn't appear to). You mentioned that folks select the type first...I wonder if the type coming after the photos might affect the ability to filter? I may fiddle with the excel sheet and see if that has any effect. Edit: Tried flipping the two of them, no effect on the photos. Marlene McGraw
... View more
07-22-2019
08:48 AM
|
0
|
8
|
1620
|
POST
|
Hey Jim! Thanks for getting back to me; I just tried your fix. A couple of interesting things have cropped up. I recreated a fake survey - same keywords, pretty much identical to the old ones I made - but it appears, at the moment, that both my previous code and your suggestion aren't actually printing out any photos. I've confirmed that the photo_type values are present (they show up properly in this format: ${photo_type | selected:"overall"} Overall) and all of the photos and photo_types show up properly without the if statement, of course, but nothing shows up within the if statement at the moment. Since I put up the ask, I moved the photoRepeat further up in the survey but have otherwise not altered its name or content. Not sure what's causing the change...if you've got any thoughts, I'd appreciate them! Thanks, Marlene McGraw
... View more
07-22-2019
07:27 AM
|
0
|
10
|
1620
|
POST
|
Hello, I'm looking to filter photos taken in the field and selectively put some of them into a report. Right now, photos are acquired in a repeat, and a select_one question also in the repeat has the user select from a few different types (overall, problem, and extra). See the photo below for a look at what's going on in excel. I've filled out a fake survey with three pictures that are "labeled" with the select_one question, one for each category in the same order as listed. In the report template at the moment, I'm trying to get just the photo that was labeled "overall" to show up. Code is as below: ${#photoRepeat} ${if ((photo_type) == “overall”)} ${photo|size:466.9:350} ${/} ${/photoRepeat} No errors, but no matter what category the if statement is looking for it will print out all three photos. When it first printed all three, it was looking for the "overall" category, which was with the first picture. I tried changing the category to "extra" (the last picture) but still got all three photos, so it almost seems to me like the "${photo|size:466.9:350}" line is just spitting all three photos out. I'd love some thoughts on whether this endeavor is possible / where I'm going wrong if it is. Thanks! Marlene McGraw EDIT: I'm going to put the solution here just so it's all clear if anyone needs to reference this in the future; for checking these values, you actually need to see if it matches the label name, not the data field name. In this case, my data field name was "overall" vs my label "Overall", so the capitalized version worked. Jim Moore also made a great point that my syntax here is wrong too - you'd want it to look like so: ${if photo_type == "Overall"}.
... View more
06-19-2019
02:16 PM
|
0
|
12
|
2523
|
Title | Kudos | Posted |
---|---|---|
2 | 07-22-2019 11:57 AM | |
1 | 07-22-2019 11:49 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|