Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

TextToDate("")

Dj

  • Author

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

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!

  • Author

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

  • Author

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

Many thanks, LaRetta. I'll have to study it and see how much of it makes sense to my befuddled little brain. frown.gif

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.