December 9, 200817 yr Looking for a little help I've got a calculation field set up to calculate the record number of a record using the calculation: Get(RecordNumber) It's set up as 'Auto-enter Calculation replaces existing value, Evaluate always' It works fine when the record is first created, but the problem is that if I delete a record behind it, it retains this number in the field. I need to figure out a way to make it go recalculate the field, preferably whenever I access the record - so that's it's always calculated "on the fly". I've played with the script command "replace field contents" and it works when I set it up to recalculate the field - in fact it works across the entire table, which is great, but it seems like somewhat of a cumbersome way to do it. Anyone have any ideas? thanks in advance!
December 9, 200817 yr Hi iwasnevy you can use a calculated field with UNSTORED calculation and calc: Get( RecordNumber ) BTW: this isn't a good way to give a number to a record because it depends from the found set.
December 9, 200817 yr I need to figure out a way to make it go recalculate the field, preferably whenever I access the record - so that's it's always calculated "on the fly". That's what Get ( RecordNumber ) is for. You can always get the current record number directly from the function, without needing a field.
December 9, 200817 yr Author raybaudi Ah-Ha! Sometimes it's the simplest thing - can't see the forest for the trees, you know? Maybe it's time to take a break... I'm not assigning this number to the record - I'm only using it in combination with Get( TotalRecordCount) to display "record n of n" on the layout. comment: I didn't follow - how can I get this value and display it on the layout without a field? thanks!
December 9, 200817 yr Put @@ on your layout. You can also find it under the Insert menu when in layout mode.
December 9, 200817 yr Author LOL - duh! Staring me in the face the entire time! yes, it's definitely time to take a break... But before I do, one more potentially dumb newbie question... any way to get the TOTAL record count on the layout as well, without needing a field?
December 9, 200817 yr See this thread. http://fmforums.com/forum/showtopic.php?tid/199003/post/307416/#307416
Create an account or sign in to comment