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.

Don't quite get List function...

Featured Replies

Hi Folks,

I've almost got the List function working, but can't quite jump a few hurdles.

 

I have a cInstrument field on the Pupils table.

The calculation is

 

List (InstrumentLesson::Instrument;InstrumentLesson::AB Grade ) 

 

This only works for the first related record.

e.g. 

Viola

5

 

Whereas:

 

List (InstrumentLesson::Instrument )

 

lists all the related records.

e.g.

Viola

Kazzoo

Trombone

 

What I'd actually like is something like:

Viola      5

Kazoo    2

Trombone 4

 

Any ideas where I'm bodging this time please?!!!

 

Many thanks,

Mike

You're not bodging anything. You are correct this time.

 

List doesn't work the way you wish it would.

 

List ( InstrumentLesson::Instrument) will get you one column.

List( InstrumentLesson::AB Grade ) will get you the second column.

 

IF there is an entry in every field, in both columns, then the list values will correspond to each other, and you will have to parse the two results to create what you want.

  • Author

Thanks Bruce; that does get all the information needed.

 

But as you guessed, there isn't always info in the 2nd column, so it's not clear which info goes with what..

 

Am I able to use Case and text formatting functions in conjunction with List to try to format the resultant mess of data? Or do people just validate the Listed fields and add "No Data" or some such?

 

Cheers!

Mike

Sometimes people explain what they are trying to do.

Since a portal does this handily - why isn't that the choice here?

  • Author

Sorry Bruce; here's the explanation!

 

I use this field in a tooltip in a class layout. It has info like the pupils tutor group, attendance %, attainment %, baseline ability as well instruments learnt and standards.

It used to be populated with info from 8 fields in the pupils table, but I recently changed to use related records in a portal to give more flexibility.

 

Unfortunately, because the class register is a portal in the class layout, I can't put this info in a portal in a popup within that portal. I do have a portal that has instruments on another tab on the class layout, but the seconds it takes to change tab and select the right kid aren't something you have when a class is in front of you.

 

It sounds like I might just have to put up with a list of the instruments each kid plays (or used to play)!!

Since you already have a workable solution to exactly this problem in another thread why are you not using it? Why did you start this thread? Also note there are getNthRecord solutions.

I use this field in a tooltip in a class layout.

 

It is not easy to replicate a portal in a tooltip. Perhaps you should reconsider this need, as it doesn't sound like good user interface to have anyway. Otherwise you will need to either add a calculation field in the child table, concatenating the instrument name and the grade, and then list that, or use a custom recursive function to go over the related records one by one.

 

 

Unfortunately, because the class register is a portal in the class layout, I can't put this info in a portal in a popup within that portal.

 

Why don't you put this in a popup outside of the portal? If necessary, using an auxiliary relationship based on a global field?

  • Author

Since you already have a workable solution to exactly this problem in another thread why are you not using it? Why did you start this thread? Also note there are getNthRecord solutions.

 

The solution in the other thread was based on having Instument1, Instrument2, Instrument3 and Instrument4, along with Grade1, etc fields in the pupil table.

 

This was a problem for a couple of reasons:

  • Some kids play more than 4 instruments.
  • I could also do with more data about each instrument: status, started / stopped, teacher, exam marks etc.
  • I'm happy for my colleague to add new records about instruments, but less so for them to alter fields in the Pupil table.

As the solution in the other thread was based on different fields in the same table, it didn't solve the same problem as I had of listing different records. Also; I just wanted to learn more about using List - I couldn't find out much about it.

 

Thanks both for your help though - I'm sorted now - got a c field in the instrument lesson table that concancates necessary data and list that into the pupil field which works fine in the tooltip.

 

You are both right though - I will be looking at getting this info into a popup at a later stage - I'll then also be able to edit the data and make it look prettier!!

 

Thanks so much :-)

Mike

The solution in the other thread described how to do what Comment suggested; display a portal in a popup that might be triggered from a portal but is not actually attached to the portal. Thus avoiding the portal in portal problem. It is not dependent on having fields instrument1, instrument2, etc, which is of course not something anyone here would recommend.

  • Author

Sorry Bruce, I thought you were talking about a different thread.

 

I reckon it should be possible to have a few portals in a popup, giving information on a selected student - almost doing the same job as a tooltip, but better :-)

 

But at least I can now get rid of Instrument1-4 fields. So progress is being made...

 

I'm very sorry if I've been frustrating in this thread; it's through stupidity, not desire. I'm really grateful for the support that folks like you and comment have given me.

 

best wishes,

Mike

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.