March 26, 200718 yr 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?
March 26, 200718 yr Do you want to go to the last repetition or just know the last repetition number?
March 26, 200718 yr 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.
March 26, 200718 yr 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)
March 26, 200718 yr 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
March 26, 200718 yr 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.
March 26, 200718 yr 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.
March 26, 200718 yr 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
March 26, 200718 yr 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 ;)
March 26, 200718 yr 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.
March 26, 200718 yr 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
March 26, 200718 yr 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.
March 26, 200718 yr 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.
March 26, 200718 yr 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
March 26, 200718 yr 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.
March 26, 200718 yr 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