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
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!
User | Count |
---|---|
33 | |
29 | |
29 | |
20 | |
18 |