# question

## Multiple IF and OR Statements in an expression.

I am trying to simply clear a field given a few conditions. If the date falls in the 3 days, yesterday, today and tomorrow, AND the record has a certain LOC value and a specific OrdStatusDesc value. Below is what I have and oddly enough it runs without error but it does not remove the dates at all.

(Fields!loc.Value = "MOD") OR

(Fields!OrdStatusDesc.Value = "Pick Ticket Printed")

,Fields!promise_dt.Value,"")

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

·

Not sure I understand your question, but if you want to clear the fields if your conditions are true, then the last two expressions are in the wrong order:

(Fields!promise_dt.Value = Today()) OR

(Fields!loc.Value = "MOD") OR

(Fields!OrdStatusDesc.Value = "Pick Ticket Printed")

,"" ,Fields!promise_dt.Value)

Also, there is not much point in adding 0 to today() so I simplified the equation a bit.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sorry if I am not explaining myself very good. I have 2 statements that work independent of each other, the "Ask" is to have them work together, so that if either date statement is true, leave the date, if its not true and the date is not today or tomorrow, replace the date field information and input TBD. As I say, each of these statements work independent of each other.

This image is an example of what I am going for. (Todays date is 5/19/2022) so all I am trying to do is leave the dates of Today and Tomorrow in tact and replace all other dates with TBD.

.

Works Today Only Independently

=IIF(Fields!promise_dt.Value <> Today(), "TBD", Fields!promise_dt.Value)

Above leaves only today's date and all other blocks read TBD. (The problem is I want the second statement to work before any changes are made)

Works for Tomorrow Only Independently

Thank you so much for even taking time to review this.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.