Select to view content in your preferred language

getRecord troubleshooting

494
2
Jump to solution
05-12-2023 08:12 AM
bsklaohfl
Regular Contributor

Hi everyone,

 

I have been having issues getting my JSON to populate with the last record. Basically, once the user selects Station_Name, I would like the previous record to pull up. Could someone please review my XLS? Thank you!

0 Kudos
1 Solution

Accepted Solutions
BarbaraWebster1
Esri Regular Contributor

Hi @bsklaohfl,

It looks like the problem is in the where clause. Try changing

concat("Station Name=",${Station_Name},"'")

to

concat("Station_Name='",${Station_Name},"'")


The field name has an underscore in the feature layer, and there also needs to be a single quote before the double quote so the value for ${Station_Name} will be wrapped in single quotes.

Thanks,
-Barbara

View solution in original post

2 Replies
BarbaraWebster1
Esri Regular Contributor

Hi @bsklaohfl,

It looks like the problem is in the where clause. Try changing

concat("Station Name=",${Station_Name},"'")

to

concat("Station_Name='",${Station_Name},"'")


The field name has an underscore in the feature layer, and there also needs to be a single quote before the double quote so the value for ${Station_Name} will be wrapped in single quotes.

Thanks,
-Barbara

bsklaohfl
Regular Contributor

Barbara,

THANK YOU A BILLION. This worked! Wonderful!

Brooke