Im wondering if it is possible to make apps, or atleast certain actions only work in a certain location? like a 1km radial (eg, around Work only)
Solved! Go to Solution.
Sure can, check out DISTANCE() and other related results:
https://help.appsheet.com/en/?q=distance
So you could do something like this:
DISTANCE([HERE(), [LatLong_Column]) <= 1
Sure can, check out DISTANCE() and other related results:
https://help.appsheet.com/en/?q=distance
So you could do something like this:
DISTANCE([HERE(), [LatLong_Column]) <= 1
Its worth noting that any devices latlong can be spoofed via third party applications on the device itself or even when running it in chrome with chrome dev tools.
Thanks for the tip. This will circumvent 95% of the problems, but good to keep in mind for those tech savvy people out there
Should this work?
DISTANCE(HERE(), โ13.993581โ, โ-40.555116โ) <= 1
I donโt want to have to make a column for this, just hardcode it.
Its saying I have invalid inputs,
Nope. DISTANCE() takes two arguments, not three. Both arguments must be of type LatLong. The LATLONG() function may be used to construct a LatLong value from individual latitude and longitude values:
DISTANCE(HERE(), LATLONG(13.993581, -40.555116))
See also:
Ok,
So using this to either show or not show an action
if(Context("Host")<>Browser,
IF(USEREMAIL() = "an email", "true",
IF(USEREMAIL() = "an email","true",
DISTANCE(HERE(), LatLong("41.945583", "-43.812112")) <= 1)),"true")
Its saying its needs something that either returns true of false,
Is the above expression not doing just that?
There are 2 users who need to be able to use the app wherever, also assuming this does ant work with browsers
If youโve got more than one of anything, consider using a list instead. You could try:
and(
Context(โHostโ) <> โBrowserโ,
if(in(USEREMAIL(), LIST(โEmail1โ, โEmail2โ)),
true,
DISTANCE(HERE(), LatLong(โ41.945583โ, โ-43.812112โ)) <= 1)
)
Strange,
IDK why its working now?? I would like to know.
I did change the and to or so the formula is exactly the same just a list instead?
or(
Context(โHostโ) <> โBrowserโ,
if(in(USEREMAIL(), LIST(โEmail1โ, โEmail2โ)),
true,
DISTANCE(HERE(), LatLong(โ41.945583โ, โ-43.812112โ)) <= 1)
)
The major difference between OR and AND in this instance is the following:
When I said:
AND(
Context(โHostโ) <> โBrowserโ,
if(....
Iโm saying, the host cannot be a browser AND whatever the IF says.
The if part:
...if(in(USEREMAIL(), LIST(โEmail1โ, โEmail2โ)),
true,
DISTANCE(HERE(), LatLong(โ41.945583โ, โ-43.812112โ)) <= 1)
)
Here Iโm saying:
User | Count |
---|---|
61 | |
25 | |
14 | |
11 | |
6 |