Select to view content in your preferred language

Survey 123 Report Template - Conditional text styles & geopoints from Image metadata

1468
3
Jump to solution
02-26-2019 02:09 PM
DerrickWestoby1
Deactivated User

Good Afternoon, 

We're just starting to use Survey123 and are really enjoying the simplicity and functionality so far, I just have a couple questions about the docx report template and streamlining future templates. 

1. I have a table with a final column that reads "Client Action Required?", entered as a select_one yes_no question in Survey123.  I want "YES" responses to be in bold,red 16pt font and "NO" responses to be black 12pt font.  

I was able to get this to work by entering this into my report template field: 

${if field_157=="Yes"}${field_157}${/}${if field_157=="No"}${field_157}${/}

This works fine and has the desired effect, but I'm going to have to do a lot more of these in the future and was hoping there's a better way.  I know this isn't correct, but I was thinking something like this: 

${if field_157=="Yes"}<red><b>${field_157}</b></red>${/}${if field_157=="No"}${field_157}${/}

Is there another way to do conditional formatting by response that I'm missing, or should I stick with the first example?

2. Most of my surveys have an OBSERVATIONS repeat that is typically an image, a geopoint and a caption.  (see attached image).  

This works fine when someone is filling out the survey in the field/on-site, but we'd like to be able to fill these out in the browser from the office at times as well.  At those times, I'd like to be able to pull the Lat/Long from the image (cell phone or drone) and use that to generate the maps instead.  Is there a way to generate these maps automatically using the image metadata instead of a geopoint question? 

Thanks for the help!

0 Kudos
1 Solution

Accepted Solutions
DerrickWestoby1
Deactivated User

Fyi, I was able to get #2 working with the following: 

geopoint default: null

geopoint calculation: 

pulldata("@exif", ${image}, "Gpslatitude") + " " + pulldata("@exif", ${image}, "Gpslongitude")

View solution in original post

3 Replies
DerrickWestoby1
Deactivated User

Fyi, I was able to get #2 working with the following: 

geopoint default: null

geopoint calculation: 

pulldata("@exif", ${image}, "Gpslatitude") + " " + pulldata("@exif", ${image}, "Gpslongitude")

DerrickWestoby1
Deactivated User

I guess "working" isn't the right word.  

the above works when testing in Survey123 Connect. 

It does not work:

-In Survey123 on mobile, when selecting the take picture now option

-In Survey123 on mobile, when adding a geotagged photo from the device's gallery

-On desktop, in browser.  

0 Kudos
DerrickWestoby1
Deactivated User

Sorry, I was using the wrong build. It does work.  Marked as answered. 

0 Kudos