May 9, 200619 yr I have the following. Category......StartPage# Jazz..........1 Jazz..........1 Blues.........2 Blues.........3 Rock..........4 Rock..........5 I need to populate a new field that will contain the ending page number of the category. I’m not sure whether this requires a script that populates a global field or just a calculation field. The end result would look like this. Category....StartPage#....EndPage# Jazz........1.............1 Jazz........1.............1 Blues.......2.............3 Blues.......3.............3 Rock........4.............6 Rock........5.............6 Rock........6.............6 Thanks in advance for any help. Edited May 9, 200619 yr by Guest
May 9, 200619 yr Start with the last record and loop your way up with a script like this: Sort // in the order of your example Go to record (last) Set variable ($cat ; "") Loop . If ($cat <> category) .. Set variable ($cat ; category) .. Set variable ($page ; StartPage) . End If . Set field (EndPage ; $page) . Go to record (previous, exit after last) End Loop
May 9, 200619 yr You could also create a self join Tables: Table 1 Table Selfjoin (the relationship would be Category =Category) and sort descending by Start Page# Then if you show Table Selfjoin::StartPage, you'll see the highest page#. I'm attaching an example. Hope this works : Martha test.fp7.zip
Create an account or sign in to comment