July 4, 20196 yr I have created a list report with a value list assigning values to fields of certain colours. All from 1 table – no related values. Layout is based on the same table. The script filters the number of records with a certain colour. The script button is located in the footer of the report. Excursion scripts: Departure show Pink Set Variable [ $DeptG; Value:customer::Dep_Date ] Go to Layout [ “Departure_List” (customer) ] Enter Find Mode [ Specified Find Requests: Find Records; Criteria: customer::Bus_Color: “=Pink” ] [ Restore ] Commit Records/Requests Set Field [ customer::Dep_Date; $DeptG ] Perform Find [ ] (This script is assigned to 6 different buttons for each colour) Every colour is assigned to a certain text value assigned by value list, which should show up in a calculation field in the header of the report for print purposes The calculation field has a formula stored: Case ( customer::Transpo 1 = "Rail" ; "Rail" ; customer::Transpo 1 = "Globus Garage" ; "Globus Garage";Transpo 1 = "Gambrinus"; "Gambrinus";customer::Transpo 1 = "Tefra";"Tefra";customer::Transpo 1 = "Sprinter";"Sprinter";customer::Transpo 1 = "Individual";"Individual" ) I am encountering 2 problems: 1.) When I trigger the script, the calculation field comes back with random values from the value list, but never the one set in the value list. It also somehow resets the value list to a random value not matching the calculation. It’ all messed up. 2.) Whenever I click next to the records in the list, the values in the calculation field as well as in the value list disappear which spoils the purpose of printing the list. Anyone with an idea, of where I messed up? I am sort of a rookie and assume that I have messed up something very basic here.
July 5, 20196 yr -Enter Find Mode, remove the existing find request (Restore) -Remove Commit step, never needed while in find mode. But you appear to set a variable based on the current record, then do a find for that record. Very confusing what you’re actually trying to do and where the calculation field fits in. Edited July 5, 20196 yr by Steve Martino
July 5, 20196 yr This calculation: Case ( customer::Transpo 1 = "Rail" ; "Rail" ; customer::Transpo 1 = "Globus Garage" ; "Globus Garage";Transpo 1 = "Gambrinus"; "Gambrinus";customer::Transpo 1 = "Tefra";"Tefra";customer::Transpo 1 = "Sprinter";"Sprinter";customer::Transpo 1 = "Individual";"Individual" ) does nothing useful that I can see. It returns whatever value is in customer::transpo1. You might as well return customer::transpo1.
Create an account or sign in to comment