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

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

Recommended Posts

Posted

I am working on a timeclock module that has a simple START & STOP button.

Each button activates a script that inserts the current time into a Start and Stop Field.

I track the elapsed time with a simple calculation.

Is there a way to insert these values with a button script and prohibit modification

after the button has been pushed?

Thanks for any help here.

Jarvis

Posted

Since START and STOP are filled via script; and since you have vs. 7, use Field Behavior and disallow entry in Browse and Find. Your script buttons can still fill the fields but Users can't enter them. If, for some other reason, you need Users to have access to this field, it can be controlled via extended privileges but what you've described wouldn't require that kind of lockdown.

If they need the ability to clear the fields, provide a CLEAR (or RESTART) button also. In your Start and Stop scripts, you may want to check 'Run Script with Full Access Privileges.' If you don't want the buttons to change the start and stop times after they have been entered, just change your script. Personally, I would use Set Field [ ] instead of Insert Current Time something like:

Set Field [ If(IsEmpty(Start; Get(CurrentTime); Start) ]

... which would insert the current time if empty but wouldn't change if a time already exists in the field.

Posted

Thanks alot Moon Shadow!

You gave me more information than I was hoping for.

Jarvis

Posted

MoonShadow,

More help please.

I like the SET FIELD approach but I can't figure out how to use Field Behavior & disallow entry in Browse and Find.

Thanks,

Jarvis

This topic is 7306 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.