GManNAtl Posted May 29, 2012 Posted May 29, 2012 I have a very simple use of a repeating calc field that I need help with. I have searched this forum and found some pretty good examples of recursive functions etc., but just can't seem to get my head around them, and they don't really address my simple needs anyway. I am integrating to a third party dbase (via ESS) that is not normalized and has multiple fields for phone numbers in their "contacts" table. I want to be able to match against any of the phone number fields, from a single phone number field in my solution. My thinking was to make a repeating calc field that would combine the 4 phone number fields. I thought that simply doing something like . . . num1 & [cr] & num2 & [cr] & num3 would make them go into the repeating field, but it just combines them in the first rep. I am sure this is very simple, but just can't seem to figure out how to make num1 go to rep1 and num2 to go to rep2. I don't need this to be fancy and skip a rep or anything, just simply map them directly. My relationship would then simply match any of the numbers without having to normalize the other solution (which is likely impossible)
comment Posted May 29, 2012 Posted May 29, 2012 My relationship would then simply match any of the numbers You don't really need a repeating field for this. Just make a calculation field (result is Text) = List ( num1 ; num2 ; num3 ) and use it as the matchfield for your relationship.
GManNAtl Posted May 29, 2012 Author Posted May 29, 2012 Wow, do I feel dumb now. My thinking was just to have a carriage returned list, but just assumed that the relationship would evaluate the entire text field vs. each line separately. I guess it would have paid to have just tested this. However, just out of curiosity, how do you address the reps in the context of a calc field? Obviously, you could script it, but is there anyway to define the rep number within the calculation directly? Everything I have seen simply deals with performing mathematical functions across repeating fields and makes use of Extend. I have seen some recurssive examples, but I can't seem to figure out how they are addressing the rep within the calc.
comment Posted May 29, 2012 Posted May 29, 2012 However, just out of curiosity, how do you address the reps in the context of a calc field? You use the Get ( CalculationRepetitionNumber ) function, for example = Case ( Get ( CalculationRepetitionNumber ) = 1 ; Extend ( num1 ) ; Get ( CalculationRepetitionNumber ) = 2 ; Extend ( num2 ) ; Get ( CalculationRepetitionNumber ) = 3 ; Extend ( num3 ) )
Recommended Posts
This topic is 4618 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