iwasnevy Posted December 9, 2008 Posted December 9, 2008 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!
Raybaudi Posted December 9, 2008 Posted December 9, 2008 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.
comment Posted December 9, 2008 Posted December 9, 2008 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.
iwasnevy Posted December 9, 2008 Author Posted December 9, 2008 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!
mr_vodka Posted December 9, 2008 Posted December 9, 2008 Put @@ on your layout. You can also find it under the Insert menu when in layout mode.
iwasnevy Posted December 9, 2008 Author Posted December 9, 2008 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?
mr_vodka Posted December 9, 2008 Posted December 9, 2008 See this thread. http://fmforums.com/forum/showtopic.php?tid/199003/post/307416/#307416
saigopaldas Posted November 22, 2012 Posted November 22, 2012 You can use "@@" to show the current record position in the Found Count
Recommended Posts
This topic is 4441 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now