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

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

Recommended Posts

Posted

Hi everyone!

I've been presented with a problem I can't figure out. frown.gif It's driving me nuts! It must be simple!

If I have a checkbox (Value List "Yes" and "No") and, if the value is changed to "yes", I want a DateCompleted field to insert the current date. I've created a transparent button and placed it over the checkbox and my script is:

Script Name: Set Completed

If [Problem = "No" or Problem = ""]

Set Field [ Problem, "Yes" ]

Set Field [ DateCompleted, Status(CurrentDate) ]

End If

Else

Set Field [ Problem, "No" ]

Set Field ( DateCompleted, ????

Exit Script

How do I set a date field to blank if the User changes their mind! confused.gif Or is there an easier way to handle this? I considered using a Case statement but can't figure out how it would work. Can anyone help me?

LaRetta

Posted

Hi DJ smile.gif

That did the trick! I find it interesting that this worked!? There are many times I want to blank a date field. Does this work in all calcs? Also, does it work in *finding* blank date fields? Thanks so much for your help on this!

LaRetta

Posted

LaRetta:

Could you please post the final iteration of the script that works the way you have described in your post?

I have a similar usage. A data-entry staff member updates a student's GPA field. I would like the date on which the staff member did this to be entered automagically (for tracking and reporting purposes), so that the staff member does not need to do this. But the staff member could change her mind and remove the modified GPA.

Also, could you please explain for me how come you put a transparent button over the checkbox? Is that the mechanism for triggering the auto-entering of the date? Or does the button itself contain the date (field) and you made it transparent so the user would not see it?

Many thanks!

Posted

Hi BFH smile.gif

I had been assisting someone on Cafe' with this problem. And I originally provided incorrect information (even after running a test), so only pay attention to my final response to their problem. For a complete breakdown, please see the following URL:

Record Modification Date

I think this will explain the entire process for you. I now understand it, so if you still have questions, let me know! Keep in mind that I'm unsure if this is the BEST answer to this problem. It's just the only one I could come up with. There may be better ways to solve this problem. If anyone knows a better way, I'm all EARS!! I always want the *best* solution so please speak up if you know one grin.gif

LaRetta

Posted

Hi BFH,

I should clarify the reason for placing a transparent button over the checkbox. I'm unsure if it's clear in my response on Cafe' and you had asked about it.

The transparent button activates the script which sets the checkboxes, by treating them as an on-off toggle. If currently on ("Yes" or "1"), turn it off ("No" or "0" or blank). The script can also handle other fuctions, such as setting a date field (like you need to do). smile.gif

I used "Yes" and "No" because the Postee had that Value List already in place. I prefer one Value List called Switch (learned from CobaltSky) with only one value = 1. This single Switch value list can then be used with many different fields. Very nifty indeed! I hope this explains it. If not, let us know!

LaRetta

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