filtering by contact status
my database contains 3 main tables, contacts machines and requests. i have a report layout, based on the machine table, which lists all of the machines in the system, but sorted by contact and then request (i.e. it will show me all the contacts in the system who have requests which have matching machines, like the following:
I have set up an OnEnter script that puts "*" in ContactID field (so that only machines associated with a request by a contact show up, as opposed to all machines), as well as "Available" in the Machine Status field, so that only available and not sold machines show up. I also want to filter the matches so that it takes into consideration a customer's status of either a retailer or dealer. right now, there is a match if a specific request's make, model, and age match those of a machine in the system. a machine has two prices, a retail and dealer price. a customer can be a dealer or retailer. what i need is for example if the customer who made a request is a retailer, the report only lists a matching item if the item's retail price is equal/less than the customer's budget specified in the request. conversely, if he was a dealer, it would do that for the dealer price. i have attempted to do so with the script but it does not seem to be working. the attached screenshot shows the script i am using as well as the specifications of the Perform Find  step. please advise, thanks.