AvrioTech Posted November 12, 2005 Posted November 12, 2005 (edited) Ive made a test file with 2 valuelist... One with a Company Name and one with The State of the companys location. I have 2 company names in my test app Kmart and Sears. Kmart has 0 locations in my test and Sears has 3 NY NJ and FL. Heres my issue... Lets say I pick Sears as the company and Pick Location NJ. Then I pick Kmart (which has no location) NJ is still picked in the valuelist.. Is there a way to somehow clear the Location value list if the company changes? I attached a file too. Thanks alot. locationstest_2.fp7.zip Edited November 12, 2005 by Guest
Kent Searight Posted November 12, 2005 Posted November 12, 2005 What's happening is that when you change the shipper field to Kmart on your test layout, you have nothing to show in the value list, so the value that was there already just stays there. You can delete it, though. Two things are happening in your scenario... One, you're expecting the value of the field to go null because the field is configured to display a drop-down field, which in the case of Kmart is null. Null values don't exist in value lists, therefore you can't select it from the list. Two, how likely is it that you're going to encounter a company without a location? Never, I would imagine. Therefore you'll never have this problem under normal conditions.
AvrioTech Posted November 12, 2005 Author Posted November 12, 2005 (edited) What's happening is that when you change the shipper field to Kmart on your test layout, you have nothing to show in the value list, so the value that was there already just stays there. You can delete it, though. Two things are happening in your scenario... One, you're expecting the value of the field to go null because the field is configured to display a drop-down field, which in the case of Kmart is null. Null values don't exist in value lists, therefore you can't select it from the list. Two, how likely is it that you're going to encounter a company without a location? Never, I would imagine. Therefore you'll never have this problem under normal conditions. Ok I added Kmart to have cali for a location. I still have the problem of it keeping the old valuelist item. An Example is if I pick Sears then I pick NJ for its location, then I decided I picked the wrong company and picked Kmart instead, it still shows NJ in the location field. Edited November 12, 2005 by Guest
Kent Searight Posted November 12, 2005 Posted November 12, 2005 I still have the problem of it keeping the old valuelist item. An Example is if I pick Sears then I pick NJ for its location, then I decided I picked the wrong company and picked Kmart instead, it still shows NJ in the location field. Right, and that's expected behavior. Just because you have a field configured to show a value list doesn't mean that the field is going to change automatically when you change the value in another field. Does this make sense? One option might be to validate the value in the location field if you feel that its behavior will lead to errors. Another possibility if you don't want this behavior is to make your location field an auto-enter that enters null every time you change the company field.
AvrioTech Posted November 12, 2005 Author Posted November 12, 2005 (edited) I got it to work the way I want I played around with different things and I got it to work perfectly with a lookup. Check out the file and tell me if you think this may cause any issues. locationstest3.fp7.zip Edited November 12, 2005 by Guest
Kent Searight Posted November 12, 2005 Posted November 12, 2005 I think that it's going to be prone to error. How do you know which value you want to populate the field on auto-enter? For example, set a record with Sears in the shipper field to "fl" in shipperloc. Now set the shipper field to Kmart. It changes to "ca"...exactly what you wanted right? Now change back to Sears and look what happens...it auto-enters "nj". Did you want it to go back to "fl" instead. The problem is that if you have more than 1 value, your taking a chance on entering bad data. I'd set the field to auto-enter null everytime the shipper field changes. This way your user won't get a false sense of having filled out the record.
Kent Searight Posted November 12, 2005 Posted November 12, 2005 Make it an auto-enter calc as follows: If ( not IsEmpty (Shipper ) ; "" ) Make sure you uncheck "Do not replace existing value..."
AvrioTech Posted November 12, 2005 Author Posted November 12, 2005 Make it an auto-enter calc as follows: If ( not IsEmpty (Shipper ) ; "" ) Make sure you uncheck "Do not replace existing value..." Thanks. I would think that it would clear everytime you went into the field but it doesnt. It works perfect thanks.
Kent Searight Posted November 12, 2005 Posted November 12, 2005 Thanks. I would think that it would clear everytime you went into the field but it doesnt. It works perfect thanks. You're welcome! The shipperloc field doesn't clear when you enter it because the field is not its own trigger...shipper is the trigger field.
Recommended Posts
This topic is 6952 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 accountSign in
Already have an account? Sign in here.
Sign In Now