Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FX.php and Global Fields

Featured Replies

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

Is the Global Field on the named Layout?

Garry

  • Author

Yes, it is on the layout. I even tried a regular text field that was working and changed that to global storage and that no longer worked.

Thanks,

Wesley

  • 2 weeks later...

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.

  • Author

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

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...

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.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.