Chuck’s Academy of Function Academy An ACEware Webinar
Welcome from Jacksonville, FL!
Today we will dissect... What is a function? What can a function do? Writing report functions Function writing tips Embedding functions Common errors Function help
What is a function? Report functions are special tools or utilities that have a specific purpose
What can a function do? Display a field not in the report cursor Format information Perform calculations Do a specific task after the report runs
Writing Report Functions Functions consist of: –Name –Parameters –Punctuation
Begin with a function name followed by parenthesis ADDNAME ( ) NICEDATE ( ) GETCEU ( )
Add the details ADDNAME (nmid,”nmdphone”) GETCEU (rgcrse) NICEDATE (cobegdate)
How do we know what details are necessary? Student Manager Online Help!
From the online help... Function name and what it will do Where you can use the function You must supply these pieces Extras! Examples!
ADDNAME(nmid, ”nmdphone”) Function name Beginning parenthesis First required parameter (from which table do you want to pull the information) Comma Opening quotes Second parameter (which field do you want to pull) Closing quotes Ending parenthesis
A few tips to remember Parameters are always separated by commas Use opening and closing parentheses to begin and end parameters Single quotes or double quotes are acceptable
You can combine or embed functions Commonly you will need to include a field not in the cursor, and format the same field. NICEDATE(addcudfs(cocrse,”cudfd1”)) NICETIME(addcrse(number,'cocrsetm')) The rules are almost the same
Common errors Field doesn’t exist The field you want to use doesn’t exist in the cursor Use an “add” function to fix the problem Syntax error Usually mismatched quotes, missing parentheses or missing commas Check your punctuation! Operator/Operand Mismatch You’ve mixed numeric and character field types Read about the transform function!
Where will I find a list of functions?
Let’s look at “add” functions ADDCRSE( ) ADDREG( )
ADDCRSE (on an invoice)
ADDREG
How do you know if a field is in the cursor?
That’s plenty for today At our next meeting... Specific functions Specialty functions Date Stamping JustDoIt Questions?
We’ll be back in Manhattan, KS! Part 2 June 15th, 1:00 pm central time