Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Simple Repeating Calculation

Featured Replies

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)

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.

  • Author

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.

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 ) 

)

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.