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

Radio buttons and "Not empty" fields


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

Recommended Posts

  • Newbies
Posted

I have a Database set up as a quotation database. One field (called "status") is a member of a Value List that has values for "Current Sale", "Sale Lost" and "Sale Complete" and are displayed as radio buttons. The other field is called "Invoice Number". Now some users when clicking on the "Sale Complete" button are forgetting to enter an "Invoice Number". Is it possible to force a user to enter an number into the "Invoice Number" field but only when they click on the "Sale Complete " Radio Button and not on the "Current" or "Sale Lost" button.

I know you can click on "not empty" for valadition for a field but can you do this or something similar for one radio button within a field that is a member of a value list.

Thanks

Posted

Attach this validation to your Status field:

Status = "Sale Complete" and not IsEmpty(InvoiceNumber) xor Status <> "Sale Complete"

Unclick 'Validate only if field modified' and click 'Strict ...' and enter a message telling your User they must 'Revert' and enter an Invoice Number.

LaRetta wink.gif

Posted

Oh JT! We've bumped into this one before! I thought I had learned to take advantage of xor last time this came up between us! Guess not. crazy.gif I guess I need to work on really understanding xor. Thanks for a second lesson on it. smile.gif

LaRetta

Posted

Well, your solution would be fine, if you changed xor to or. Naturally, Status can't be both equal to something and not equal to something at the same time. So xor would be a bit redundant there. Status = "Sale Complete" xor IsEmpty(InvoiceNumber) means (Status = "Sale Complete" and not IsEmpty(InvoiceNumber)) or (Status <> "Sale Complete" and IsEmpty(InvoiceNumber)), which has the added benefit of checking that no InvoiceNumber is entered if the Status is not "Sale Complete". I could be wrong, but it seems like this is what was asked.

  • Newbies
Posted

Thanks for that solution, it worked a treat.

It also had the advantage that old records (there were a few thousand) that already had "Sale Complete" ticked did not ask for an Invoice Number when browsing through them.

Great Forum, excellent Knowledge, again many thanks

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