create a second field that calculated the date in the format: YY & "/" & MM
Show only one of them in your valuelist and use the other one to sort the values.
thanks but does not work as wished...
If I use the first field as sorting criteria and the second to show the date I get
which looks not so good.
If I then select "only show second field", I can only sort with the second field. Then I get
Thank you for your reply
Unfortunately, this example goes way over my filemaker know-how. Especially because in the example they use years and I have month/year combination. Furtheron, they use single records, i have multiple records with 10/15 for ex.
So I don't see how I can apply this to my DB
But thanx anyway
Can someone tell me what
Replace ( 10 ^ repeatCount - 1 ; 9 ; text )
for what stands the sign ^????
The carat works in FileMaker calculations as the exponentiation operator; it's saying "Raise 10 to the repeatCount power". The effect of the whole calculation is a sneaky way to repeat "text" repeatCount times.
This process only works up to 10^8. When the result of the exponential value is represented in notation it fails completely.
10^9 = 1.0e+9
So you cannot rely on this to generate the RepeatCount for the Substitute() if the number is over 8.
Are you sure? Yes, 10^9 = 1.0e+9, but 10^9 - 1 = 999999999. In my testing just now, it works all the way up to 404. (This surprised me; I expected it to fail after 399, due to FileMaker's documented limit of 400 digits.)
ok thanx guys I get the ^
but this gives me something else to wonder about:
I have a function called repeat, with text and repeatCount as var:
// Suggested by Nils Waldherr:
Austauschen ( 10 ^ repeatCount - 1 ; 9 ; text )
// The recursive way...
// Case ( repeatCount > 0 ; text & Repeat ( text ; repeatCount - 1 ) )
Then I have a field with a formula, to invert the order:
Repeat ( Char ( 65279 ) ; SetVar ( [a = LeftValues ( mois ; 2 );b =rightValues ( mois ; 2 ); c = "300"]; c - a * b) ) & mois
If c is bigger than 300, this field gives me back ?mois. why is this? LeftValues ( mois ; 2 ) = 10 and rightValues ( mois ; 2 ) = 15.
with c < 300, it works perfectly
are there any other helps with sorting value lists?
make the values, as I often do to be YYYY_MM and then they sort 'alphabetically'. You can always "parse" if needed. I create an auto-enter (text) field to be this base on any date field:
yyyymm = GetAsText( Year( myDateFld ) & "_" & Right( "00" & Month( myDateFld ) ; 2 )
you may optionally choose to not include the underscore (YYYYMM) or use a space (YYYY MM). These all sort correctly - for 'readability', I prefer the underscore. Teach your users to select based on the year being before the month.
I use these for charting and then have the labels be parsed out to show JAN 2000 instead of 2000_01, for example.
These fields are also handy when needing to sort for reports that need month & year sub-summaries. As well as the use in value-lists.
Thank you for your response, but it still sorts my list ascending instead of descending
I would like to have the most recent on top
I saw a file from filemackerhack, but it's way to hard for me to understand and to make it work for me. If there is a tutorial out there on how to built this on my own....