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

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

Recommended Posts

Posted (edited)

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
Posted

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

Posted

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

Posted

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

Posted

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?

Posted

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

Posted

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

Posted

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

Posted

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?

Posted

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

Posted

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

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