Skip to main content
Question

Multiple Condition If/Then

  • September 27, 2021
  • 0 replies
  • 53 views

Good Morning!
I have an If/Then Statement that I need to have multiple conditions. I want the find the date between two appointments. Both Appointment dates are listed in the field [appointment date] however there are different appointment types attached to those dates. I am trying to find the date range between new patient appointments and ultrasounds. These are labeled as "NEW PATIENT" and "US IN MAP." Here is my current formula that is not working.

If([REASON FOR VISIT]="NEW PATIENT",
[REASON FOR VISIT]="US IN MAP",
abs(todays([APPOINTMENT DATE]-[APPOINTMENT DATE])),
null, null)

All help is appreciated, thank you!

------------------------------
Hunter Collins
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+14
I think you might need to provide more context for your current structure. A single date field, [Appointment Date] cannot hold two dates. I suspect you have a child table of appointments, with one field called [Reason for Visit], and one field called [Appointment Date]?

If so, what is the parent table, and how many appointments can be children to that parent?

In general, if you have a formula date field, the syntax would be:
If(
[Reason for Visit]="New Patient", [Date that will Display Goes Here],
[Reason for Visit]="Us in map", [Date that will Display Goes Here],
[Else this date will display]
)

------------------------------
Michael Tamoush
------------------------------