February 25, 200817 yr Hello All: I ran across another challange with my DB described in http://fmforums.com/forum/showtopic.php?tid/192648 What I am essentially trying to do is: - select a set the records from a table - based on the criteria that I get from another table for a field that relates the two, and then - further reducing the set to those records that has a quantity greater than zero. I have the following script: [i am starting this script from a button on a layout that is displaying a record from "equipment_repaired" table. ] Set Variable[$r_t_no; Value:equipment_repaired::Repair_Ticket_No] Perform Find [Restore] #COMMENT: Criteria: Parts_Used::Repair_ticket_from_main:[=$r_t_no] #COMMENT: Criteria 2: Parts_Used::Quantity_Used: [> 0] Go to Layout[Parts_Used] Sort Records [Restore; No dialog] Print[Restore; No dialog] go to layout [original layout]
February 26, 200817 yr Author Problem solved.I use a different set of script commands: Go to Related Record [ From table: “Parts_Used”; Using layout: “R_Parts_Used” (Parts_Used) ] [ Show only related records ] Constrain Found Set [ Specified Find Requests: Find Records; Criteria: Parts_Used:: Quantity_Used: “> 0” ] [ Restore ] Sort Records [ Specified Sort Order: Parts_Used::Part_No; ascending ] [ Restore; No dialog ] Print [ Records being browsed; All Pages; Orientation: Portrait; Paper size: 8.5" x 11" ] [ Restore ] Go to Layout [ original layout ]
Create an account or sign in to comment