I have 2 tables. One is Package details where all the package details are mentioned. Below are the fields in it. Any new package that is introduced has to be entered in this table first.
- Package ID : Unique ID
- Package Name : Text
- Category : Enum
- Package Cost : Price
- Total No. of Days : Number
- Validity : Number
- Allowed Pet Sizes : Enumlist
- Allowed Pet Coats : Enumlist
- Applicable Pet Types : Enumlist
- Require Pet Size : Y/N
- Require Pet Coat : Y/N
- Require Pet Type : Y/N
The other table is Packages with the below fields:
- Pack ID : Unique ID
- Customer ID : Ref Customer Database table
- Pet ID : Enumlist with Base Type as Ref to Pet Details Table
- Package Name : Ref to Package Details
Now basically I want you to help me with a formula which I can enter in the Valid If of field Package Name in the Packages tables.
I want the formula to show only those packages where pet type, pet size and pet coat of the selected pets in the dropdown matches with the packages requirement. The combination can be varied.
For example a 30 day overnight boarding package, will have TRUE for Require Pet Size and Pet Type but a False for Require pet Coat. So if the pet type is dog, and the allowed pet sizes in that package is small and medium, then that option should be visible in the packages form if the selected pets match the condition. And all the selected pets should match the condition.