NOTICE: You are in the old ClientSpace Help system. Please link to the new ClientSpace Help here https://extranet.clientspace.net/helpdoc/home/ClientSpace.htm

Dataform Tutorial - Data Management From A - Z

Summary

The following tutorial is designed to familiarize you with dataform creation and customization.  The tutorial is intended to build knowledge in a stepwise fashion, beginning with base dataform creation and moving through more and more advanced topics including dataform linking, custom link configuration, configurable field display and business rules configuration.   Training should begin by right clicking the following link and using the 'open in new window' option (or Ctrl-Click to open in a new tab) to  log into the NetWise Training install located at this Training Site using the username and password provided by your trainer.   Due to the shared nature of the training database you will need to add an underscore with your initials to the end of the Dataform name and lookup Group names in order to make them unique ( _xxx with xxx being your initials).  Throughout this this course you will check your work against the Dataform Specification report.  This report is available through the report list, if you have not already done so, add the report list to your user profile. 

Go to your profile   and Click the the Modules Action Item, then click Add and search for Report

Double click the Report List to add it to your active modules, then Save your changes.




MODULE 1: Creating your first Dataform

The Project:

The first step in dataform creation is to understand the data you will need to store and its relationship to other data in the system  Designing these types of data storage systems is called Data modeling and Wikipedia defines data modeling as a process used to define and analyze data requirements needed to support a business processes within the scope of corresponding information systems in organizations. Therefore, the process of data modeling normally involves professional data modelers working closely with business stakeholders, as well as potential users of the information system. 

ClientSpace gives the business stakeholders and potential users the ability to create these information systems themselves through the ability to create and configure dataforms.  A dataform in the ClientSpace system is a generated web page object with an underlying database to store information.  Think of the Database as a filing cabinet, the Client Workspace as a Folder in the filing cabinet and the dataform as the document being stored in the folder.  Single forms are a single page document, multiforms would be a collection of related documents (all of the employee applications for example, paperclipped together).  Before proceeding with the creation and configuration of your dataform, it is recommended you review the KnowledgeSpace article: Dataforms - Workspace Building Blocks and refer to this article throughout this tutorial.  The exercise we will run though is to create a simple orders management system for Mikes Bikes - a locally owned and operated bicycle repair shop.  The system will need to track customers and their important information, as well as Orders associated with these customers.  Orders will consist of both parts and labor.  We will begin by creating a Customer information tracking dataform, the Customer Info page.  Each client workspace will have a single Customer info page and that page should contain the following information:

 

Field NameField LabelDatatype
 CustomerData Customer DataFieldset 
NameCustomer NameText -Wide
Address1Address OneText-Wide
Address2Address TwoText-Wide
 City City Text
 State State Text
 ZipZipCode  Zipcode
 Phone Phone PhoneNumber
 CustomerTypeCustomer Type  Lookup (core) 

Table 1 


Lets start by creating the CustomerType_xxx lookup group and the associated lookup values.  It is recommended you review the KnowledgeSpace article Adding Or Configuring Lookups prior to starting this exercise and reference this article should you have any questions.  Exercise one is to create the necessary customer type lookups based on the criteria found in Table 2 below.  Due to the shared nature of the training database don't forget to add an underscore with your initials to the end of the Dataform name and lookup Group names in order to make them unique ( _xxx with xxx being your initials).  

Exercise One: Adding and configuring lookups

The Customer Type lookup should use a lookup group of CustomerType_xxx and contain the following lookup values:

LookupGroupCodeDecode
CustomerTypeRResidential
CustomerTypeBBusiness
CustomerTypeCCorporate (bulk)

 Table 2 


Lookups consist of a Lookup Group, and Lookup values themselves, which contain at a minimum a Code and Decode value.  Note that the code and decode values do not have to match, you may want to do something similar in the case of a long decode value.  To add or configure a lookup, perform the following steps.

  1. Go to System Administration  | Lookup Admin.

  2. From here you can add a new Lookup Group, or Add / Edit the Lookup values of an existing Group.

  3. To add a new Lookup Group, Click on Manage Groups and then Click Add.

  4. Complete the Group Name field and add a description if you have many similar groups, to avoid confusion when using Lookups.
  5. Click Save.  To go back to the Lookup Admin Screen and start adding Lookup values to the group, click the Back button.
  6. To add lookup values to a group, Click the Add button, select the Group you would like to add codes to and complete the Code and Decode fields on the Lookup detail record.   If this is a pre-existing group, it is a good idea to first Search for the Group in question, and review the existing Lookup Values (Code and Decode) to make sure you don't create duplicates.  Remember to check the 'Include Inactive' checkbox when searching, as inactive values are hidden from the list by default.
  7. The Code value of a Lookup is the actual data value that is stored in the database when a record is saved. 
  8. It is a best practice to remove any extraneous spaces and special characters from the Code value when creating a new lookup record and to use PascalCase formatting - that is the first letter of each individual word is capitalized.  This is different from CamelCase formatting as seen in the Field Name on the screenshot below, as CamelCase may begin with lowercase lettering.
  9. The Decode value of a Lookup is what is displayed on the dataform page when you view ClientSpace in your browser,  Code and Decode are often the same, but aren't required to be.

    For more information on adding and configuring lookups, see Adding Or Configuring Lookups.


Now that you have your lookup configured, lets start creating a dataform.  Remember to refer to Dataforms - Workspace Building Blocks if you have any questions during this process. 

Exercise Two: Creating the Customer Info Dataform

Add the CustomerInfo_xxx dataform by going to System Administration  | Dataform Admin | Add Dataform and setting the following options in the Add Dataform dialog:

Option

Value

Dataform NameCustomer Info_xxx
CRM NotesNo CRM Notes
Comment Label StyleMouse Over
 DescriptionMain Form for storing customer Information
 Can Have Multiple

Unchecked 

 Show Tasks IconChecked 
 Search On LoadUnchecked 
 Show PrinterChecked 
Organization Form 

Unchecked 

Show Notification Unchecked 
Contact Form Unchecked 
Secured Unchecked 
Show Spell Check  Unchecked  
Allow Cloning Unchecked  
Show Administrative Unchecked  
Enable Time Tracking 

Unchecked  

Suppress Child FormUnchecked  
Suppress History Icon Unchecked  
Use TransactionUnchecked  

Table 3 

Press 'Save' when you are done.  The system saves your changes and creates a new SQL Table using the values you provided.  This table is a shell for the fields you will place on the dataform where the information will actually be stored.  At this time the system will also add a set of standard fields to the table, such as CreateDate, CreatedByUserID, DateUpdated, UpdatedByUserID, the PrimaryKey of the table (in this case pkCustomerInfo_xxxID) and so on...    


Now lets proceed to Dataform Field Configuration and create the actual fields where you will store customer information.  Before beginning the next section, be sure to read up on Dataform Field Configuration / Maintenance in the dataforms document, pay special attention to information on Dataform Field Naming Standards  as fieldnames, once set,  cannot be changed without deleting and recreating the field.   

Exercise Three: Adding and configuring fields

Lets add the fields described in Table 1 as they are presented from the top down.  First create a CustomerData fieldset.  This will add bounding box to the page, making the data more organized.  Next add the fields inside the Customer data fieldset as described in  Table 1 being careful to follow datatype field naming conventions:

Field NameField LabelDatatypeFieldset  RowColumn
 fsCustomerData Customer DataFieldset 
 10
NameCustomer NameText -Wide Customer Data 101
Address1Address OneText-Wide Customer Data 20
Address2Address TwoText-Wide Customer Data 30
 City City Text Customer Data 40
 State State Text Customer Data 40
 ZipZipCode  Zipcode** Customer Data 50
 Phone Phone PhoneNumber Customer Data 50
 luCustomerTypeCustomer Type  Lookup (core) Customer Data 60 

 **  Make sure you configure the Related Data for the zipcode datatype as outlined in the following document: Configuring the ZipCode Datatype.


Having the ability to add and edit dataforms is great, but the dataform will be unusable until it is published.  In the next exercise we will explore Creating a Client Orders Template where your dataforms will be hosted.

Exercise Four: Publishing your dataforms

 Now that you have a Customer Data dataform, let's give it a home.  Templates are used by the system to create custom Table of Contents and collections of dataforms that can be used when Workspaces are generated.  In our example, a workspace will equal a client account, so we will have one Customer Data Form with many associated other dataforms.  We will start by first creating a template Workspace. 

Go to System Administration  | Template Maintenance | Add Template.   A Create Template dialog will prompt for a Name and Group.

Name the Template Customers_xxx and select the Clients group, then click 'Save'

The system will open a blank workspace, presenting you with some TOC icons as seen below

Lets start configuring our template - start by clicking the wrench to open the Workspace Maintenance control panel and click on Workspace Settings

You can see in this dialog that the Template name is Customers_xxx and that it belongs to the Clients group.  Access level should be 'Private' and 'Use as a Template' should be checked.

Let's start by making our TOC more attractive.  Click on the Left Nav tab and change the 'Icons Color' setting from black to 3D. 

While we are here, let's also change the background color of the TOC to something more appealing. Click on the color picker for 'Background' and choose a color that you like - keep in mind that we will need to be able to see the TOC document links, so don't make your TOC too dark.

Click 'Save' to see your results.  You will be prompted with a message, just click 'Ok'.

Nothing happened, right?  That's because the TOC settings of a workspace are loaded when you open the workspace. 

To see you changes take effect, click the wrench at the top of the TOC again, this time select 'Table of Contents Maintenance', it has an icon like this

You will be presented with a blank TOC (no dataforms yet), but at the bottom of the Table of Contents window you will see a refresh button  click this to see your TOC changes take effect.

Now let's add the Customer Info dataform to the TOC.  Click the 'Back' button at the bottom of the TOC Maintenance, then click 'Data Management' to add your dataform - the icon looks like this .

Click the 'Add' button, then in the Dataform Search dialog, choose the Customer Info_xxx dataform by double clicking it in the list.

You have added the dataform to the workspace, but it will not appear on the TOC until you click the 'Add to TOC' button, then refresh the TOC again.

As this is going to be our landing page for the Template, we need to also set this dataform as the Workspace Creation Dataform under Workspace Settings.

Go to Workspace Maintenance  | Workspace Settings and select Customer Info_xxx in the Workspace Creation Dataform dropdown.

Click 'Save'

Module Review

Now it's time to check your work.  Go to the Report List in ClientSpace and run the Dataform Specification report for your newly created Customer Info_xxx form.  Compare your work to the following Dataform Exercise Validation.

How did you do?  Are your fields all in the right places, did you remember to follow field naming conventions?  If any of the fields don't match, delete and recreate them to match the spec before proceeding to the next Assignment: Multi-Forms. 


  


 Return to Top

Module 2: Multiforms - Doin' dataforms multi-style

Now that you have a single dataform under your belt, let's create the Order Form multiform.  

Exercise One: Creating the Work Order Multiform

 Multiforms are built the same way you built the Customer Info form, but with a few crucial differences.  Creating a multiform requires your to check the 'Can have multiple' checkbox on form creation, and also requires you configure display columns for the multiform list that will be presented when using the dataform.  As you just created a dataform, you are now somewhat of an expert, so we won't review the entire process here, we'll just give you the specs and let you figure it out.  Let's begin with the Lookup Specs - this dataform is a little more complicated and so has 3 different lookups that will need to be configured:

TypeOfWork_xxxParts_xxxLabor_xxx
CodeDecode
RepairRepair
ReplaceReplace
EstimateEstimate
CodeDecodeDe
WheelWheel
TubeTube
TireTire
SpokeSpoke
GearGear
ValveStemValve Stem
ChainChain
FrameFrame
HandlebarHandlebar
PostPost
GripGrip
BrakeHandleBrake Handle
BrakeCableBrake Cable
BrakeCaliperBrake Caliper
BrakeShoeBrake Shoe
CrankCrank
PedalPedal
CodeDecode
HourlyHourly
FlatFeeFlat Fee
PerPiecePer Piece

 And now for the Dataform Specs:

Option

Value

Dataform NameOrder Form_xxx
CRM NotesNo CRM Notes
Comment Label StyleMouse Over
 DescriptionCustomer Orders Form
 Can Have Multiple

Checked 

 Show Tasks IconChecked 
 Search On LoadChecked 
 Show PrinterChecked 
Organization Form 

Unchecked 

Show Notification Unchecked 
Contact Form Unchecked 
Secured Unchecked 
Show Spell Check  Unchecked  
Allow Cloning Checked
Show Administrative Unchecked  
Enable Time Tracking 

Unchecked  

Suppress Child FormUnchecked  
Suppress History Icon Unchecked  
Use TransactionUnchecked  


 And finally the dataform fields

Field NameField LabelDatatypeFieldset  RowColumn
 DateOfWorkWork Date Date 
  5 
 luRequiresParts Requires Parts Y/N Lookup
  52
 fsParts Parts InfoFieldset 
 10
 luPartsPartLookup (core)  Parts Info 10
 PartsCountParts CountInteger  Parts Info 10
 DescriptionDescription TextWide  Parts Info 20
 fsLabor Labor Info Fieldset
 20
 luTypeOfWorkType of Work  Lookup (core) Labor Info 10
 luLaborBilling Labor Billing  Lookup (core)  Labor Info  15 
 PerHour Per Hour money Labor Info 15
 FeeAmountFee Amount money Labor Info 20
 PieceCount

Piece Count

Integer  Labor Info 30
 AmountPerAmount Per Piece money  Labor Info  30
 WorkDescDescription of Work Text Area  Labor Info  40
 WorkJournalWork Journal Log  Labor Info   50 

Don't forget to configure the display columns for the multiform list, you need at least one column configured, which columns should be displayed are at your discretion  - if you have questions about this or any other step in the process, refer to Dataforms - Workspace Building Blocks for more information.

Repeat Exercise Four in Module one and add your Order Form_xxx dataform to the Template TOC.  It should appear just below the Customer Info_xxx page in the Left Navigation bar.

Review

Now it's time to check your work.  Go to the Report List in ClientSpace and run the Dataform Specification report for your newly created Work Order form.  Compare your work to the following Dataform Exercise Validation.

How did you do?  Are your fields all in the right places, did you remember to follow field naming conventions?  If any of the fields don't match, delete and recreate them to match the spec before proceeding to the next Assignment: Advanced Dataform Configuration. 


During Data Modeling you will sometimes find you need to adjust the model to handle something you hadn't thought about.  Having a place to record your Parts and Labor is great, but what if the repair requires more than one part?  With our current dataform layout you would have to create multiple work orders, which would work, but is inefficient. 

Exercise Two: Advanced Dataform Configuration

In this exercise we are going to simulate what happens when you have to modify your data model to better handle the real information needs of the project.  In this situation, we caught the design flaw before the dataform was being used, so there is no actual stored information that would need to be moved.  We will need to move the Parts fieldset and the associated fields into a separate Parts Order_xxx dataform which will then become a child form of the Work Order form, creating a foreign key relationship between the two forms.  In the context of relational databases, a foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table  In other words, a foreign key is a column or a combination of columns that is used to establish and enforce a link between two tables. The table containing the foreign key is called the child table, and the table containing the primary key is called the parent table

Before beginning you should read the KnowledgeSpace article Configuring Parent Form Datatypes to brush up on how to create these related dataforms.  In this scenario the Work Order would be the parent form and the Order Parts form would be the child form.  You can use the Dataform validation at the end of the previous Exercise as your guideline when moving the parts fieldset to a different form. 

  • Add a new multiform called Parts Order_xxx, making sure that 'Search on Load', 'Show Tasks' and 'Allow Cloning' are checked.

  • Add all of the associated fields including the Parts Info Fieldset from the Work Orders form utilizing the same specification that we used before. 
  • Column and Row placement may need to be adjusted and don't forget to specify the display columns for the multiform list..
  • Finally you will add a Parent Form field called Order ID for the Order Form_xxx dataform to the Parts Order_xxx form, creating the foreign key relationship between the underlying dataform tables.  
    • Remember to use appropriate  field naming conventions as this is a foreign key field.  This information is thoroughly covered in Configuring Parent Form Datatypes under Field Name.++ 
  • Once all the fields have been added, be sure to delete the parts related fields from the Work Order form. 

++For more information about field naming standards for other datatypes, review the KnowledgeSpace article Dataform Field Naming Standards.


Generate a Workspace from the Template

In the next exercises we will be performing more advanced dataform configuration, including setting up business logic and rules for your dataforms.  While business logic can be configured on a template workspace, it will not fire from the template workspaces, so we need to create a client workspace from the template.  Start by going to Organizations and clicking 'Add'.  You will be presented with a dialog that allows you to fill out company information and 'Save' the new Organization record.

 

Once your organization is saved, click the 'Workspaces' tab and select 'Create Workspace'.  If there are multiple template workspaces available to you then you should be presented with a dialog box that asks you to choose the Template and Workspace Name.  Choose the  Customers_xxx template you created above, fill out the  and click 'Save'.  This should generate a Client workspace, presenting you the CustomerInfo_xxx dataform to fill out.  Complete this dataform and then click 'Save' and you will see the familiar TOC and dataform list you created on your template.  From this point in the tutorial on, the changes you make should me made from the Dataform Quick Admin  of Dataforms on this Client Workspace so you can check your work.

Review 

Now it's time to check your work.  Go to the Report List in ClientSpace and run the Dataform Specification report for your newly created Parts Order_xxx form.  Compare your work to the following Dataform Exercise Validation.


Now that we have added the Parts Order child form, let's make it a little more usable.  By default Form links are displayed in the upper left corner of the Parent dataform, while this works, it is not esthetically pleasing.  It would be better to have the Parts orders accessible as a link in the header of the Order Form_xxx dataform.  We will accomplish this through Configuring a Custom Link on the header of the Order Form.

Exercise Three: Configuring Custom Links

Before you begin it is a good idea to review the KnowledgeSpace document Configuring Custom Header Links which covers all of the options available when configuring custom links.  For purposes of this exercise we will be covering how to configure a custom Dataform link.  We will be creating a link to the parts order dataform from the header of the Order Form_xxx dataform.  While configuring the link we will set a trigger to insure the Parts Order_xxx form is only available if the Order Form_xxx 'Requires Parts' field is set to 'Yes'.    We will then remove the Child Form Link from the upper left to complete the exercise.

Start by going to Admin Settings | Dataform Admin | Custom Links and Clicking 'Add'.

You will be presented with an interface like this:

For now let's just concern ourselves with the fields we will be using for this exercise.  For a more detailed discussion of the Link Configuration dialog, read Configuring Custom Header Links

  • Table Name - Order Form_xxx (this is the name of the dataform you will be linking to)
  • Link Group - Link 1 (where in the header will the link display?)
  • Display Value - Parts Order (This is what will actually display in the header of the Order Form)
  • Display Action - Workspace dataform (what do you want to link to?)
  • Sort Order - 10 (when there are multiple links, where does this link fall?)
  • Target Dataform - Parts Order_xxx
  • Display when adding - checked (this controls whether the link is available prior to the Order form record being saved.  We may want to uncheck this later, but we will check this so we can test the link configuration on the template without having to save an Order Form)

Make sure that the Configured link is working as expected by going to the Template workspace, and click 'Add' under Order Form - because the 'Display this link when adding' box is checked, you should see the link displayed in the header.  If not, check your work and correct any issues, then when this is working uncheck the 'Display this link when Adding' checkbox before proceeding to the next step. 

Now lets configure the condition under which the link will display.

Link Display conditions: 

  • Field Source - Form Data (this means the trigger condition is on the form we are configuring the link for)
  • Trigger Field - luRequiresParts (the trigger field we want to use)
  • Trigger Value - Yes (only display the link when the field is set to this)
  • Label - Parts (this is not really necessary to fill out as we will not have complex display conditions, but it is a best practice to fill this out every time)

In order to make sure this functionality is working, you will need to be able to save a work order form.  Go to the NetWise Test workspace and, following the instructions for adding TOC items above, add the Customer Info and Order Form dataforms to the workspace. 

Make sure that the Configured link is working as expected by going to the Order Form dataform and click 'Add',  set the 'Requires Parts' field to 'Yes' and click Apply, does the Parts Order link display?  Change Requires Parts to 'No', does the link disappear?

Now that this is working successfully, let's get rid of the Child Form Link on the Order Form,  from the order form click QuickAdmin   and choose 'Form Properties'.

Under Form Properties, check the 'Suppress Child Form Dropdown' checkbox and click 'Save'.

When you return back to the Order Form, the dataform link in the upper left corner should disappear.

Review 

Now it's time to check your work.  Compare your link configuration work to the following Dataform Exercise Validation. 


   


 Return to Top

 Another important part of capturing data is making sure that the information is being stored in the appropriate place, and that required information is being consistently filled out.  We can accomplish both of these goals using Advanced configuration and workflow in our dataforms.  Much like we configured a display trigger for our header link, we can turn fields on and off based on conditions, as well as create 'business rules' to insure that data is being appropriately entered when required - we will look at both these techniques in our final Module.

Module 3: Advanced Dataform Configuration - Intro to Workflow

 In order to make sure information is being recorded in the appropriate fields, we will add logic to the Order Form to insure that the correct amount field is being displayed based on Labor Type chosen.

Exercise One: Configurable Field Display

The Labor Info fieldset of our Order Form_xxx is looking pretty crowded and unorganized.  Having the Type of Work, Labor Billing and Text area fields on the form makes sense, but having all of the different amount fields on the form (Per Hour, Fee Amount, Piece Count and Amount Per Piece) does not make sense.  If this is an hourly type of job, why would you want to see the piece count?  Thankfully we can clean this up using configurable field display.    Before you begin it is a good idea to review the KnowledgeSpace document Configuring Dynamic Field Display which covers all of the options available when configuring dynamic field display.  For purposes of this exercise we will be covering how to configure dynamic display on a field.  We will walk through configuring one of the fields on the form, then you will be left to configure the rest of the amount fields based on what you have learned.  Let's start by creating dynamic field display behavior for the Per Hour field.

From the Order Form_xxx, access the Quick Admin  tool and select Field Display Rules

Click 'Add' and you will be presented with a dialog like this:

What we want to do is display the Per Hour field if the Labor Billing field equals 'Hourly' (the Code value of the lookup), otherwise we want to hide it and we should probably clear it as well so there is no confusion if a billing type change occurs:

Table Name - Order Form_xxx

Field Source - This table (we are going to look at the current form to find a trigger event)

Pipeline - Default (custom should only be used if custom business logic has been written by the NetWise development staff)

When this field - Labor Billing

*equals this value - Hourly

*this field - PerHour

*will - Display

Make sure the 'Clear Field On Disable/Hide is checked.  These field display configurations are actually very easy to understand.  Check your work on the NetWise Test workspace before proceeding with the other field display configurations. 

Configure the Fee Amount, Piece Count and Amount Per Piece fields to only display if the appropriate Billing Type Code value is selected. 


Review 

Now it's time to check your work.  Compare your field display configuration work to the following Dataform Exercise Validation

How did you do?  Did you remember to use the Code value when referencing your lookup?  I modified the field layout slightly as you can see in the example to make the dataform flow better with all of the hidden fields, but this is more for esthetics than anything else.    Now that we can turn fields on and off, let's make sure that the appropriate fields are being used to store your data in the next module on Rules Management


Rules, rules, rules...we live in a world full of rules.  Always stop at a red light, look both ways when crossing the street, never pick your nose at a fancy dinner party...OK, that last one was just gross, and the second one was more of a good idea than a rule, but you get the idea.  Managing data has it's own set of rules that should be followed dealing with data integrity and data relationships.  Some of these rules can be enforced by choosing the appropriate datatype when creating your dataform (insuring a phone number is formatted appropriately for example) but often you want to enforce more esoteric business rules.  In the next exercise we will insure that appropriate information is getting stored based on the billing type selected so we always know what to bill our client for the work we have done, kind of an important rule...

Exercise Two: Rules Management - Required Field Validation

Our next exercise will teach you how to configure a set of simple business rules on the Order Form to insure that once we have chosen a Labor Billing Type, that the associated amount field is always being filled out.  Before you begin it is a good idea to review the KnowledgeSpace document Configuring Rules and Business Logic  which covers all of the options available when configuring business rules.  For purposes of this exercise we will be covering how to configure the _RequireFieldOnThisForm rule on the Per Hour field.  This is a Hard Error rule meaning that on save the Per Hour field will be checked and if it has not been completed, an error will be triggered stopping the save until the field is complete.  Once again we will walk through configuring one of the business rules on the form, then you will be left to configure the rest of the amount field rules based on what you have learned.  Let's start by setting required field behavior for the Per Hour field.

From the Order Form_xxx, access the Quick Admin  tool and select Business Rules

Click 'Add' and you will be presented with a dialog like this:

 

Complete the following values:

  • Table Name - gen_OrderForm_xxx
  • Method Name - _RequireFieldOnThisForm
  • Rule Title - Require Per Hour (this is simply what displays in the rules list, so it should be short and descriptive)
  • Rule Type - HardError (this will be selected for you based on what Method you choose)
  • Execution Order - 10 (read the documentation on this, but this is essentially what order your rules fire in - this can dramatically effect behavior on complex business rules)
  • Pipeline - Default (custom should only be used if custom business logic has been written by the NetWise development staff)
  • Trigger Field - luLaborBilling
  • Trigger Value - Hourly (Code value)
  • Description - Description of the rule
  • sFieldName - PerHour (this is the field you want to require, based on the trigger.)

Click 'Save' to complete the rule.  Check your work on the NetWise Test workspace before proceeding with the other rules  configurations.  Configure the Fee Amount, Piece Count and Amount Per Piece fields to be required if the appropriate Billing Type code value is selected. 

Now that you have the form validating, lets set up some automation to make customer orders easier to track.


Exercise Three: Rules Management - Setting a Field Automatically

Our final exercise will teach you how to configure an Order ID field and setup a simple business rule on the Order Form to set the OrderID equal to the primary key of the dataform.  This will provide a tangible Order number that can be used as a reference on our Parts Order form. This is a Biz Logic rule meaning that on save the OrderID field will automatically be filled.  By now you have acquired all of the requisite skills to perform these tasks, so the requirements documentation for this last exercise will be minimal.

From the Order Form_xxx, access the Quick Admin  tool and select Form Fields.

Add a field called Order ID to the top of the dataform using the following settings:

  • Element Type - Text
  • Read Only- Checked

Click 'Save' to add this field to the dataform.  Once added, use Form Properties for the Order Form Dataform to set the Order ID as the default Attribute of the form.

Now lets create our business rule to automatically fill this field for us on Save:

From the Order Form_xxx, access the Quick Admin  tool and select Business Rules.

Create a new business rule using the following parameters:

  • Table Name - Order Form
  • Method Name - _SetFieldFromKey
  • Execution Order - 10
  • TargetField - OrderID

Once you have this configured, check your work by making a change to the Order Form and clicking 'Save' - do you see the appropriate Order ID in the field?  Now go to the parts order form - what appears in the Order ID field?

Extra Credit!!

See if you can configure your _SetFieldFromKey rule to only fire if the OrderID field is empty.  This will fill the field out on the initial save, then not fire the rule again.  Otherwise this rule will fire every time the Order Form is saved.

Review 

Now it's time to check your work.  Compare your field rules configuration work to the following Dataform Exercise Validation.

How did you do?  Did you remember to use the Code value when referencing your lookup?  How did you order the rules? 


  


 Return to Top




NOTICE: You are in the old ClientSpace Help system. Please link to the new ClientSpace Help here https://extranet.clientspace.net/helpdoc/home/ClientSpace.htm