Jump to content

Recommended Posts

Posted (edited)

Hi, all:

I have a two-part problem:

First, in the attached file, is there a way (in the Parent table/layout) to create a calculation (in CombinedLevels__lct) that will show a comma-delimited list in ascending order--similar to what you see in the portal--sorted by the numeric equivalent grade levels (CHILD::Data__lxn) instead of CHILD::Data__lxt? I can't use a portal since it eats up too much space in the layout I'm working in.

Second, I tried all kinds of permutations in the Custom Function to populate CHILD::Data__lxn with a zero (for the value, K, in Data__lxt) but I just can't push a zero in the field--I have to change the field type to a Number field and manually type it in instead of having a calculation/Custom Function to do the work. What does FileMaker Pro have against calculated zeroes?

Have a day...

Rich

 

CustomOrder--Modded.fmp12

Edited by 21st Century Man
Posted (edited)

Files still cannot be posted directly:

 

25 minutes ago, 21st Century Man said:

show a comma-delimited list in ascending order

I am assuming you want a list of values from one field, sorted by another field in the same record? If you sort the relationship by the "other" field, then the List() function will get you the list in the wanted order, and you only need to substitute the carriage return with a comma. There may be other options, but this one seems the simplest.

I am afraid I couldn't understand the 2nd part.

 

Edited by comment
Posted

I uploaded the file to Wormhole: https://wormhole.app/PpYMZA#-v9Zw3p8WE5pTLUKQUG-CQ

I tried List(), but as far as I can tell that only works on one field--I want to sort the values in Data__lxt by Data__lxn. (It'll make more sense when you see the file.)

As for the second part...just a simple example: Say you use SetField ( blivet ; 0 ) -- the field, blivet, won't be populated with a zero.

Posted (edited)

Thanks for your time and effort, but I don't think I made myself clear. The grades (Data__lxt) need to appear in the same sequential order as their number equivalents, Data__lxn, so the (appearance) order should always be (in ascending order) Preschool > Pre-K > K > 1 > 2 > 3...  that's why their numbered equivalents are number line based -2 (Preschool) > -1 (Pre-K) > 0 (K) > 1 (1 ) > 2 (2) > 3 (3)... so a sort based on Data__lxn is how I want Data__lxt to appear.

As for the 0 (zero) not appearing, if you change Text__lxn to a calculation field, the calc, "GradeLevelConversion__CFpub ( Data__lxt )", then go to the Child table/layout, if K is in Data__lxt the corresponding Data_lxn field will be empty when there should be a zero. All the other fields display Data__lxn correctly, it's just the result is a zero, it doesn't. Why?

 

 

Edited by 21st Century Man
Posted
1 hour ago, 21st Century Man said:

the (appearance) order should always be (in ascending order) Preschool > Pre-K > K > 1 > 2 > 3...

Isn't that exactly what happens in both of the files I posted? In both the portal and the calculation field?

 

1 hour ago, 21st Century Man said:

if K is in Data__lxt the corresponding Data_lxn field will be empty when there should be a zero.

Well, that's very different from:

17 hours ago, 21st Century Man said:

Say you use SetField ( blivet ; 0 ) -- the field, blivet, won't be populated with a zero.

The problem here is quite simple: your custom function has an apostrophe after the "K" character here:

V = "K'"  ; 0 ;

 

Posted

*smh* My wife has been after me for months about having cataract surgery done. I may have to acquiesce after this oversight.

I looked at both files--when I created a new record in Parent, the grade levels (text ones) weren't ordered at all. I'll take another look tonight when I return home.

MANY thanks again for your patience.

Posted (edited)
30 minutes ago, 21st Century Man said:

when I created a new record in Parent, the grade levels (text ones) weren't ordered at all

It won't happen in the 1st file until you populate the Data__lxn field in the newly created child records.

It will happen in the 2nd file, but only after you commit the record (that's a good thing: you don't want portal records to fly up and down while you're still working on them).

 

Edited by comment
  • Plus1 1

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.