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.

Last function (find last valid entry in a repeating field)

Featured Replies

  • Newbies

I am trying to use the Last function in filemaker V8.5 Mac. I have a repeating field which records timesheets and I want to run a script which will find the next blank (available) repetition in that repeating field.

I have looked up the help menu, and followed what they have said:

Go to Field[select/perform;DATABASENAME::FIELDNAME[Last(DATABASENAME::FIELDNAME)]]

It doesn't seem to work - it does nothing.

Any ideas?

Do you want to go to the last repetition or just know the last repetition number?

The Last() function returns the VALUE that is in the last repetition. In your example, if the field contained values 15 ; 6 ; 9 the step would go to repetition #9.

You could use the Count() function (if there are no blank entries in-between), or a loop to get the next blank repetition, but it is awkward. This is just one of many reasons to use a portal instead.

  • Author
  • Newbies

I want to go to the last field which has an entry. (then I will add in a function to go to the next field, which would be the next blank field)

I have a repeating field which records timesheets and I want to run a script which will find the next blank (available) repetition in that repeating field

Justify the use of repeaters - why is a relational approach ignored here??

--sd

Hi

give a look at this custom function

Not having the Advanced version, you can create a script based on the logic of that custom function.

Solving this problem is pointless; you need to redesign to use a proper relational structure. Then the problem goes away, and you have a better design.

Bruce we are quite like the two geezers in the balcony in the Muppet Show, what could be even more interesting is to know why Daniele persuits such angles at all. His approach trespasses the fine line where repeaters are used for utility purposes only, into dealings with user entered data - without as much as cautioning the developer that the approach is daft.

What the questioner to this thread probably are in need of is instead to scrutinize these two templates:

http://www.filemakerpros.com/CALBASIC.sit

(where you need to localize the cMonth calc' if you default language isn't english)

...and:

http://www.nightwing.com.au/FileMaker/demos7/demo705.html

--sd

His approach trespasses the fine line where repeaters are used for utility purposes only, into dealings with user entered data - without as much as cautioning the developer that the approach is daft.

Pardon !

I'm soooo in love with repeaters ;)

As much as we can criticize the use of repeating fields (i personally can't stand them for data storage), we can only guess based on the facts given what they are being used for and can never really force anyone to switch to a related method -- telling them you won't help them unless they switch isn't very constructive... and i believe Michael already adequately cautioned the developer, as did Bruce... as did you.

We've had this argument a million times... The OP asked a question and everyone is trying to answer it however they can given the scant facts provided -- So no need to criticize anyone trying to help Soren.

Genx I'm not critizing neither the helpfullness nor the provided help in itself, but instead what legally is called TORT:

http://en.wikipedia.org/wiki/Tort

--sd

Which one in particular? Negligence? We owe no duty of care in our advice because we don't get paid nor are we giving this advice professionally (though i don't think forums have gone through the courts yet) --> No duty and no consideration --> no contract = no liability for tort... and besides, its hard for the user to not see your previous warnings.

Maybe we should create a hotkey so that we dont have to retype the warnings of repeating fields every single time... ;)

That being said, it is hard to justify to newbies why repeating fields are bad relational design when FMI insists on using them in their demos. These are usually the first things that the users will try to implement and modify.

We owe no duty of care in our advice because we don't get paid

Rubish, if someone attempts to jump of a tall building, is it then none of my business since he havn't paid me anything?

When Dostojevsky wrote the Karamasovs, wasn't it the something-for-something axe he was grinding, he was very much against it. The point in socratian gadflying is the rejection of doomed existences as anything real, an insisting on pursuation by arguments. Pretty much what is attacked in:

http://en.wikipedia.org/wiki/Dead_Souls

--sd

Rubbish, if someone attempts to jump of a tall building, is it then none of my business since he haven't paid me anything?

Maybe a moral duty, but not a duty as defined in torts... and definitely not if your only interface to them was via a forum...

The point is I was just making the point that the point had already been made numerous times before you told Daniele to make the point again rather than providing any help to solve the op's actual question however convoluted that question may be.

That being said, it is hard to justify to newbies why repeating fields are bad relational design when FMI insists on using them in their demos. These are usually the first things that the users will try to implement and modify.

I really don't understand what their issue is there either to be honest... I mean, i'm glad i never looked at those files lol.

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.