Jump 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.

Calculation for repeating fields

Featured Replies

  • Newbies

Hi

I just started working with FMP 5.0 and I don't understand some of its concepts yet. Could you help me with this?:

I have a repeating text field in my db, which value is two concatenated values from two other repeating fields in the same database.

For example:

Field 1 - John

Field2 - Collins

Field3 (the one I'm working on) - JohnCollins

I use calculation to concatenate these two fields and it almost works. The value is calculated for all records in Field3 except the first one. Do you know what it might be?

I appreciate any help/comments!

Umm!

Just before the pro's get here to tell you not to use repeating fields ever.

Is it correct that you have a repeating field "TheField" with 3 repetitions, where repetition 1 may contain "John", repetition 2 "Collins" and the 3rd repetition are supposed to concatenate the first two repetitions into "JohnCollins". (I wonder though if this is the case. Can I really have different calculations for different repetitions of a repeating field?)

Even I who don't understand the evilness of repeating fields must ask you why you can't make at least the 3rd repetition into a field of its own, say "TheFieldConc".

I think the calculation for "TheFieldConc" would look something like

GetRepetition(TheField; 1) & GetRepetition(TheField; 2)

Some more info on your db perhaps?

Cheers

PS When I say that I don't understand the evilness of repeating fields, I mean just that. They may be the source of all evil on earth, I just don't understand it.

The "evilness of repeating fields" (should that be "evility"?) lies in their relative uselessness.

Pun intended (relative? relationships? ... never mind).

There is almost nothing you can do with repeating fields, and nothing that you can't do with related fields & a portal.

Repeating fields were created in the old days, before FMP had any relational capabilities. Now, like your appendix, this "feature" can pretty much only be a pain in the gut.

Hello again

I hope I'm wrong, but I feel that my PS may have caused some bad vibrations. I only meant one thing, and that was to try to explain that I'm not competent enough to understand why repeating fields are a bad idea.

English is not my native language. I may have stepped on some of your toes whithout even knowing it. If so, please forgive me. That was never my intention.

-Anders

Anders -- no offence was taken. Relax!

The previous poster (cannot see their name on the reply screen any more, sorry) got it 100% right in saying that the repeating field's only sin is that of uselessness: you can spend a lot of time creating them and entering data only to find difficulty in getting anything useful out. They don't work well in finds either. And their is that hard-coded limit to the number of repetitions.

Related records and portals have neither of these problems, yet are no harder (some say are they are easier) to set up.

  • Author
  • Newbies

hey , guys!

thanks for you help!

The database I'm working on wasn't created by me, so i just have to use those repeating fields. Whatever i do i find repaeating fields very annoying and unflexible.

Thanks again!

  • Author
  • Newbies

I just wanted to clarify what I needed to do and how i did it for those who are struggling with repeating fields.

I have 3 repeating fields Model, Description, Price . Each of these fields has 5 repetitions. (It wasn't 1 field with 3 repetitions).

Also, I have 1 regular field Department with pop-up menu.

What i needed is to concetinate the values from Department and Model to input the result into Dept_Model field (this field has same structure - 5 repetitions).

Dept_Model is related to another database, from where values had to be looked up for my Description and Price fields. Those values differ for different departments, that's eactly why I needed the concetinated field Dept_Model.

So what was supposed to be happening is this: The user chooses a department and model, Dept_Model gets its value, description and price are looked up according to that value.

The problem was: The concatenation was impossible for the first repetition in Dept_Mode, but it worked fine for the rest 4 repetitions. So price and description for the 1st record could not be looked up.

Solution: I choose Auto-enter Calculation for Dept_Model.

Calculation=Extend(Department)&Model

Extend() puts department code into all 5 repetitions of Dept_Model an then just adds Model as you go. Hard coding dept into Dept_Model didn't work.

Hope it'll help someone

peace

Katya

Create an account or sign in to comment

Important Information

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

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.