stefangs Posted March 6, 2001 Posted March 6, 2001 i have a file with a selfjoin based on the record title. each record also has a serial number i use for putting items in order (these are reserialized via scripts). the serial number is used in the selfjoin to display info about the record preceeding it in the sequence, such as the previous date. this means that the first record in the sequence does not have a valid relationship, so i wanted to display a default value with the following calc field (text): If (IsValid(selfjoin), PreviousRecordInfo, GlobalTextField) while the first part works in all records, the alternate expression for the first record is never used (the field stays blank). any idea what's wrong with this?
LiveOak Posted March 6, 2001 Posted March 6, 2001 Why not: If (IsValid(selfjoin), PreviousRecordInfo, "") You don't need a dummy field. -bd
stefangs Posted March 7, 2001 Author Posted March 7, 2001 some users may find it strange that the field is blank. it would be nice to enter something by default. but if it can't be done, it can't be done.
LiveOak Posted March 7, 2001 Posted March 7, 2001 You calculation should work, except for one thing. The IsValid() function checks a field and not a relationship. If should have the form IsValid(SelfJoin::Field). You can actually make up you own test for this without IsValid(). Create a calculation field, Constant (number) = 1. The test would then become: If(SelfJoin::Constant, "Valid", "Invalid") Make sure you set the calculation to evaluate if the fields are empty. -bd
Recommended Posts
This topic is 8733 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