Skip to content

UDF Display Coding Rules ​

The following are Coding items that can be used in UDF Display.

Note: date, numeric, and logical fields must turned into character values to be included in the display.

Coding Items ​

  • Fields – the name of the field you want to display prefaced by the table name. You can use fields from the listed tables depending on which module:
ModuleTablesExamples
NamesNames and Nameudfsnames.nmdisable, nameudfs.nudfc1
CourseCourse and Crseudfscourse.coalias, crseudfs.cudfc1
RegisterRegudfsregudfs.rudfc1
  • UDF Labels - you can use the label of the UDF field you want to display. The name of the label must be prefaces by the Labels table name.

Example: labels.udfc1

  • Text Strings - use text strings as labels, and identifiers between fields. Text strings MUST be enclosed in quotation marks "".

Examples: "Spouse: ", ": ","="

  • + (plus sign) Concatenation Marks - Concatenation mark are used to join the pieces of your UDF display together.

Example: labels.udfc1+"="+nameudfs.nudfc1, "Sponsor:"+crseudfs.cudfc1

  • Formatting Functions - use these functions to format your labels and fields.

TRIM() - trims off any spaces at the end of a label or field.

DTOC() or TRIMDATE() - turns date fields into character values. TRIMDATE allows you to specify the date format (e.g. return 2 digit year, mm/dd/yy).

STR() - turns numeric fields into character values.

SHOWTF() - turns logical fields into character values with the ability to return Yes/No or True/False.

ADDNMUNL() - returns the specified Unlimited Name UDF. Note: Unlimited UDFs do not have labels so you will need to use a text string label.

Example Display Strings ​

These are some sample strings using the above items:

  • Character UDF: trim(labels.udfc1)+"="+trim(nameudfs.nudfc1)
  • Date UDF: trim(labels.udfd1)+"="+trimdate(crseudfs.cudfd1,7)
  • Logical UDF: trim(labels.udfn1)+"="+showtf(nameudfs.nudfl1)
  • Numeric UDF: trim(labels.udfn1)+"="+str(regudfs.rudfn1,8,2)
  • Unlimited UDF: "Spouse: ""+trim(addnmunl(names.nmid,"spouse_name")
  • Two fields on 1 line separated by /: trim(labels.udfc1)+"="+trim(nameudfs.nudfc1)+"/"+trim(labels.udfl1)+"="+showtf(nameudfs.nudfl1)
  • Using the IIF() and EMPTY() functions to return 'No Data' if a field has no value: trim(labels.udfc1)+"="+iif(empty(nameudfs.nudfc1),"No Data",nameudfs.nudfc1)