Autocomplete with one column

458
5
Jump to solution
04-13-2023 12:07 PM
EvanDarpini
New Contributor II

I currently have a csv file attached to my survey that lists plant species. I have a select_one plant name with the calculation pulldata('USDA Plant Database common name', 'ScientificName', 'ScientificName', 'enter_name1') and appearance autocomplete

The Csv file contains an enormous amount of choices all from one column called scientific name. I want to avoid puttin each choice in the choices sheet of the Survey file. Is there anyway i can make the choices pulldata from the csv or do the choices have to be input into the survey?

All i want is as field tech input the name suggestions drop down for what they are looking for 

ex: Royal

autopopulates: Royal Palm, Royal Poinciena, ect.

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

My species list is over 60,000 to get all 11 states.  Here is how I do it.

First I break it out by state since different plants may be woody or not for example and to only show plants that would be in that state.  These all go in the media folder.

DougBrowning_0-1681414325783.png

In the form I have a State list that they can pick or it passes in from Field Maps.  I then do a calc field to create the csv name I need.
${SpeciesState} + 'LenticSpeciesList'

Then I use the newer search appearance to grab the correct state list like this in the appearance column.  This loads after they pick a state only so the form loads fast.

autocomplete search(${SpeciesListName}, "matches", "Plants", "Y")

In my CSV I have the code as the name and in the label I have Code   Scientific Name   Common Name (4 spaces in-between each).  This way a crew can search on anything they know and find the right plant.  Code, Scientific, Common are all interchangeable.  Each user knows plants differently so this is great.  

DougBrowning_1-1681414591270.png

Also what is cool if they say know its a willow they can just type willow and it shows them the options for that state.

DougBrowning_2-1681415107484.png

Each state is close to 12,000 in the list and it is lighting fast.

I can also do things like only show them the woody plants

autocomplete search(${SpeciesListName}, 'matches', 'Type', 'Woody')

We only store the code in the data then our backend SDE has a lookup table with all the above if anyone needs it.  This way we can adjust Indicators and all that by state with varying growth habits, etc.

I have species, LPI, Gap, forms and all of that if you want them DM me for the process to share.

Hope that helps it has been a big win for us.  In another project we have smaller lists so I have a image for each choice even.

View solution in original post

5 Replies
EvanDarpini
New Contributor II

okay i just copied the list into two columns no big deal. What i am actually looking for is how to setup and external choice list. I have seen it requires a select_one_from_file questions but that is not fuctioning on my current worksheet

0 Kudos
DougBrowning
MVP Esteemed Contributor

My species list is over 60,000 to get all 11 states.  Here is how I do it.

First I break it out by state since different plants may be woody or not for example and to only show plants that would be in that state.  These all go in the media folder.

DougBrowning_0-1681414325783.png

In the form I have a State list that they can pick or it passes in from Field Maps.  I then do a calc field to create the csv name I need.
${SpeciesState} + 'LenticSpeciesList'

Then I use the newer search appearance to grab the correct state list like this in the appearance column.  This loads after they pick a state only so the form loads fast.

autocomplete search(${SpeciesListName}, "matches", "Plants", "Y")

In my CSV I have the code as the name and in the label I have Code   Scientific Name   Common Name (4 spaces in-between each).  This way a crew can search on anything they know and find the right plant.  Code, Scientific, Common are all interchangeable.  Each user knows plants differently so this is great.  

DougBrowning_1-1681414591270.png

Also what is cool if they say know its a willow they can just type willow and it shows them the options for that state.

DougBrowning_2-1681415107484.png

Each state is close to 12,000 in the list and it is lighting fast.

I can also do things like only show them the woody plants

autocomplete search(${SpeciesListName}, 'matches', 'Type', 'Woody')

We only store the code in the data then our backend SDE has a lookup table with all the above if anyone needs it.  This way we can adjust Indicators and all that by state with varying growth habits, etc.

I have species, LPI, Gap, forms and all of that if you want them DM me for the process to share.

Hope that helps it has been a big win for us.  In another project we have smaller lists so I have a image for each choice even.

EvanDarpini
New Contributor II

I appreciate you so much you are extremely quick with the help and are all over this board. I have one more question. I have it autopoluating the names perfectly. The next question after refers to status. on the csv file i have the status of the plant in the 3rd column next to the names. how do i make my status question autopopulate based on the name typed in the previous answer. please see below for example of csv file. 

AbildgaardiaovataAbildgaardia ovataFW

                     

   

DougBrowning
MVP Esteemed Contributor

You can do a pulldata on that csv.  This is a different form but same way.  Just give it the csv name and the species as the lookup on the name column.  

pulldata("PFCSpeciesList", "StabilityClass", "name", ${Species})

(csvname, column to return, lookup column, lookup value)

0 Kudos
EvanDarpini
New Contributor II

You are the man. Cheers