FILECONTENTS

This function returns the contents of a named text file at a specified location.

Return Value

String

Syntax

FILECONTENTS( location )

where location is the name and location of the file from which you want to retrieve text.

This location must specify both the path to the file and the file name, using the standard format:

C:\myFiles\myFolder\myTextFile.txt

This file is not required to be a *.txt file, necessarily, but it must be a file that is text-based to be useful. Other useful file types include (but are not limited to) *.htm, *.rtf, *.xml, and so on.

You can use a relative path, but be aware that, if you do, the path is relative to whatever the working directory is where the event handler is running. If the event handler is running:

  • Using the Infor Framework Event Service (in the case of queued and waiting events and handlers), the working directory is the folder containing EventService.exe. Usually this is the application's installation folder (for example, C:\Program Files\Infor\Application on the utility server).
  • Using the Infor Framework IDO Runtime Service, the working directory is the folder containing IDORuntimeService.exe. Usually this is the application's installation folder (for example, C:\Program Files\Infor\Application on the utility server).
  • Inside the database, the working directory is %WINDIR%.