Additional Project Options Not Available in the DIM Project Manager
Overview
The Field2Base Data Integration Module does have some Project features that can be added by directly editing the Project XML file with a Text Editor. Most of these features are advanced or not often used options and were not included in the User Interface for that very reason.
How to Update the Mapping in a DIM Project File
- The Data Integration Module Project Manager should be closed (or at least not have the Project you want to edit open) before starting the update.
- Open the Project file. This is typically found in this folder C:\Program Files\F2B Data Integration Module\Projects
- Manually make a backup of the Project file in another location before proceeding (not required but recommended).
- Open the XML file for the Project using a text editor.
- Most of the project file can be ignored as these options are only added to the Column tags. Find the mapping you want to update by manually scanning the file or doing a search on “<column name=X>” where X is the name of the Database Column that will be in the Mapping.
- For example, to update a mapping for the column "TodaysDate" from the {Page1@Date} Region of the Form to the date when the Form is processed by the DIM:
- Original Mapping <column name=”TodaysDate”>{Page1@Date}</column>
New Mapping Using the “Now” Attribute <column name=”TodaysDate”><now /></column>
Note: Remember to open and properly close any tags you add or edit to the Project file.
Note: Please remember that since you are editing outside of the Project Manager, there are no automatic backups generated so it is highly recommended that you back up the Project file before making edits in this fashion.
<now />
Returns the current Timestamp (DateTime)
Optional Attributes
- -utc: (Defaults to False) to return the Timestamp with Coordinated Universal Time (UTC) instead of the local time zone
Examples
- Get the current Timestamp
- <now />
- Get the UTC version of the current Timestamp
- <now utc=”true” />
Gets an item from the Metadata Header of the Form being currently processed. Returns a String.
Metadata Options
- FileVersion: This is the eForm format used to create this XML file.
- FormDataId: This is the unique ID assigned to the Form when it was sent.
- FormRevisionNumber: This is the revision number for the eForm template.
- FormTemplateId: This is the unique ID for the eForm template.
- ResendOfFormDataId: This is the original Form Data ID if this Form was Re-Sent.
- ResendMode: If the Form was Re-Sent, this is the will describe how it was delivered (current possibilities are Reprocess [Re-Send] and Forward).
- SenderMachineName: This is the Windows Computer Name of the Tablet that sent the Form.
- SenderSystemUserFriendlyName: This is the First and Last names of the Field2Base User that sent the Form.
- SenderSystemUserId: This is the unique ID of the Field2Base User that sent the Form.
- StartTimeUtc: This is the timestamp of when the Form was first started on the Tablet.
- SendTimeUtc: This is the timestamp of when the Form was sent from the Tablet.
- SenderUsername: This is Windows Username of the Form Sender.
- Title: This is the Title of the Form.
Examples
- Get the Form Data ID
- <header>FormDataId</header>
- Get the Sender’s Username
- <header>SenderUsername</header>
<pageImageIndex>
Gets a Page Image of the Form. The first page is index 0. Returns Byte Array (or Null if the Page Does Not Exist or the Data is Not Available).
Example
- Get the Page Image from Page 1
- <pageImageIndex>0</pageImageIndex>
<toString>
Converts an Object into String format. Returns a String (or Null if the Object Format conversion returned Null).
Optional Attributes
- -format: This is an optional attribute (there is no default) format string. If this is not set, or the object is not IFormattable, the result of a direct String Conversion is returned.
Example
- Convert the current timestamp into just display Year
- <toString format=”yyyy”><now />/toString>
<incrementMax />
Gets the Max Value from a Database and increments this value by 1. This function does require that you have the Table and Column defined before it can be used.
Optional Attributes
- -seed: This is an optional attribute (defaults to 0) which sets the first value when the referenced Table is empty.
Example
- Increment ColumnA by 1 for this Table.
<insert table=”SomeTable”>
<column name=”ColumnA”><incrementMax /></column>
</insert>
<eval>
Evaluates an expression using the same language as Conditional Expressions.
Example
- Returns a Boolean when evaluating if the Hours for this Region are greater than 8.
- <eval>{Page1@Hours}>8</eval>
<execScalar>
Executes a SQL Query and returns the Result. Data Type returned from ADO.NET’s default for the Query.
Optional Attributes
- -commandText: This is an optional child element that contains the actual command text used in the Query and is only required if there are parameters.
- -parameter: This is an optional child element that contains a parameter that will be used in the SQL Query.
Examples
- Runs a query to increment the EmployeeId by 1 in the Employees Table.
- <execScalar>select max(EmployeeId) + 1 from Employees</execScalar>
- Runs the same query as above but uses the commandText attribute.
<execScalar>
<commandText>select max(EmployeeId) + 1 from Employees</commandText
</execScalar>
- Runs a query to select the EmployeeId for all Employees that match the parameter entered which is the EmployeeName entered in the Form in this case.
<execScalar>
<commandText>select EmployeeId from Employees where EmployeeName=?</commandText>
<parameter>{Page1@EmployeeName}</parameter>
</execScalar>
- Runs the same query as above, but the parameter has been defined with a name as well as a data type.
<execScalar>
<commandText>select EmployeeId from Employees where EmployeeName=@empName</commandText>
<parameter name=”@empName” type=”varchar(50)”>{Page1@EmployeeName}</parameter>
</execScalar>
- Runs a query to perform a simple mathematical addition of the two parameters defined.
<commandText>select ? + ?</commandText>
<parameter>{Page1@Value1}</parameter>
<parameter>{Page1@Value2}</parameter>
</execScalar>
Popular Articles
Forms Designer Quick Start Guide
Overview Field2Base Forms Designer is the proprietary software application that allows your existing paper forms to be quickly converted to a smart E-form available to your end users via our mobile and web-based Mobile Forms applications. This ...
Portal 11.28.2023 Release Notes
Overview Our release notes offer brief descriptions of product enhancements and bug fixes. We include links to the current articles for any affected features. Those articles will be updated shortly after the Portal release to include new ...
Integration Service Configuration Guide
How To Configure Integration Services To Allow Read/Write Access on a Network Path All of our Integration Products, including the DIM, DUU, and EDM have respective Windows Services responsible for communicating with our server. Occassionally, ...
Data Integration Module (DIM) Migration Guide
Overview This article provides the information necessary to migrate the Field2Base Data Integration Module (DIM) over from one server to another. Please refer to the DIM Install Guide for the initial installation of the Field2Base DIM. Once that's ...
How to Check the Version of Integration Products Running on a Windows 10 Machine
Right-click on the Start menu button. Click on Apps & Features. In the Apps & Features search bar type in the Integration Product you are looking for, eg. F2B Data Integration Module, F2B Data Upload, or F2B Enterprise Dispatch Module. Click to ...