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.

Complicated Calculation of relational records

Featured Replies

Hello,

I am wondering, how to "calculate" the following:

main table with following fields:

id

article number

article attributes calculated text

Subtable with following fields

id

relation to main id

article attributes number

a main record can have 0 to 5 subrecords

"article attributes number" contains numbers that should be calculated in "article attributes calculated text".

The formula of "article attributes calculated text" should do the following:

- Get all "article attributes number" (probably with the list command)

- Sort them in ascending order

- Write the sorted numbers with "-" between each Value

i.e. 3 Subrecords with numbers

8976

629

17678

calculated as 629-8976-17678

Can anyone tell me, how the calculation would look like?

GalainHH

Try:

Substitute ( List ( Subtable::article attributes number ) ; ¶ ; "-" )

The sorting should be done in the relationship's definition, which the List() function will faithfully follow.

  • Author

Thanks a lot.

This is far from being "complicated". :)

I was constantly thinking, that I have to use "Let" and calculate Vars in special way and didn´t thought, there can be such an easy way.

Using Let() does not necessarily complicate thing - on the contrary, I often use Let() to make a formula more readable, sometimes even at the expense of perfect efficiency, e.g.

Let (

myList = List ( Subtable::article attributes number )

;

Substitute ( myList ; ¶ ; "-" )

)

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.