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 5470 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a calculation "prev_st_1" field that is used in a relationship so that "st" can be calculated.

because of the relationship structure that "prev_st_1" uses to calculate the first x records have no relations and thus return a ?

I need this field to return a 0 if one of the referenced fields is empty, so that the other relationship can work.

My current work around is to create a second calc field "prev_st_2" which looks at "prev_st_1" and if it is empty returns a 0, else returns the value.

any ideas or is my work around as good as it gets?

Posted

Perhaps you can post your calc? I dont quite understand what your orig calc is even for.

Posted

Let ([

n = Count(equipment_list_ST_aux::pk_equipment_list_line_id) ;

all = equipment_list_ST_aux::pk_equipment_list_line_id ;

prev = GetNthRecord ( all ; If (n>0;n;0) )];







prev



)

Posted (edited)

Try:


Let ( [ n = Count(equipment_list_ST_aux::pk_equipment_list_line_id);

        all = equipment_list_ST_aux::pk_equipment_list_line_id;

        prev = Case ( n; GetNthRecord ( all; n ); 0 ) 

      ]; prev

    )

* Edit - typo and added formatting

Edited by Guest
Reason for edit: added closing paran and formatting

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