Hello all,
I have a Field Maps form and have 2 fields.
Field 1: Tree Species Code (SPECIESCOD)
Field 2: Botanical Name (BOTANICAL)
in a same form, after the user enter Field 1 (Species Code), can Field 2 (Botanical name) auto-populate based on a table in the same webmap?
SPC_CODE | BOTANICAL |
ABBR | Abies bracteata |
ABCI | Abies cilicica |
ABCO | Abies concolor |
ABGR | Abies grandis |
ABPI | Abies pinsapo |
Field 1: user enter ABBR
Field 2: will go to the table and look up ABBR , then the form will auto-populate "Abies bracteata"
(the table is a standalone table in the web map, and it's not join or relate w/ the layer with the form in Field Maps. I saw many sample with using relate table in arcade, how about a standalone table, is it possible? any tips or sample on setting it up in Arcade?
i have this in Arcade, but it gave me an error:
thanks so much!!
W
Solved! Go to Solution.
This seems to be working. Stand alone table, but, added to the map.
var SpeciesCode = $feature.Species
var table = FeatureSetByName($map, "TreeTable",['SPC_CODE', 'BOTANICAL'])
var filteredTable = Filter(table, "SPC_CODE = @SpeciesCode")
var result = First(filteredTable)
if(!IsEmpty(result)){
return result.BOTANICAL
}
May have to adjust the field names.
R_
This seems to be working. Stand alone table, but, added to the map.
var SpeciesCode = $feature.Species
var table = FeatureSetByName($map, "TreeTable",['SPC_CODE', 'BOTANICAL'])
var filteredTable = Filter(table, "SPC_CODE = @SpeciesCode")
var result = First(filteredTable)
if(!IsEmpty(result)){
return result.BOTANICAL
}
May have to adjust the field names.
R_
it works!!! thanks a lot!!!!!
🙏
Hello all,
I am new to Arcade/Field Maps but I am trying to do something similar except with Field 1 named "Common_Name" and Field 2 named "Botanical_Name". The table is uploaded to the same map. The table is titled "TreeNamesTable", common names are stored in the "nCommon" column while the botanical names are stored in the "nBotanical" column. I copied the solution provided above, changing the field names as appropriate, yet I am getting the following error, "Test execution error: Execution error - Invalid parameter. Verify test data." Can either one of you assist me? I have attached the code below. Thank you in advance for your assistance.