Lookup issue

I have a column GPS Location in a Reporting table, which is type latlong. Normally reporters tap the spinner to get their current location. But for the location type, โ€œAdmin Facilityโ€, all the locations are buildings where latlong locations are known. For these Iโ€™ve entered each buildingโ€™s latlong in table โ€œLocation Typeโ€. The column โ€œNameโ€ are names of various building names. A third column is โ€œGPS Locationโ€ (Iโ€™ve tried type text and latlong), with a latlong value for each Name.

In case user enters a Name that is an Admin Facility I want to lookup the GPS location and enter it in GPS Location. But the following expression doesnโ€™t work as an app formula or as an initial value.

ANY(SELECT(Location Type[GPS Location], [Name] = [_THISROW].[Name]))

Iโ€™m hoping someone can sort me out.

Thanks
Bob

0 5 428
5 REPLIES 5

May I ask it doesnโ€™t work in what way?

Sorry about missing the main point. The expression results in no entry in the GSheet database.

Bob

Does it give you the location when filling a new or updating existing record?

Aleksi
I figured out the problem. I was referencing [_THISROW].[Name] where Name is the column in the child table. The correct name is from the parent table: [_THISROW].[1st Trail Name]. I also added the IF statement with HERE() to give latlong when Location Type is not Admin Facility. Thanks!

IF([Location Type] = โ€œAdmin Facilityโ€,
ANY(SELECT(Location Type[GPS Location], [Name] = [_THISROW].[1st Trail Name])), HERE())

Glad you were able to find the reason!

Top Labels in this Space