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.

Repeating Fields, populating and find

Featured Replies

I have a table that has a "PartNO" field and a "AltPartNo" field. I want to use a repeating field to do a find, looking at both the same time. The best way to do this is use a repeating field for "PartNO" and put "AltPartNo" in the repeat. Question is "How do I populate the 2nd part of PartNo" with "AltPartNo"?

TIA

Ivan

In a mass-update script for all your records:

Set Field | highlight PartNo | 2 in Repetition box | Specify Calculation | AltPartNo

I don't know what transpower is trying to say, but if this field is just for searching, I'd advise keeping your fields separate and using a calc field for searches (or relationships)???

PartNoCombined (calculation, text result) = PartNo & par.gif & AltPartNo

The poster currently has a separate alternate part number field. It would be more convenient for him to put one value in the repeating field in a find layout to find either the main or alternate numbers; this simply saves a second find request.

...this simply saves a second find request.

but adds to his file maintenance. Using a multi-line calc provides the same search capabilities without needing scripted repopulating in the future.

A calculated repeating field with two repetitions equal to Choose( Get(CalculationRepetitionNumber) - 1; PartNo; AltPartNo ) would also work. But I would assume a multiline to be faster. However, this is a nice technique to use when indexing limits become an issue. Of course, with FM 7 it would be much rarer.

Thanks, -Queue-, as always.

Ender: I assume that the script would be run just one time (so no other file maintenance). From here on out, the poster would enter both the main and alternate numbers in the repeating field.

I think this is a situation where one repeating field is better than two separate fields.

...the poster would enter both the main and alternate numbers in the repeating field.

You want to limit your options on the UI for those fields?

  • Author

Thanks for all your input. Mass updating the "partNo[2] with "altPartNo" at one time is no problem, I just used the replace function. The search function works great using the repeating fields. Now comes the problem of a new record, copying the "altPartNo" field to the "PartNo[2]". I can't find any way to do this. Probably will have to remove "AltPartNo" field and replace with "PartNo"[2], this looks like the right thing to do.

As usual a great job from the Gurus.

Ivan

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.