Choice filter not working in Survey123 Connect v3.12.230

1499
4
Jump to solution
03-03-2021 07:22 PM
by Anonymous User
Not applicable

Re-posted from this comment on What's new in ArcGIS Survey123 9 February 2021) blog post

I'm seeing some unexpected behaviour using Survey123 Connect v3.12.230 and Survey123 on Android v3.12.274 with select_one questions with choice filters (bold red in below example).

When a choice filter is present the select_one selection lists won't display.

This isn't an issue in Connect v3.11.123 or Android v3.11.164.

type

name

label

required

required_message

appearance

default

readonly

relevant

calculation

choice_filter

bind::esri:fieldType

bind::esri:fieldLength

text

ASSNBRI

Asset #.

    

yes

   

esriFieldTypeString

40

hidden

raise

Value can be used in field

   

y

    

null

 

select_one classification1

CLASSIFICATION1

Utility:

yes

 

minimal

 

if(string-length(${ASSNBRI}) = '0', '', 'yes')

  

${raise} = RAISE

esriFieldTypeString

40

select_one classification2

CLASSIFICATION2

Asset Class:

yes

 

minimal

 

if(string-length(${ASSNBRI}) = '0', '', 'yes')

  

${CLASSIFICATION1} = CLASSIFICATION1 and ${raise} = RAISE

esriFieldTypeString

40

select_one classification3

CLASSIFICATION3

Asset Type:

yes

 

minimal

 

if(string-length(${ASSNBRI}) = '0', '', 'yes')

  

${CLASSIFICATION1} = CLASSIFICATION1 and ${CLASSIFICATION2} = CLASSIFICATION2 and ${raise} = RAISE

esriFieldTypeString

40

 

I tried changing the format of these expressions to the below, but this has no effect.

                selected(${raise}, RAISE)

                selected(${CLASSIFICATION1}, CLASSIFICATION1) and selected(${raise}, RAISE)

                selected(${CLASSIFICATION1}, CLASSIFICATION1) and selected(${CLASSIFICATION2}, CLASSIFICATION2) and selected(${raise}, RAISE)

 

Choices:

list_name

name

label

CLASSIFICATION1

CLASSIFICATION2

CLASSIFICATION3

RAISE

classification1

Stormwater

Stormwater

   

y

classification1

Wastewater

Wastewater

   

y

classification1

Water Supply

Water Supply

   

y

       

classification2

Bore

Bore

Stormwater

  

y

classification2

Chamber

Chamber

Stormwater

  

y

classification2

Channel

Channel

Stormwater

  

y

classification2

Control System

Control System

Stormwater

  

y

classification2

Electrical

Electrical

Stormwater

  

y

classification2

Filter

Filter

Stormwater

  

y

 

 

 

 

 

 

 

 

1 Solution

Accepted Solutions
by Anonymous User
Not applicable

@JohnPlunkett @ Eagle Technology spotted the problem.

BUG-000137897 Cascading select does not work in ArcGIS Survey123 3.12 if a field used as the choice filter has a name which is listed as a reserved keyword for SQLite.

My survey was using the keyword RAISE, changing this to ACTIVE resolved the problem.

 

View solution in original post

4 Replies
DougBrowning
MVP Notable Contributor

I have seen weird things happen when the list name and field name are the same.  Change to like ClassificationList or something.  For Raise I would put "y" in the calculation vs default - defaults do not always work.

My choice filters I all wrote the opposite, not sure that matters but I have RAISE = ${raise}

These are just guesses though since you said this worked before.  Hope it helps

Another with the same issue?

https://community.esri.com/t5/arcgis-survey123-questions/select-one-from-csv-field-empty-on-iphone/m... 

0 Kudos
by Anonymous User
Not applicable

Thanks for these suggestions, unfortunately no change though.

This is a survey that's been in use for over a year now, it's functional with versions 3.5 to 3.11.

by Anonymous User
Not applicable

@JohnPlunkett @ Eagle Technology spotted the problem.

BUG-000137897 Cascading select does not work in ArcGIS Survey123 3.12 if a field used as the choice filter has a name which is listed as a reserved keyword for SQLite.

My survey was using the keyword RAISE, changing this to ACTIVE resolved the problem.

 

SolanaFoo2
New Contributor III

Thank you for posting!  Racking my brain all night on this.

0 Kudos