Woodnote Posted April 7, 2011 Posted April 7, 2011 I'm trying to use text from a second related field to define the calculation that determines if the data entered into the first field is valid. For some reason I can't get the text to correctly evaluate as an actual calculation. It just seems to show up as text and not evaluate as a calculation....I know this is super simple, but I'm totally stumped at the moment and I'm hoping to figure this out ASAP. Does anyone have any suggestions on how to get this to work? I've tried using evaluate() but I think I'm setting the syntax wrong. I currently have the "validate by calculation" box checked and the calculation looks like this:If(Evaluate(Substitute ( YYY10_Measure Item Validation Rules::Validation Calculation ; "X" ; GetFieldName(YYY9_Raw Results::Raw Result) )); 1; 0) I've also tried using the following to no avail If(Evaluate(Substitute ( YYY10_Measure Item Validation Rules::Validation Calculation ; "X" ; GetField(YYY9_Raw Results::Raw Result) )); 1; 0)If(Evaluate(Substitute ( YYY10_Measure Item Validation Rules::Validation Calculation ; "X" ; YYY9_Raw Results::Raw Result )); 1; 0) YYY10_Measure Item Validation Rule = 5<X<10 I've tried using the Let() function, but I can't get the syntax right
comment Posted April 7, 2011 Posted April 7, 2011 Please explain what the actual validation rule is. Reading a cryptic formula (which you say doesn't work anyway) is not helpful.
Woodnote Posted April 7, 2011 Author Posted April 7, 2011 Please explain what the actual validation rule is. Reading a cryptic formula (which you say doesn't work anyway) is not helpful. sorry, the actual validation rule in this case is the value must be greater than 5 but less than 10. I wrote this as 5<X<10 where "X" is the contents of the field in question (Raw Result)
comment Posted April 7, 2011 Posted April 7, 2011 And why must this rule be stored as text in a related record (related how?)?
Woodnote Posted April 8, 2011 Author Posted April 8, 2011 The calculation you want is: X > 5 AND X < 10 Yep that it did it! thanks a ton! I'm exploring an EAV style scheme and I want to still be able to enforce validation rules defined in a "validation calculations" table that each of the records is related to
Recommended Posts
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