locking GPS coordinates

Discussions about CSEntry
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: locking GPS coordinates

Post by jfigueroa »

I know it could be a bit late, but also for everyone who needs it, you can use the demode() function.

For ex:

Code: Select all

if demode() = 1 then
      if gps(open)and gps(read, 60) then
          LAT=gps(latitude);
          LON=gps(longitude);
      endif;
      gps(close);
endif;
That means that it would only ask for gps read when you are in add mode, (to input new cases).
If you are in modify or verify mode, it will doesn´t ask for it. So the value wont change on that cases.

Regards to everyone.
Joshua Figueroa.
Last edited by jfigueroa on February 24th, 2016, 12:40 pm, edited 1 time in total.
rcovane
Posts: 26
Joined: August 18th, 2015, 6:45 am

Re: locking GPS coordinates

Post by rcovane »

That code is not working for me, what am I doing wrong? It shows this error "ERROR: Invalid character expression near line 17 in COORDENADAS procedure".

Code: Select all

if visualvalue(LATITUDE) = notappl and COORDENADAS=1 then
  if gps(open) and gps(read, 60) then
    LATITUDE=gps(latitude);
    LONGITUDE=gps(longitude);
  endif;
  gps(close);
endif;
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: locking GPS coordinates

Post by josh »

That is a syntax error. Check that the variables that you use on line 17 are valid variable names and are spelled correctly.
Post Reply