Dynamically Changing Import Formats

You can use the BefFileImport event to modify the import format for a location dynamically. The following script changes the import group; the change is based on the file name.

To implement the script, you create two import formats and assign one of them to the FDM location. The script evaluates the file name and, if necessary, changes the import format.

-------------------------------------------------------------------
Sub BefFileImport(strLoc, strCat, strPer, strFile)
‘------------------------------------------------------------------
‘Hyperion EVENT Script: 
‘
‘Created By:  	Admin
‘Date Created: 	10/28/2004 4:29:54 PM
‘
‘Purpose: Change the import group if importing the B/S
‘
‘------------------------------------------------------------------

‘Check if the file name contains “BS”
If InStr(strFile,”BS”)>0 Then
	‘Override default import group with B/S import group
	RES.PblnImportGroupOverride=True
	RES.PstrImportGroup=”BSImportFormat”
End If

End Sub
-------------------------------------------------------------------