Hello Everyone,
I have the below data table
| Customer # | Warehouse | CustomerType | Turn off notifications | Turn off Untill (Date) |
|---|---|---|---|---|
| 137363 | 016 | TRUE | ||
| 017 | TRUE | |||
| 019 | TRUE | 28-01-2024 | ||
| DNA | TRUE | |||
| TPA | TRUE |
I will get the input from some application
Example: CustomerNumber : one value
WareHouse : one value
Customer Type: one value
now i need to check the below conditions
- Need to check if the CustomerNumber present in the data table or not if present it should check the next value i.e WareHouse. if this is also matched we have to check the Customer Type value. if this is also matched then we have to check the TurnOffUntill.
The Condition for the TurnOfUntill is we have to check with current date. if it is greater then current date
if all the conditions satisfied it should return the boolean as False
- If only one record matched in the data table i.e customer number others are not matched it should return as True
why we’re doing this because if the above conditions are matched we should not send the email to the customers.
WareHouse Condition: If the warehouse is matched without checking the customer we should not send the email
that means it should return the False. WareHouse is like a batch.
if batch is matched we should not send
in the same way CustomerType. if customer type ys matched irrespective of the customer number or Warehouse this should return False
How can i achieve this
Thanks in Advance