Jump to content

Complicated Calculation of relational records


This topic is 6106 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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 ; ¶ ; "-" )

)

Link to comment
Share on other sites

This topic is 6106 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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