How to simulate instant data checking using emojis

4351
8
09-02-2020 08:26 AM

How to simulate instant data checking using emojis

I have several very long forms where waiting until the end to check data values becomes a issue.  The crew really wanted to know right away if they entered something wrong before they got too far into the form.  

One way was to add inline text warnings using html tags for color.

type  Name                             Label

note CalibrationDateWarning <font color="red" size="4"> Calibration has been over 7 days, please calibrate asap and be critical of very high or low values </font>

With a relevant of 

${CalibrationDate}<date(decimal-date-time(now()) -  7)

But this takes up a lot of space which is esp an issue in grids.

I found a post on using emojis and the ability to now use fields in labels.  These can be combined to provide inline instant checks.

If fully collected then the two numbers should match.

Good

Bad

This small icon is esp useful in grids.

In this case setting up Grid 1 takes a hour.  The crew would not get an error at all until the end of the form, which meant having to go back and re-setup the grids.  Now they know right away if anything was wrong (usually a typo).

Here is how you do it.

For example 1 above

Add a calculate field that holds the check.  An if statement will determine if the value is good or not and returns either the good emoji or bad.  Note you can set esri bind type to null so that this is not in the schema.

type         Name                               Label                              Calc

calculate ReachLengthCheck          ReachLengthCheck       if(${PoolsCollected} = "Fully Collected" and ${PoolReachLength}=${TotalReachLength}, "&#9989;", "&#9940;") 

Then use this field in the label of the question.

type            Name                         Label

decimal      PoolReachLength       Reach Length Surveyed (m) ${ReachLengthCheck}

In the grid example above I got a little more fancy.  I do not want the emojis to show at all until they actually fill out all of the data.

Partial fill does not have emoji

Once all 3 are in then you get the emoji

To do this simply wrap the check in another if to check for empty cells and return blank "".  In this case I can just check true/false on the last column since it will be "" until all values are in.

if(${PoolTailFinesGrid16to512mm},if(${PoolTailFinesGrid1LessThan6mm} < ${PoolTailFinesGrid1LessThan2mm} or ${PoolTailFinesGrid16to512mm} < 0, "&#9940;", "&#9989;"),"")

And again just add this field to the label.
Grid 1 ${Grid1Check}

So far this has been a huge hit for the crew so I thought I would post it.

I still hope that validate by page comes at some point.  Waiting for validate until 200 fields later in the form is a hard one for us.

For a list of emoji codes see here HTML Emoji Reference 

Hope that helps someone.

Comments

Very helpful! Thanks a lot!

Hey Doug, I just used this trick for a project I'm working on. Thanks!

Awesome... Using this ... THANKS!

Hey I was trying to use this more simply with a number range, it would display the stop sign if it exceeded possible values, and when I tried to submit I got this error スクリーンショット 2023-06-13 161207.png

 the code is written in the image but it is: if(${field_14} =<0 or ${field_14} =>5, "&#9940;")

any ideas where I went wrong..?

**I edited it after and deleted the and portion as seen in the image. I get the same error regardless

 

Thank you

Simulating instant data checking using emojis is a creative and user-friendly approach. Emojis can convey information quickly, enhancing user experience and making data validation more engaging and intuitive.

Hi @DougBrowning 

Does this work for the survey123 web app.  I am having trouble to get group labels to format correctly in the web app 

https://community.esri.com/t5/arcgis-survey123-questions/trying-to-format-a-group-label-based-on-yes... 

Any assistance greatly appreciated.

Lachlan

Sorry I have no idea.  

Sorry @FRSadmin just saw this.  

if(${field_14} =<0 or ${field_14} =>5, "&#9940;")   

it is <=  and >= is why.

Great bookmark to have https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm 

Version history
Last update:
‎09-02-2020 08:26 AM
Updated by:
Contributors