Additional Project Options Not Available in the DIM Project Manager

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

  1. 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.
  2. Open the Project file. This is typically found in this folder C:\Program Files\F2B Data Integration Module\Projects
  3.  Manually make a backup of the Project file in another location before proceeding (not required but recommended).
  4.  Open the XML file for the Project using a text editor.
  5. 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.
    1. 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:
      1. Original Mapping  <column name=”TodaysDate”>{Page1@Date}</column>
      2. 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.


Tags for Project Options

<now />

Returns the current Timestamp (DateTime)

Optional Attributes
  1.  -utc: (Defaults to False) to return the Timestamp with Coordinated Universal Time (UTC) instead of the local time zone

Examples
  1. Get the current Timestamp  
    1. <now />
  2. Get the UTC version of the current Timestamp 
    1. <now utc=”true” />

Gets an item from the Metadata Header of the Form being currently processed. Returns a String.

Metadata Options

  1. FileVersion: This is the eForm format used to create this XML file.
  2. FormDataId: This is the unique ID assigned to the Form when it was sent.
  3. FormRevisionNumber: This is the revision number for the eForm template.
  4. FormTemplateId: This is the unique ID for the eForm template.
  5. ResendOfFormDataId: This is the original Form Data ID if this Form was Re-Sent.
  6. ResendMode: If the Form was Re-Sent, this is the will describe how it was delivered (current possibilities are Reprocess [Re-Send] and Forward).
  7. SenderMachineName: This is the Windows Computer Name of the Tablet that sent the Form.
  8. SenderSystemUserFriendlyName: This is the First and Last names of the Field2Base User that sent the Form.
  9. SenderSystemUserId: This is the unique ID of the Field2Base User that sent the Form.
  10. StartTimeUtc: This is the timestamp of when the Form was first started on the Tablet.
  11. SendTimeUtc: This is the timestamp of when the Form was sent from the Tablet.
  12. SenderUsername: This is Windows Username of the Form Sender.
  13. Title: This is the Title of the Form.

Examples
  1. Get the Form Data ID  
    1. <header>FormDataId</header>
  2. Get the Sender’s Username  
    1. <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
  1. Get the Page Image from Page 1 
    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
  1. -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
  1. Convert the current timestamp into just display Year 
    1. <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
  1. -seed: This is an optional attribute (defaults to 0) which sets the first value when the referenced Table is empty.
Example
  1. 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
  1. Returns a Boolean when evaluating if the Hours for this Region are greater than 8.
    1. <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
  1. -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.
  2. -parameter: This is an optional child element that contains a parameter that will be used in the SQL Query.
Examples
  1. Runs a query to increment the EmployeeId by 1 in the Employees Table. 
    1. <execScalar>select max(EmployeeId) + 1 from Employees</execScalar>
  2. Runs the same query as above but uses the commandText attribute. 
<execScalar> 
   <commandText>select max(EmployeeId) + 1 from Employees</commandText
</execScalar>
  1. 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>
  1. 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>
  1. Runs a query to perform a simple mathematical addition of the two parameters defined.
<execScalar>
   <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 ...