Jump to content
Server Maintenance This Week. ×

Need help getting rid of popup message with validated field is left blank...???


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

Recommended Posts

I have a field called UnitNumber and another field called ScanLabelPrinted. ScanLabelPrinted is simply a 1 or a 0. The goal is to highlight the UnitNumber text when ScanLabelPrinted = 1. I originally just used a calc. field and that worked except then we couldn't edit that field. As such, I changed to a normal text field with Auto-Enter calc. and validation calc. both set to:

If ( ScanLabelPrinted = 1 ; TextColor(UnitNumber ; RGB(0;98;0)) ; UnitNumber )

Do Not Replace is unchecked in the Auto-Enter section.

This works for the most part, but I hae a couple of problems. First, the text in UnitNumber does indeed change to green when ScanLabelPrinted = 1. However, it stays green from this point on no matter what ScanLabelPrinted is set to. It's not a huge deal for this particular project, but I would like to know how to fix that so it changes back when it should.

Another problem I'm having with this currently is that the UnitNumber field will not accept an empty value now without saying yes to that popup because of the validation. If it's empty I get the following popup:

"UnitNumber" is defined to contain only specific values. Allow this value?

If I click yes it works, but I don't wanna have eto click yes for this all the time. It happens entirely too often. I tried to edit my calcs. on that field to the following:

If ( UnitNumber = "" ; "" ; If ( ScanLabelPrinted = 1 ; TextColor(UnitNumber ; RGB(0;98;0)) ; UnitNumber ) )

My thought here was that it would first check the value to see if it's empty. If so, simply "set it to empty", or basically leave it alone. If not empty, go ahead and run the check on ScanLabelPrinted and change the font color when necessary.

This change doesn't seem to have effected the field in any way, though. I still get the same popup when trying to leave the UnitNumber field blank.

Any information on how to fix this would be greatly appreciated. Thanks!

Link to comment
Share on other sites

Since you are going to use ScanLabelPrinted as a boolean flag, you can simply have:

Case ( ScanLabelPrinted; TextColor(UnitNumber ; RGB(0;98;0)) ; TextColorRemove (UnitNumber) )

As for your validation, why are you even using this validation? It doesnt seem to me like you need it.

Link to comment
Share on other sites

Sorry, I forgot to answer that.

The UnitNumber field is a field that our check-in people here use to place the product ID of the item when it comes from our partner company.

The check-in people requested that I highlight the font green upon the label getting printed so they can easily see which ones have already been checked in and which ones haven't.

At first, I made an actual calc field but then they couldn't edit the field. So that's when I started playing with validating using a calc to get the same effect. It's working, except for the nagging popup when UnitNumber is empty.

Is there a better way I'm not thinking of?

Link to comment
Share on other sites

But if you have what you need already where the purpose was to flag the record with green text if it has been flagged as printed then again why even have field validation. You dont need the validation. Just turn off the required field validation, and the popups will go away.

If you definately need field validation for some odd reason then you have to do a check for

Case ( IsEmpty (UnitNumber); 1; else blah blah blah )

But again in your case and from what you gave me, IMO you do not need field validation for your purpose so turn it off.

Link to comment
Share on other sites

I'm not following you with why I don't need the validation. I'll explain some more....

I was told to create a way to disable the print button once it's been printed, but then we also need a way to turn it back on. that's when I created the boolean ScanLabelPrinted field. I use this to disable the print button and you can go uncheck it to enable the print button again.

Then I was asked to make the UnitNumber text turn green when they've printed a label so that they know (when looking in list view) which ones were already checked in. I just used that same ScanLabelPrinted button because it was already there and they don't print labels for something unless it's being checked in. The ScanLabelPrinted check box does not show up on the same layout that they're looking at the listed items with.

So that's the reason for all of this. Am I being moronic..??

Link to comment
Share on other sites

They are looking at the list of items with some records with green text and others with black depending on the value of the boolean which is used to flag to display the print button as well correct? All this should be fine. Field validation is usually used to make sure that data entered into the field meets the criteria that you stipulate. Perhaps I am the one not following...

Link to comment
Share on other sites

I tried

Case ( IsEmpty ( UnitNumber ) ; "" ; If ( ScanLabelPrinted = 1 ; TextColor(UnitNumber ; RGB(0;200;0)) ; UnitNumber ) )

with no luck...

You misread the Case statement in my earlier post.

Link to comment
Share on other sites

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