I am trying to use a function to take the patient's next appointment date to send a flag. The problem is that when I extract just the date, it shows up with ' at the start and end. ie '1/2/2015' as opposed to 1/2/2015.
Here is the MEL I am using:
{!fn fnapptdate(){
apptdate = getfield(appt_next(),",","")
fulldate = sub(apptdate,1,1)
}
{! document.nextappointmentdate = fnapptdate()
}
The idea would then be to have the flag set up to be sent on document.nexappointmentdate.
Anyone know how I can get rid of the ' at the beginning and end? I tried remove(fulldate,1,1) and remove(fulldate,11,1) but no luck with that. Thanks,
I think that has something to do with the way you are\ going from an array to a string, you could try
fulldate = str(sub(apptdate,1,1)) or replacestr(fulldate,"\'",""), one of those would probably work
Mike
Thanks Mike,
yeah that was it! After fulldate = sub(apptdate,1,1) I just added return str(fulldate) and it worked. Thanks!