Can Lasso take action on a global field in FMPro?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Can Lasso take action on a global field in FMPro?

Keith M. Rettig
Sorry to ask such a newbie question, but I am trying to learn 9 so I suppose I am (3.65 user for many many years).

I am trying to do a zip code search for our locations.
I have a table 'locations' that has a few global fields; 'g_postalcode', 'g_lat', 'g_long' and  a normal calculation field 'zip_distance'
When I update 'g_postalcode' in FmPro, it works perfectly by looking up that zip code and finding the lat and long and using the fixed lat and long for each location then calculates the 'zip_distance' for every record (the calc references the global fields and is a Let function).

I can update any of the regular fields in my database; so it would seem I am doing the update correctly.
I don't seem to be able to update the global field  'g_postalcode'  though.


Related to this is that I am trying to do a search (after the update above that is currently failing; but I fixed the 'g_postalcode' in the database by hand and it still fails) on the field 'zip_distance'.

[inline( -database='mydb', -table='locations', 'status'='1', -sortfield='city', -Operator='LTE', 'zip_distance'='15', -maxRecords=10,  -search )]
This returns zero records.  I am expecting to get 3 records that zip_distance is less than or equal to 15 based on the  'g_postalcode'  that I set by hand.
It is clearly something with the -op parameter because the result from [Action_Statement] doesn't have -op in it.

If I do
[inline( -database='mydb', -table='locations', 'status'='1', -sortfield='city', -maxRecords=10,  -search )]
I get 10 records and the value for 'zip_distance' is calculated from 0 and 'g_postalcode ' is blank for all ten records returned.


I can get calc fields [via Lasso] that don't reference global fields, so it would seem Lasso can't touch anything related to a global field; is this true?

Many thanks,
Keith.
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Can Lasso take action on a global field in FMPro?

Johan Solve
What version of FileMaker?
For FM 7 and later where Lasso communicates through FM Server,
FileMaker globals are unique for each FM session.

For earlier FM versions, only the FM client that Lasso communicates
with shares the value of the FM global with Lasso.


2011/11/28 Keith Rettig <[hidden email]>:

> Sorry to ask such a newbie question, but I am trying to learn 9 so I suppose I am (3.65 user for many many years).
>
> I am trying to do a zip code search for our locations.
> I have a table 'locations' that has a few global fields; 'g_postalcode', 'g_lat', 'g_long' and  a normal calculation field 'zip_distance'
> When I update 'g_postalcode' in FmPro, it works perfectly by looking up that zip code and finding the lat and long and using the fixed lat and long for each location then calculates the 'zip_distance' for every record (the calc references the global fields and is a Let function).
>
> I can update any of the regular fields in my database; so it would seem I am doing the update correctly.
> I don't seem to be able to update the global field  'g_postalcode'  though.
>
>
> Related to this is that I am trying to do a search (after the update above that is currently failing; but I fixed the 'g_postalcode' in the database by hand and it still fails) on the field 'zip_distance'.
>
> [inline( -database='mydb', -table='locations', 'status'='1', -sortfield='city', -Operator='LTE', 'zip_distance'='15', -maxRecords=10,  -search )]
> This returns zero records.  I am expecting to get 3 records that zip_distance is less than or equal to 15 based on the  'g_postalcode'  that I set by hand.
> It is clearly something with the -op parameter because the result from [Action_Statement] doesn't have -op in it.
>
> If I do
> [inline( -database='mydb', -table='locations', 'status'='1', -sortfield='city', -maxRecords=10,  -search )]
> I get 10 records and the value for 'zip_distance' is calculated from 0 and 'g_postalcode ' is blank for all ten records returned.
>
>
> I can get calc fields [via Lasso] that don't reference global fields, so it would seem Lasso can't touch anything related to a global field; is this true?
>
> Many thanks,
> Keith.
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>



--
Mvh
Johan Sölve
____________________________________
Montania System AB
Halmstad   Stockholm
http://www.montania.se

Johan Sölve
Mobil +46 709-51 55 70
[hidden email]

Kristinebergsvägen 17, S-302 41 Halmstad, Sweden
Telefon +46 35-136800 |  Fax +46 35-136801
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Can Lasso take action on a global field in FMPro?

stevepiercy
There may be an alternative method to get what you want.  I have
an old crufty distance calculator between two ZIP codes.  I
assume you could reverse engineer the calculation I used to
determine the lat/long of a destination given an origin and
distance.  Demo and download:
http://www.stevepiercy.com/lasso_stuff/zipdist/distance.lasso

--steve


On 11/29/11 at 1:40 PM, [hidden email] (Johan Solve) pronounced:

>What version of FileMaker?
>For FM 7 and later where Lasso communicates through FM Server,
>FileMaker globals are unique for each FM session.
>
>For earlier FM versions, only the FM client that Lasso communicates
>with shares the value of the FM global with Lasso.
>
>
>2011/11/28 Keith Rettig <[hidden email]>:
>>Sorry to ask such a newbie question, but I am trying to learn 9 so I suppose I am (3.65 user
>for many many years).
>>
>>I am trying to do a zip code search for our locations.
>>I have a table 'locations' that has a few global fields; 'g_postalcode', 'g_lat', 'g_long'
>and  a normal calculation field 'zip_distance'
>>When I update 'g_postalcode' in FmPro, it works perfectly by looking up that zip code and
>finding the lat and long and using the fixed lat and long for
>each location then calculates the 'zip_distance' for every
>record (the calc references the global fields and is a Let function).
>>
>>I can update any of the regular fields in my database; so it would seem I am doing the
>update correctly.
>>I don't seem to be able to update the global field  'g_postalcode'  though.
>>
>>
>>Related to this is that I am trying to do a search (after the update above that is currently
>failing; but I fixed the 'g_postalcode' in the database by hand
>and it still fails) on the field 'zip_distance'.
>>
>>[inline( -database='mydb', -table='locations', 'status'='1', -sortfield='city',
>-Operator='LTE', 'zip_distance'='15', -maxRecords=10,  -search )]
>>This returns zero records.  I am expecting to get 3 records that zip_distance is less than
>or equal to 15 based on the  'g_postalcode'  that I set by hand.
>>It is clearly something with the -op parameter because the result from [Action_Statement]
>doesn't have -op in it.
>>
>>If I do
>>[inline( -database='mydb', -table='locations', 'status'='1', -sortfield='city',
>-maxRecords=10,  -search )]
>>I get 10 records and the value for 'zip_distance' is calculated from 0 and 'g_postalcode '
>is blank for all ten records returned.
>>
>>
>>I can get calc fields [via Lasso] that don't reference global fields, so it would seem Lasso
>can't touch anything related to a global field; is this true?
>>
>>Many thanks,
>>Keith.
>>#############################################################
>>This message is sent to you because you are subscribed to
>> the mailing list Lasso
>>[hidden email]
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>