January 29, 201016 yr 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?
January 29, 201016 yr Perhaps you can post your calc? I dont quite understand what your orig calc is even for.
January 29, 201016 yr Author 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 )
January 29, 201016 yr 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 January 29, 201016 yr by Guest Reason for edit: added closing paran and formatting
Create an account or sign in to comment