I'm assuming this is a calculation but can't seem to get it going. I'm trying to model after the Status bar and to get the field to display the current record. The image is pretty much self explanatory.
To show the record number, use the insert menu to insert the record number symbol as layout text.
Thank you, Phil. This works and it does display the current record but how do I click into the record number field, like in the Status bar, to go to a specific record?
Put a field underneath this layout text.
Two options have all your scripts associated with this set of controls clear this field when they navigate to a different record
Don’t use this layout text, but have all of these scripts use:
Set Field [ YourTable::YourField ; Get ( RecordNumber ) ]
to update your field with the current record number.
Unfortunately, I'm not understanding it. I must be missing something in your description.
What I have done is created a field and a button. I enter a record number in the field and the button tells it to go to the specific record. Not as attractive and I would prefer to enter a record number in the field, press enter on the keyboard and voila.
I do appreciate your post. Thank you.
If that's the only way you are moving from record, you don't need any of the above, you just entered the number you need to show. But if you have other buttons that move you to first, previous, next, last buttons, they will need to update the number displayed. They can simply assign the current record number as part of the script for changing records.
I do have buttons in the layout and they function as you described but I believe we're back to where we started. In the enclosed screen shot, I have my previous/next buttons, record count and found count. The field and button towards the left is what I was describing earlier. I'd like to eliminate the arrow button, place the field over the "record count and found count", enter a record number and I'm there.
The reason I am doing this is simply because at some point, I'd like to hide the Status bar and have the buttons and fields on the Header of my layout.
I'd also love to find an example file, to study how others have done this.
Just a thought. I've been thinking about how I'd do this. There are ways that Phil described, but it occurs to me:
How useful is go to record # navigation?
Of course your users are different, but I wonder how do people know which record to go to by number? Maybe users are used to using record number navigation. I can't say I've ever built that for a client.
The found set and sort change all the time and therefore the record number changes.
I've got a demo that is similar to yours, but again. I'd not actually develop this. I'd give them a search instead, or a sort of master-detail kind of set up.
My original suggestion was this. A button to move to the next record might do this:
Go to Record/Request/Page [Next]
Set Field [YourField for specifying the record number here ; Get ( RecordNumber ) ]
Such a script can be generalized to handle all four buttons for first/last next/previous with a different script parameter passed to the same script.
But Jeremy has made some good points that gave me a better idea.
Add the OnRecordLoad trigger to your layout and give it this one script step:
Then any manipulation of the found set will automatically update your field for specifying the record number.
If you don't put such a field on your layout, then my original suggestion, the layout text object for record number may be used.
Thank you, Phil. I will give your suggestion a go. I believe I'm now seeing how this will work and yes, Jeremy has definitely added to this. Thanks! I know I'm close to what I'm after but the finer details have always been where I struggle. Lets see where this goes
Retrieving data ...