FixFields

Takes one parameter, a single character

Description:

This will run the function MakeValidAlias on each Field in the Work Query. This is useful when importing data that has known Fields, but those Fields contain spaces and/or other invalid characters for a Field.

MakeValidAlias is used instead of MakeValidField because the later is used to ensure valid Field names within a DB Table, and is more restrictive than what may be used in a Query.

This command comes with a single optional parameter, which may contain the symbol (single character) to be used to replace spaces with. If this parameter is omitted, or if it is blank, spaces will be removed instead of being replaced with anything. In this case, the MCase function will also be run on it first, so that the resulting name is in CamelCase.

In order to allow comments to be in a header cell without becoming part of the name, anything following a ( will be removed.

Example:

FixFields ""

* Input Field Name: It's a Brown Fox (that jumps!)
* Output: ItsABrownFox