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.

Concatenation of multiple lists

Featured Replies

What may be the best approach to combining two or more lists into one? i.e,

Word list of a,b,c...

Word list of x,y, z

combine to a list such as:

ax, ay, az, bx, by, bz, ...

The lists will change periodically. There will be multiple lists. Of course other data is associated with groups of the final list.

How are these lists constructed? Are these separate tables of records or just two fields with something to separate the items?

If the lists are list1 and list2, create two repeating calculation fields with the maximum number of repetitions as you allow list items.

repList1:= MiddleWords( Extend(list1); Get(CalculationRepetitionNumber); 1 )

repList2:= MiddleWords( Extend(list1); Get(CalculationRepetitionNumber); 1 )

Then create a repeating calculation of Get(CalculationRepetitionNumber) with as many repetitions as the product of the number of reps in repList1 and repList2, and a combined repeating calculation with the same number of reps, defined as

Let([ R = Get(CalculationRepetitionNumber);

L1 = Count(repList1);

L2 = Count(repList2) ];

Case( R <= L1 * L2; repList1[ Int((R - 1) / L2) + 1] & repList2[ Mod( R - 1; L2 ) + 1 ] )

)

Then create a valuelist based on self|serial::combinedcalc, sorted by the second field, specified as the Get(CalculationRepetitionNumber) field, where self|serial is a self-relationship from serial to serial, so that only the current record's field is used for the value list.

Finally, create an unstored calculation text field of

Substitute( ValueListItems( Get(FileName); "combinedvaluelist" );

Or you can eliminate the repList1 and 2 calculations and change your combinedcalc to

Let([ R = Get(CalculationRepetitionNumber);

L1 = Substitute( Extend(list1); ", ";

  • Author

They are not constructed yet. Starting from scratch, looking for the best way to put them together in FM7. The actual data is currently in Word and the import is not an issue. I am sure I can script the solution but, I would prefer somthing more dynamic. I quess I want to know if there is a better way.

Kill any bees lately?

  • Author

Thanks for the thorough reply. I will give it a shot.

  • Author

The secound solution is short and sweet and is exactly what I need.

The first part however, blew me away. I had no idea a value list could be worked is such a way.

Thanks again.

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.