James Gill Posted June 29, 2010 Posted June 29, 2010 (edited) I am trying to validate two fields that are foreign keys to a parent record. Each field is dependent upon a name field to have a value and if the validation fails then I want to use the auto-enter calculation replaces existing result feature to wipe the value of the foreign key value. The problem is that one of the fields is working perfectly and the other refuses to work at all. The most frustrating part of this fact is that both are extremely simple relationships and are not working as intended. First calculated field; Field Name: _kf_DepartmentContractID Calculated value: If (IsEmpty(E_000141_Department_Contacts);"") E_000141_Department_Contacts is the field that I am referencing for the 1st field Second calculated field; Field Name: id_JobClassID Calculated Result: If ( IsEmpty ( trans_job ); "") trans_job is the field that I am referencing for the 2nd field Both fields have the same exact settings Regardless of what is typed into the trans_job field the second field wipes its value. It has to be something extremely simple that I'm missing but this is driving me insane. Edited June 29, 2010 by Guest
comment Posted June 29, 2010 Posted June 29, 2010 The expression: If ( IsEmpty ( x ) ; "" ) returns an empty result regardless of the value of x. If it appears to work for the first field, then something is wrong there, not with the second field. You probably want something like: If ( not IsEmpty ( x ) ; Self ) P.S. I don't see what this has to do with validation.
James Gill Posted June 29, 2010 Author Posted June 29, 2010 (edited) Ok that worked, I just wasn't using the if statement correctly. I'm just trying to make sure that my data is "clean" and doesn't contain erroneous data. Thanks Edited June 29, 2010 by Guest
Recommended Posts
This topic is 5319 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