Displaying data filtered from a list

ListLernin.aia (8.7 KB)

When I click the button, lat and lon are set as variables. I want to filter the list ‘global Master’ to show which location is represented by the ‘global lat/lon’ variables.

With the included csv file, it should return list item 137 - which is the location of my work.

Nothing populates though.

I have not found a search subject that tries to do the same - if there is, thank you for showing me where :slight_smile:!

Here is a sample from Geofences.csv:

stop_id,stop_name,stop_desc,stop_lat,stop_lon,lat_north,lat_south,lon_west,lon_east
FT2,Quachita Tr. & Seneca Tr.,,38.22415,-84.82103,38.22440,38.22390,-84.82128,-84.82078
FT3,Quachita Tr. & Steadmantown Ln,,38.22321,-84.81965,38.22346,38.22296,-84.81990,-84.81940
FT5,Steadmantown Ln. & Powhatan Tr.,,38.22089,-84.81978,38.22114,38.22064,-84.82003,-84.81953
FT9,Steadmantown Ln. & Lakeview Ct.,,38.21636,-84.81868,38.21661,38.21611,-84.81893,-84.81843
FT11,United States Post Office,,38.21603,-84.86510,38.21628,38.21578,-84.86535,-84.86485
FT12,Hall St.,,38.21662,-84.86003,38.21687,38.21637,-84.86028,-84.85978
FT13,Schenkel Ln.,,38.21616,-84.84079,38.21641,38.21591,-84.84104,-84.84054
FT15,Compton Dr.,,38.21335,-84.86418,38.21360,38.21310,-84.86443,-84.86393
FT16,Letcher Ave & Swigert Ave.,,38.21433,-84.85869,38.21458,38.21408,-84.85894,-84.85844
FT17,Schenkel Ln. & Park Hills Apartments,,38.21396,-84.84374,38.21421,38.21371,-84.84399,-84.84349
FT18,Steadmantown Ln. & Park Ave.,,38.21383,-84.81925,38.21408,38.21358,-84.81950,-84.81900

These blocks should return your office label (you should be able to drag these into your project)

1 Like

For fractional values, equality is rare.

You might have to settle for a looser test, involving some small allowable error value,
and test if abs(x1-x2) < error value and
abs(y1-y2) < error value to test if (x1,y2) matches (x2,y2).

1 Like

Looser values I can live with. Definitely going to see if that allows for more consistency in value returns.

Ok, thank you. So my error was using ‘get global Master’ when I should have been using the ‘get item’ from the ‘for each’ block?

Appreciate your answer.

You had more errors than that.

Half of the work of coding is reading, both what others write and what you write.

Understood. I was misunderstanding the purpose of the list - assuming that it was how I identified a row and a column in that row.

I did not know I could put the actual column name in the index, so I could use a text block and make it “stop_id” if I wanted.

That got me running and I have made progress. Thanks for the clarification on the column/row and ‘item’ differentiation.