#### as text:
#### ConfigureFields script
#Configure all fields from input 'in1' to be mapped
#to the corresponding fields on the output 'out1'
out1 += in1
out1.messageString = unicode
## Get the field names as a list
FieldList = fields.todict().keys()
## Construct a dictionary with the field types
fieldTypes = {}
for fieldName in FieldList:
fieldTypes.update({fieldName:fields[fieldName].type()})
## Calculate the number of input fields
numFields = len(FieldList)
#### ProcessRecords Script
out1 += in1
## Use the first value to initialize the msg string
## (assumes it is not a float in this example)
msg = str(FieldList[0])
## For the remaining fields
i = 1
while i < numFields:
if fieldTypes[FieldList[i]] == float:
## Format the floating point number
val = "{:.2f}".format(fields[FieldList[i]])
else:
## Just turn it into a string
val = str(fields[FieldList[i]])
## Construct a pipe delimited list of the fields
msg = msg + " | " + val
i += 1
out1.messageString = str(msg)