Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formula to combine multiple fields on one column

Status
Not open for further replies.

mark12010

IS-IT--Management
Apr 28, 2010
32
US
I have a subreport in my report which should give me all patients appts that happened <= today when I try to string the fields i get an error saying i need to put a number between the " "
here is my formula
IF ({appt_data.appointment_date} <= CurrentDate)
THEN
{appt_data.appointment_date}+" "+{appt_data.SERVICE_CODE}+" "+{appt_data.staff_name}
 
The fields you list after the "then" vary in data type. You can either convert each of them to text OR, replace every "+" with a "&".

-LB
 
I have the formula working but now I want to display "No Appt. Data" if apptdate is null
Here is what I have but it isnt working:
datevar apptdate;
stringvar svccode;
stringvar staffname;
IF ({appt_data.appointment_date} <= CurrentDate)
THEN
(apptdate := {appt_data.appointment_date};
svccode := {appt_data.SERVICE_CODE};
staffname := {appt_data.staff_name});
IF isnull apptdate;
then
"No Appt Data"
else
TOTEXT (apptdate) + " " + svccode + " " + staffname
 
remove the semicolor after 'apptdate' and convert 'apptdate' to a string and i think you will be good.


.
.
.
IF isnull totext(apptdate)
then
"No Appt Data"
else
TOTEXT (apptdate) + " " + svccode + " " + staffname
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top