Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Designed a database for 8.5, now I find out it's going to be used in 8. I have a calculation field that determines an overall status of these related records by using List() function (depressingly native to only 8.5). Any ideas how to revamp this field definition?

Field Definition:

Let( [ $BinStatusList = List( OrBin_OrderNumber::Status_Bin ) ];

Case(

IsEmpty( $BinStatusList ) or PatternCount( $BinStatusList; "Needs Duplication" ) = PatternCount( $BinStatusList; "¶" ) + 1; .........blablablablabla....restofcasefunction..........

)

)

There's not a way to have a Get( RelatedRecordCount ) or something, is there? With that I suppose I could make a custom function with a self-calling Get( PortalRowNumber ) if I knew how many portal rows there were.....

Then again, I love to complicate things. Gotta be a simpler way.

Posted (edited)

If you happen to have fm advanced lying around...

ListFieldContents( Field ; RelatedCountField ; result ; n )

Let( [

n = n + 1 ;

numRecords = Count(RelatedCountField) ;

result= If( n > 1 ; result & ¶ ) & GetNthRecord( Field ; n )

];

Case( n >= numRecords ; result ; ListFieldContents( Field ; RelatedCountField ; result ; n ))

)

Usage:

List( YourRelatedField ; YourRelatedPK ; "" ; "" )

Returns:

My

Name

Is

Earl

And

Isn't

Really

Alex

Next Record Is Empty

But The CF Doesn't Care

Cause It's Counting

A primary Key.

Edited by Guest
Changed "my" to "your"
Posted

mr_vodka --- the "Portal Info in a List" downloaded an empty folder. but the other link you posted worked fine. that Comparison is a great example, thanks!

Genx --- I do happen to have a Developer copy sitting around so I ended up using ListFieldContents() function. thanks! that was a good quick fix.

Posted (edited)

Is there is setting that you have to change on your mac to display files with no application associated with them? You probably dont have FM6 and the files are .fp5 files. Once located, you can just convert them to .fp7 by dragging and dropping into the FM8.

Edited by Guest
TYPO
Posted

Nope. Macs show all files regardless of whether you have an application associated with them. (I do have FM6 by the way.)

I ended up going to their website and navigating to see if I could find it. A couple other .zips did the same thing.... I've tried a few browsers, too; no avail. I'll try on another computer in my office tomorrow. Dunno!

  • 2 weeks later...
  • 2 weeks later...
Posted

The primary key of YOUR related table.

  • 2 weeks later...
Posted

Hi Dave, your missing something :)

Its a custom function, i.e. one you create yourself using the advanced version of FM.

Go to File > Define > Custom Functions.

Create a New Function

Call the function:ListFieldContents

Add these 4 as the variables:

( Field ; RelatedCountField ; result ; n )

This is the main portion:

Let( [

n = n + 1 ;

numRecords = Count(RelatedCountField) ;

result= If( n > 1 ; result & ¶ ) & GetNthRecord( Field ; n )

];

Case( n >= numRecords ; result ; ListFieldContents( Field ; RelatedCountField ; result ; n ))

)

Posted

Just to clarify, it doesn't have to be a primary key (your related table might not have one) it just has to be a field in your related table that is never empty... primary keys just always exhibit that characterstic

This topic is 6527 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.