Skip 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.

Populate field via checkbox [simple newb ?]

Featured Replies

I have an invoice db, in which I have a checkbox for whether or not the invoice has been paid. Upon checking the box, I would like my 'date paid' field to be populated with today's date.

I have this script on the date field, but am not able to get it to work:

If ( paid checkbox = "yes" ; Get ( CurrentDate ))

Can someone help?

-Adam

Edited by Guest

.. Firstly... your checkbox should just be attached to a value list with one value... that value being yes... secondly your date field should be set to auto enter... ... your if statement seems to be missing something...i.e. it should look like this...: If(paid checkbox = "yes"; Get(CurrentDate); "")

Hope this helped, i cant see much else that could be causing the problem

Genx

Genx

... Twice the genx for twice the goodies lol

  • Author

Thanks, I fixed the script. I've attached the checkbox to a value list containing only 'yes', but now I get the following error when clicking the checkbox:

"checkbox" is defined to contain only specific values. You must enter a valid value.

- Adam

... thats cause you've set the validation to something funny... goto define database, goto the check box field, click options and turn off any validation because you wont need it anyway...

Genx

p.s. again... i do love these... your as bad as me... its not a script, its a calculation

  • Author

So the date field type should be Calculation, that makes sense. Should the checkbox field type also be Calculation?

Will changing the type reset all the dates I've entered manually so far?

... no no no... no no no... date.. but auto enter by calculation... leave everything as it is... your checkbox field just has unecessary validation in it...

  • Author

For the checkbox: under Auto-Enter I have nothing set/checked; under Validation I only have Member of Value list checked, linking to my Paid value list which only contains 'yes'.

... considering the fact that you have a checkbox and the user cant really enter anything else anyway ... you dont need to have that extra validation there...

  • Author

I don't understand, what extra validation? All I've done is link the checkbox to the value list containing only 'yes'. If I don't connect it to the value list I no longer get the error, but the date field is not populated.

Is it possible for you to post or email me a working example?

  • Author

...ahhh - the change only applies to new records, not existing ones! Sorry, didn't know that. I'd been trying to see the effect on records I already had.

Thanks a lot for you help and patience.

-Adam

... if you wanted, you could make it apply to existing ones... just change the date field to an unstored calculation with result date...

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.