So i have an inventory database and a customer wants table where you can specify what they are looking for. There is a list of 4 criteria (item, diameter, manufacturer and model) where the item always has a value while the other fields may be left blank. On the customer wants side, i have the portal filtering to match the criteria chosen and a refresh portal script trigger on the 4 fields. It seems to work fine. Here it is for reference:
Case ( Customer Wants::Diameter = "" and Customer Wants::Manufacturer = "" and Customer Wants::Model = "" and Customer Wants::SC ≠ ""; Customer Wants::SC = Inventory::SC; Customer Wants::Diameter = "" and Customer Wants::Manufacturer ≠ "" and Customer Wants::Model ≠ "" and Customer Wants::SC ≠ ""; Customer Wants::Model = Inventory::Part Number and Customer Wants::Manufacturer = Inventory::Manufacturer and Customer Wants::SC = Inventory::SC; Customer Wants::Model = "" and Customer Wants::Diameter ≠ "" and Customer Wants::Manufacturer ≠ "" and Customer Wants::SC ≠ ""; Customer Wants::Diameter = Inventory::Diameter and Customer Wants::Manufacturer = Inventory::Manufacturer and Customer Wants::SC = Inventory::SC; Customer Wants::Manufacturer = "" and Customer Wants::Diameter ≠ "" and Customer Wants::Model ≠ "" and Customer Wants::SC ≠ ""; Customer Wants::Diameter = Inventory::Diameter and Customer Wants::Model = Inventory::Part Number and Customer Wants::SC = Inventory::SC; Customer Wants::Diameter = "" and Customer Wants::Model = "" and Customer Wants::Manufacturer ≠ "" and Customer Wants::SC ≠ ""; Customer Wants::Manufacturer = Inventory::Manufacturer and Customer Wants::SC = Inventory::SC; Customer Wants::Diameter = "" and Customer Wants::Manufacturer = "" and Customer Wants::Model ≠ "" and Customer Wants::SC ≠ ""; Customer Wants::Model = Inventory::Part Number and Customer Wants::SC = Inventory::SC; Customer Wants::Model = "" and Customer Wants::Manufacturer = "" and Customer Wants::Diameter ≠ "" and Customer Wants::SC ≠ ""; Customer Wants::Diameter = Inventory::Diameter and Customer Wants::SC = Inventory::SC; Customer Wants::Model ≠ "" and Customer Wants::Manufacturer ≠ "" and Customer Wants::Diameter ≠ "" and Customer Wants::SC ≠ ""; Customer Wants::Model = Inventory::Part Number and Customer Wants::Manufacturer = Inventory::Manufacturer and Customer Wants::Diameter = Inventory::Diameter and Customer Wants::SC = Inventory::SC; "" )
seems a little convoluted.
The issue becomes when i want to put a portal on the inventory item and list customers interested in that item. Basically, if everything but the item is blank it should put the customer name in the portal of every instance of that item in the inventory layout and if other criteria are selected, it should only list the customer if they match all the criteria selected in the wants table. The filtering produces some unexpected results, namely that doing a search for customer inside the portal is inaccurate.
I feel like the solution is staring me in the face and sticking it's tongue out at me and blowing a raspberry, but for the life of me I am stymied.
Thanks for playing. and whatever you do, don't try and parse that ugly filter portal script. blech.
LImore