Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

At Last Record (message)


This topic is 5890 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

I think I have finally poked enough keys I found my answer after I posted below.

Will this do what I need?..it seems to work

If[Get(RecordNumber)=Get(TotalRecordCount)

Show Custom Dialog etc. ect.

Hi,

On my layout I have an arrow to move to the "Next" recod.

How would I script the button so that when the user has advanced to the last record a message would show "You have reached the lat record"

I know how to do the message part...I just cant seem to figure out how to script the button to know when it has reached the last record in the db.

Thanks,

Jim

Edited by Guest
Posted

That will work, but you may want to use this instead:

Get(RecordNumber) = Get(FoundCount)

As a card-carrying BAD* advocate, may I also suggest you consider other options, such as calculated containers that show a "dim" arrow when you're on the last record of the found set.

*Banish Annoying Dialogs

Posted

Thanks,

I like the sound of the container option. But have no clue as how to accomplish that.

Any direction would be appreciated.

Jim

Posted

The idea is that you have a group of container fields that store your button graphics. I suggest a separate table, let's call it "Interface." The fields should be globals so that you can access them from anywhere without needing a relationship.

For each button you need a field for the "lit" or active state and a field for the "dim" or inactive state. (Some people use field repetitions but now that we can have as many tables as we like, and dedicate one just for interface fields, I don't see the advantage.)

In each table that you want to have navigation buttons, define these calculations:

Be sure to return a result of container, and be sure they are unstored!



/* First record */

Case( Get(RecordNumber) = 1; Interface::ArrowFirstDim; Interface::ArrowFirstLit )



/* Previous record */

Case( Get(RecordNumber) = 1; Interface::ArrowPrevDim; Interface::ArrowPrevLit )



/* Next record */

Case( Get(RecordNumber) = Get(FoundCount) ; Interface::ArrowNextDim; Interface::ArrowNextLit )



/* Last record */

Case( Get(RecordNumber) = Get(FoundCount) ; Interface::ArrowLastDim; Interface::ArrowLastLit )

You may not be using first/last buttons as well as previous/next but I've included them for completeness.

I'm sure there are example files floating around...

This topic is 5890 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.