adyf Posted September 15, 2011 Posted September 15, 2011 When setting up a value list is it possible to set it up so that it only includes values from certain records within a table. For example I have a table with authorisation passes in that have an expiry date. I have a calculation field set to display either 'Valid' or 'Expired' dependent on the expiry date in relation to the current date. I would like the value list to display only values from records that meet the 'Valid' criteria. Does that mean that I have to create another table that only contains 'Valid' authorisation passes or is there a way to do it from the table that contains both 'Valid' and 'Expired' passes? Thanks in advance.
VincentO'B Posted September 15, 2011 Posted September 15, 2011 You can make a self-join, that is relate the table to itself. Create a global field = Valid. Make a self join using this Global and your calculated field as the key. Then you can base your value list on this relationship. Vincent
comment Posted September 15, 2011 Posted September 15, 2011 Make a self join using this Global and your calculated field as the key. I don't think this will work, because the calculated field is unstored. I have a calculation field set to display either 'Valid' or 'Expired' dependent on the expiry date in relation to the current date. Please explain exactly how the 'Valid/Expired' status is calculated.
adyf Posted September 15, 2011 Author Posted September 15, 2011 I don't think this will work, because the calculated field is unstored. Please explain exactly how the 'Valid/Expired' status is calculated. Case(Cab Pass Expiry Date <= Get(CurrentDate); "Expired"; Cab Pass Expiry Date > Get(CurrentDate); "Valid")
adyf Posted September 17, 2011 Author Posted September 17, 2011 Thanks guys, both solutions worked. Just out of interest is a self-join a common technique?
comment Posted September 17, 2011 Posted September 17, 2011 It doesn't have to be a self-join. But you do need a relationship to filter out expired values from the value list. both solutions worked. I doubt that very much.
Recommended Posts
This topic is 4816 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