Jump to content

This topic is 7333 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a working fx.php/FileMaker 7 solutions which is connected and queries correctly. I have been able to edit a few fields in the database, but have been unable to edit a global field.

Is there a way to edit a global field with FX.php?

Thanks,

Wesley

  • 2 weeks later...
Posted

I haven't been able to get globals to work with the web either. My theory is that globals are unique to each user. But regular web sessions are stateless. That is, the server doesn't know which user it is serving to. Hence global variables choke. I've had to come up with some creative work-arounds to mimic global behavior using non-global variables.

Posted

Dan,

Would you mind sharing some of these work arounds, I am risking losing 2 clients because of this. I cannot ask them to rewrite their solution without globals just to satisfy my needs. I looked at the other FX.php forum, and it seems as if they are having the same problem. Any help would be GREATLY, and I mean GREATLY appreciated.

Cheers Wes

Posted

Table:customers

text field-name

textfield-email

textfield scope

Table:pref

text field-code

text field-email

text(global) - criteria

relationships:

email=email

scope = (global) criteria

layout:main(based on customers)

text field-name

pref::textfield-code

That is the basic setup. two tables one customers with the three text fields and a preference table with the unique code,email and a global field.

The relationship between the table is shown as above customer::email=pref::email AND customer::scope !=(notequal) pref::criteria

A layout based on the customers table displaying the text field name and the code from the preference table. If say for arguments sake scope = flies and criteria = drives, the relationship wouldn't be valid and no found set shoudl be returned. If i perform a find on (textfield code on the layout)in the filemaker database itself, it was perfectly.but when i use a simple FMFind() it does return me a record matching when it really shouldn't

Now i am wondering if it is the Global field that is playing a villian.

Can anybody clarify this to me?

thangyuh thangyuh vurry mush again

  • 2 weeks later...
Posted

This is the way globals have worked on hosted solutions forever. A "default" may be set if the files are opened offline, and then individual clients can set other values specific to their "session" when the files are subsequently hosted client-server. In the client-server world, this is actually a great and convenient way of doing things, and very useful to the developer. But the web access is creating a new "session" with FileMaker every time, and gets the default values every time. Welcome to the stateless world of the web.

My solution to this problem when using the web is to store the user's globals somewhere else, or rethink your business logic to not use globals. If you want to store a particular web user's preferences or something, can use session variables as others have pointed out. For a more persistent globals, you could write them in a separate table (each user gets a record) or store them as cookies.

This topic is 7333 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.