• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

Filemaker statuscurrentfilesopen??

I am making a copy of a solution in filemaker and I want my user to open them all up but i am restricted to 50 databsaes.  Is there a way for a script to detect how many databases are currently running in FM6.  That way if it's getting high I can auto close the oldest one they have open?
0
mrsam3
Asked:
mrsam3
  • 3
  • 2
1 Solution
 
lesouefCommented:
what you can do, is get the open files list in a global field using BASENAMES, then count the amount of returns in the field taking into account that the last one won't have any return. But this counts the amount of files opened by the local fm, not for all users together. Still suitable?
the remaining problem is to find out what is the oldest one: for the current user, the oldest file is at the end of the list, but this may be different for other users at the same time...
0
 
JoJohn2004Commented:
I think lesouef meant the function DatabaseNames. You can also use ValueCount on the resulting list to find out how many there are. The RightValue (databaseNames;1)function will get the last one for you.
0
 
lesouefCommented:
JJ thinks correctly about what I think! sorry JJ, my fm6 is french only, so translating is always a bit risky.
And ValueCount in fm6 reports the way the field is formatted in a given layout, so this maybe different from the amount of lines in the list. (note this is different in fm8, this is why I am counting returns)
0
 
JoJohn2004Commented:
Hmm FM6, so long ago! :) I believe, though, that you are right lesouef. RightValues() and ValueCount() were not available in FM6. You are stuck with counting carriage returns.
0
 
lesouefCommented:
there is something which could be ValueCount,  fr=ETAT ( NombreValeur ) but this is definitly what I described above in fm6.
And if you convert to fm7, it becomes Get(ActiveRepetitionNumber), which is quite different because the active repetition number is not necessarily the amount of repetitions available on the layout.
Now you can understand why some people are very reluctant to migrate their fm6 databases!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now