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

Question about templates

Featured Replies

Hi all

I'm trying to understand the way some templates of FMP 7 work, e.g. "Resource Scheduling.fp7" or "Task Management.fp7". In these files, I see in almost every table, a field named "one", calculated, value = 1 and also relations based on that field. I understand that it always, in every row of every table that contains it, it equal to 1. Can anybody explain what is this field? Why and how it is used and what we can wait from a relation between two tables based on a field like that?

Thanks for your time

NLo

I use Constant=1 all the time IN 6. It's most often used to do such things as pass values between a field in a file and a global field in another via a "Constant1" relationship (though any relationship can be used to do this). This could be:

Set Field ["local field", "Constant1::global field"] or

(targetting other file)

Set Field ["Constant1::global field", "local field"], or

Set Field ["local global field", "Constant1::global field"]

Its other use is to reference all values (all records) via a relationship, such as to show all records from another file in a portal. It would have to be file with only a few records for this to make much sense.

The reason I say "IN 6" is because you don't need a Constant relationship to pass a value to or from a global in 7. You can use a simple Table Occurrence (TO) of the other table or file (the latter requiring a File Reference). You can use just the TO much like a Constant1 relationship, for referencing a global (since a global value is shared by All records in its table, or TO).

I'm thinking that they have not truly optimized them for 7. I've seen that in their other free templates.

The Constant1 doesn't hurt anything. It's not not always necessary anymore. Of course, before deleting it you'd have to go through all its occurrences and convert them; which is why they didn't.

OK. I looked at the Task Management file. There are 2 "One" TO's, down next to the Assignments table, Contacts One and Tasks One. I do not see them used on Layouts. I see them used in the Create New Assignment script (bottom one).

In both cases it's unnecessary.

Set Field [ Assigments::Contact ID,Contacts One::Global Contact ID ]

could just as easily be,

Set Field [ Assigments::Contact ID,Contacts::Global Contact ID ]

You can use the plain Contacts TO; the Contacts One TO and its relationship is superfluous (I didn't see any other occurrence of it; but I may have missed it). Perhaps it's easier for beginners to see the relationship. But I don't think that's the reason it's there. I'm afraid it's because FileMaker didn't take the time to optimize their templates.

There's no harm done. Both ways work. But the Relationship graph is cluttered enough without these vestigial Constant relationships, IMHO.

  • Author

Hi Fenton,

Thanks alot for your reply, it made me to learn something.

NLo

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.