Learn WorkXpress
Time Field
| Time Fields make it easy to collect, store and manipulate
time based information. Build filters or allow Users to search based on a wide range of time oriented filters such as "now", "is before" and "is after". All information is stored as a single time stamp allowing you to use
Actions to manipulate the values. You can
enable time zone features allowing you to control whether times are
stored and/or displayed in a local time zone, according to the User's
settings. Use the Expression Builder to create any date and time output
format you desire. |
-

Filters
Show Technical DetailsThe Time Field may not currently be filtered.
-

Form Elements
Show Technical DetailsThough a Time is stored internally as a number, when interacting with the Field on a page, you must input a time. Setting the hour and minute are done by typing a number into the hour and minute Field Parts. There is no validation on these parts, though only two characters are allowed in each part. Entering non-real times is allowed, though, and is handled by adjusting the time by however many hours or minutes exceed 24 or 60, respectively. For example, if 45:75 AM is entered and saved into a Date and Time Field, it would adjust the value to 10:15 PM. Selecting AM or PM is done by using the AM/PM drop-down.
Setting With Actions
When setting the Time Field through actions, two different input formats may be used. As with other Field types, the stored value from another Time Field may be used to save into a Time Field. Since the stored value for these Fields is a timestamp, any timestamp value may also be used to save into a Time Field (may be calculated from an expression or extracted from a Date & Time or Date Field).
In addition to this, the text output of the Time Field (e.g. 4:23 AM) may also be used to save into the Time Field.
-

Output Formats
Show Technical DetailsThe Time Field has only one output format, which returns the full Field (e.g. 12:34 PM)
-

Time Field Parts
Show Technical DetailsThe Time Field has three interface parts, but only one storage part.
Interface Parts
- Hour
- Minute
- AM/PM
Storage Part
- Timestamp (Seconds from 12:00 AM UTC to the stored time)
-

Appearance in Layouts
Show Technical Details
Appearance in a Field GridCustomize the space your Field occupies using different sets of configuration options depending on which kind of Layout the Field appears in.
Customize the space your Field occupies in a Field Grid Layout. A Field Grid Layout is like a table with columns and rows. A Field can occupy more than one column and/or more than one row. This gives you the flexibility to arrange Fields in a grid as needed.
Settings:
- Column Span - Set the number of columns across which you'd like the Field to span in your Field Grid. By default, a Field Grid Layout has two columns, and a Field spans one of them, thereby taking up 1/2 the width of the page.
- Row Span - Set the number of rows across which you'd like the Field to span in your Field Grid. By default, Fields are set to span a single row.
Hints:
- "Columns" go across, and "Rows" go down.
- By default, Fields always occupy 1 column and 1 row. A Field Grid Layout by default is set to 2 columns wide, and will create as many rows as needed for the number of Fields it contains.
- You will commonly set "long text" fields to occupy 2 columns in a 2 column Field Grid Layout, so that it spans the full width of the page.
- Spans "move" with your Field, so if you drag and drop it to a different part of the Field Grid, it will retain the row and column spans entered here and apply them in the new location.
- In a typical Field Grid Layout with 2 columns, you can set a Row Span of >1 and a Column Span of 1 to get the effect of putting multiple Fields next to a single Field. For example, set the Row Span of an Address Field to 3, so that you can put 3 entire Fields next to it, creating a more efficient presentation.
Appearance in a ListCustomize the space your Field Label occupies as a column header in a List Layout. Also adjust the alignment of the data presented in each row. Adjust column size, text justfication and even sorting behavior.
Settings:
- Column Width - Enter the width of the column, in pixels, in which this Field appears in your List Layout.
- Align Header Text - Choose "Left", "Center", or "Right" from the selection box to align the Field header in your List Layout.
- Align Data (Horizontal) -Choose "Left", "Center", or "Right" from the selection box to align the data displayed under the Field header in your List Layout.
- Align Data (Vertical)* - (feature in progress)
- Default Sort - Check this box to set this Field to be the default sort Field for this List Layout. When checked, a select box will appear to the right of this setting that will allow you to choose "Ascending" or "Descending" for the sort order.
Hints:
- When thinking about pixel sizes, as a very rough rule of thumb to help you enter your first value, think of a letter as occupying 10 pixels.
- Remember, not all users have the same size screen. The WorkXpress workspace by default is set at 1024 pixels wide, but the space available to the builder is slightly less.
- By default, column widths are calculated automaticaly by your browser. When you begin fixing the widths of columns, the browser will assign that width, and then automatically calculate the remaining columns based on the remaining width available. By playing with columns widths and fixing the things that are important to you, you will arrive at a powerful combination of widths that are fixed and widths that scale based on the content of their Fields.
- Sort by a column if necessary, but generally you don't want to do it "just because". Sorting takes up processor power, and therefore consumes some performance.
- Sometimes the values in the rows of a column occupy little space, as is the case with an icon or a single letter or number. In these cases, it may be unsightly to have a long Field Label used as the column header; the columns will be very wide, but will contain narrow data. In this cases, simply use the "Field Label" feature and setup an "Alternate Field Label" to be used just for this column label.
Appearance in a TreeCustomize the space your Field occupies in a Tree Layout. Each level of the Tree is like a list column header, and gives control over column width and sorting.
Settings:
- Column Width - Enter the width of the column, in pixels, in which this Field appears in your Tree Layout.
- Default Sort - Check this box to set this Field to be the default sort Field for this Tree Layout. When checked, a select box will appear to the right of this setting that will allow you to choose "Ascending" or "Descending" for the sort order.
Hints:
- Each level of your Tree Layout is like an individual List Layout, so treat it as such!
-

Field Label
Show Technical DetailsUse the default label or create a new one just for this location? Create a "global" Field Label to appear everywhere your Field does, but alternately, you can set a "local" Field Label to only appear in a specific place. The global Field Label also serves as the name of your Field throughout the tools.
Settings:
- Field Label - Choose a name for your Field and enter it here. The name will appear as the Field Label any time you use it in a Layout.
- Display Alternate Label - If you want a Field that you've labeled to have a different name for one particular appearance in a Layout, check this box and choose a different name for the Field. The "Field Label" will be replaced by the alternate label in this instance only.
Hints:
- Think of your Field Labels as "global" and "local". The Field Label itself is the global label, and will by default appear everwhere that the Field does. If you change it in one place, it will be changed in all places.
- Setting an alternate label is akin to creating a "local" label just for this location only. It will not carry over to any other location.
- The global Field Label is also used through the tools as the name for your Field. If you see your Field in a list of Fields, the name of the Field in that list will be identical to its global Field Label.
- Use the local Field Label often in lists to make its column header shorter.
- Use a local Field Label to add help text right into the label itself.
- Set the local Field Label to be empty when you don't want to display any label at all!
-

Tooltip
Show Technical DetailsA Tooltip provides helpful text when your User mouses over the field label. This Tooltip feature lets you create the Help Text you want your Users to see.
Settings:
- Tooltip - Enter text to create a tooltip that will display when a user hovers his mouse over this Field's Label.
Hints:
- You can never go wrong by adding tooltips!
-

Default Value
Show Technical DetailsAutomatically pre-populate any Field so that a User does not need to type in the values themselves. This features requires use of the Expression Builder to find, manipulate, and format the data to be used for the default value.
Settings:
- Default Value in Add Mode - Open the Expression Builder to query, build, and format a default value for this Field in Add Mode.
Hints:
- Setting a Default value does NOT save the value! The User must still save the Layout.
- A User can change the Default value before saving the Layout. If you want to disallow this, be sure to enable the "View Only" feature.
- Default Values must still pass validation in order for the page to save!
- Setting a Default Value is most likely only relevant in Add Mode and therefore this setting only applies in Add Mode. In Edit Mode, there may have been a value previously set, and you likely would not want to overwrite that value with a Default Value. In View Mode, the same situation applies and in fact there is not even any saving, making a Default Value irrelevant.
- It is common to change your query's starting point to pull a default value from an earlier page or other source. In other words it is less likely that you will want to pull your default value from your inherited context.
-

Regionalization - Timezones
Show Technical DetailsEnable timezone capture in your time-based Fields.
Settings:
- Display Timezone Option - Check this box to enable timezone selection capability for this Field.
- When this setting is checked, a selection box will appear next to it to allow you to choose when to display the timezone option. Choose "Add & Edit Modes Only", "All Modes", or "View Mode Only". In View Mode, the current timezone will display along with the time. In Add and Edit Modes, your users may choose the timezone for this Field.
- Display Timezone Option - Check this box to enable timezone selection capability for this Field.
-

Validation
Show Technical DetailsIs this Field required? Does the system automaticaly enforce a numbers-only or email format validation? What error message is presented to your Users if they don't enter the data properly? When these default validations aren't enough, use Actions to build your own unique, custom validations!
Introduction:
Validation is the act of reviewing a Users entry and ensuring that it meets the proper criterion. When a User saves a Layout, validation is checked first. The save procedure will begin only if all validations pass. If even one validation fails, the save will interrupt, and the User will be presented with an error message explaining what entry(s) failed validation.
There are 3 types of validation available, and these vary by Field Type:
- optional validation settings
- automatic validations
- custom validations using the Actions Manager
Hints:
- Validations are only relevant in add or edit mode (i.e. modes where a User can enter data, and have that entry validated)
- The "Required Field" validation, when enabled, will cause the Field
Label to present itself in a strong color such as red, so that the User
is aware the Field may be required.
- When Validation fails, an error message will be presented at the Field level, and in some cases, at the Layout level in a bright colored text, indicating to the User that they need to find the Field which is not right, and fix it. When you use the Actions Manager to build your own validations, you determine the error message that is displayed.
Optional validation settingsAll Fields:
- Required - Check this box to require a value to be entered for this Field in Add mode or in Edit Mode. The Field's Label will then be displayed with a different color indicating to the user that it is a required field, and error messaging will be presented if the Field is not filled in properly.
Short Text Field:
- Maximum Length (in characters) - Enter the maximum length for your Field.
Automatic Validation SettingsCertain Field Types implicitly and automatically validate themsevles. For example, a Number Field can never contain letters, and an email address must always follow a certain convention (a@b.c). The autovalidation feature applies these validations for you, freeing you to focus on custom validations using the Action Manager as you desire.
There are no settings for this feature; autovalidations are implicit for each of the below Field Types. They are implemented automatically and cannot be disabled.
Hints:
- In most cases, if you feel as though you would like to disable autovalidation, it may simply be that you want to use a different Field Type. This is because autovalidation is often the primary distinguishing feature between two Field Types. For example, removing the number validation from a Number Field would turn it into a Text Field.
- Phone Number – If the U.S. input format is chosen and an area code is entered, then a valid phone number in (xxx)xxx-xxx format is required. Additionally, if the International format is chosen, a country code must be entered. Extensions are always optional.
- Email Address – Requires input in the format <text>@<text>.<text>. Please note that autovalidation for this Field Type does not include verification that the email address actually exists.
- Social Security Number - Allows input of a nine digit number only.
- Number - Allows input of numbers only.
- Currency - Allows input of numbers only.
- Date – If a valid date is not entered for this Field Type, when the Field is saved it will not update to the entered value and will retain its previously stored value.
- CAPTCHA – If you choose to use a CAPTCHA Field to protect against spam, it is always treated as a required field (see the Required Field feature).

Custom ValidationsFor any Layout or Field, you can view the Actions Manager and look for the validation trigger. Here you can build a procedure to support a custom validation according to your need.
When creating custom validations, only certain actions and evaluations are available.
Be sure to set the proper error message in your validation.
-

Block Association
Show Technical DetailsBlock Association is the tie that binds all WorkXpress Blocks to each other and enables them to work together. There are permanent, global Block Associations and temporary, local ones. First, all Blocks are permanently associated with either an Item Type or Relationship--this defines an application's structure. Second, Layouts and Fields can permanently nest inside of Layouts to create your interface. Third, Actions can permanently nest inside of Actions to create logic. Finally, at any point in time, a Layout, Field, or Action will temporarily be "about" a particular Item in the database, to give context.
Introduction:
- Block Association makes WorkXpress unique and powerful as an application development tool. It's the glue that connects all WorkXpress Blocks to each other.
- Permanent Block Associations define the application's structure.
- Temporary Block Associations give the interface and logic "context", which helps the application to interact with the database at a point in time.
Permanent (Global) Block Associations
Item Type or Relationship Type AssociationThe most basic type of all Associations, this defines your application structure. At the topmost level, an application is a group of Item Types. These Item Types may have associated Relationship Types. Collectively, all other Blocks in WorkXpress then are associated ultimately with an Item Type. Therefore, an "application" is defined as a set of Item Types and all their associated Blocks.
When searching for Blocks in the build tools, you will tend to find them by first beginning your search on a particular Item Type or Relationship Type, and viewing their associated Blocks.
This choice of Association also effects data backup and restoration.
Blocks with permanent Item Type Association only: Relationships
Blocks with permanent Item Type or Relationship Type Association: Layouts, Fields, Actions
Layout AssociationTo build an interface you must nest Layouts and Fields inside of other Layouts. This nesting generates Layout Association.
Blocks with permanent Layout Association: Layouts, Fields
Action AssociationTo build a logic model (aka business rules, scripting, etc.) you must nest Actions inside of other Actions within a procedure.
Blocks with permanent Action Assocation: Actions
Global and Local Actions
Actions may be associated with an event and block globally, or they may be associated locally. A "Global Action" exists everywhere and every time the Action's parent Block undergoes that same event. A "Local Action", however, only exists when the Action's parent block undergoes this specific event, in this context. In this case though, context refers to the context of the triggering Block within the interface, not the Item context. This is a unique kind of context.
In other words, although a Field may trigger a local Action when it is saved from within one Layout, it will not trigger that same local Action when it is saved from within a different Layout. In both cases, however, its global save Actions will be triggered from either Layout.
For example, for a certain Field, Action A is global to its "Field Save" event for all pages and Action B is local to its "Field Save" event for a specific page. Later, that same Field is added to a new page. When that new page is saved, Action A will fire, but Action B will not exist at all on that page (in that unique context).
Item Association and Context
An Action is always associated with the building block for whom it is a "local" or "global" action (see below). Placing an Action in the Action Manager will result in that Action being associated with an Item Type based on where it is placed. Actions may be associated with Layouts, Fields, Items, or Relationships.
Similarly, an Action typically requires context to function properly. That context comes from the Block for whom this Action Manager Tool was opened and may not be the same Block for which this Action is a local or global Action. Context and Item Association for an Action may be different.
Further, some Actions can change the context. For example, when a list of Items is passed into an Action Manager from a "Mass Action" button in Layout Type - List, the context is each of the Items passed. However if they pass through a "foreach" control structure, the subsequent context passed to subordinate action is that of a single one of the Items in the list, changing each time the loop is repeated.
Temporary (Local) Block Association
Temporary Item Association (Context)At any given time, what is the page you are on "about"? If the page is about a company, then the context of that page is the specific company it is displaying (e.g. "Acme Company", where Acme Company is an "Item" in the database of "Type" Company). Any Fields or Actions need to be about that specific item and not some other item (i.e. about "Acme company and not some other company), so those Fields or Actions need to be provided with this context. For a much more detailed examination of this concept, which is critical to successfully building applications with WorkXpress, please see our lesson about Context.
If the page is about a specific Item of Type: User...for example the "current user"...then perhaps it is about you? When the page displays data, it needs to display that data about you. When Actions on the page shoot off an email notifying of a change to username, it needs to shoot that email to you, not to some other User. YOU are an Item in the database of Type User, and are also the context in this second example.
Context then is the specific Item (Not Item Type) in the database which the current Layout, Field or Action is displaying data about.
Blocks with temporary Item Association: Layouts, Fields, Actions
-

Configuration
Show Technical DetailsHow to Create
There are three ways to create a Field:
- Using the Block Creator Tool's Create tab to drag a Field Type onto a Layout
- Using the Block Creator Tool's Reuse tab to choose an Item Type or Relationship Type whose Field you want to reuse. Then, drag that Field onto a Layout. (note: you havn't actually created a new Field in this case, you've simply reused an existing Field. This Field could display the same or different data than elsewhere, entirely dependent upon its context).
- Using the Block Editor Tool for either an Item Type or Relationship Type. We will be adding a mechanism (2010) to add Fields to an Item Type or Relationship without having to place that Field into a Layout.
Note: Methods 1 and 2 above require the Field to be placed into a Layout. Method 3 will allow the creation of Fields that aren't nested in a Layout.
Wizard Questions
Wizard Questions vary by Field Type. Please see the individual Field Type for details.
How to Edit
All Field settings are accessed from the Block Editor Tool. There are two ways to access this Tool for a given Field;
- Navigate in context to the Field in the application, by finding its page and Layout. Click on the orange Fields Block next to the Field you wish to edit. Using this method, all Field settings will be "in context", meaning that the settings will contain values true and accurate to the point in the application you are currently at.
- In the Block Creator Tool's Reuse tab, choose the Item Type or Relationship Type with which your Field is associated, find the Field in the ensuing results list, and then click the edit wrench next to the Field. In this case, the Field may not be "in context", meaning that the settings may contain nonsensical values or, in some cases, no values at all.
-

Audit History
Show Technical DetailsWho modified the Fields Value? When did they do it? What did they change it to? If your security policies necessitate answers to these questions, such as with Sarbanes Oxley, HIPAA, PCI and other regional privacy data acts, then this feature makes compliance easy.
Settings:
- Audit This Field - Check this box to enable auditing for this Field. WorkXpress will record each time the value for this Field changes. It will also record who changed it, and when it was changed.
- Show Audit History - Check this box to enable display of the Audit History link icon next to the Field you've chosen to audit. Click the Audit History link for a report that lists each change to the value for that Field.
Hints:
- Compliance policy is an ever-evolving thing. It is very important that review your compliance policies periodicaly to verify proper compliance.
- WorkXpress stores audit histories in a unique way, separate from the standard storage mechanisms. As such, historical audit data compiled by this feature is NOT available to other parts of your application as if it were normal WorkXpress data. This is a conscious security decision.
- However, If you DO need to operate on audited data within your application, then you should simply build your own data audit mechanism. First, create an "audit" Item Type. Then, use Field Save Actions to create and populate Audit items. Your Audit item will likely include Fields such as current user, current date/time, item, field, old value and new value. This alternate method requires more up front effort, but will yield an audit mechanism whose data are available to other parts of your application, meaning that it can be manipulated or reported on normally.
-

View Only
Show Technical DetailsA Field marked as "View Only" can NOT be edited, even when its Layout is in Edit Mode. Fields set as View Only may optionally be saved or ignored during the saving process.
Settings:
- View Only - Checking this box forces the Field to remain in view mode despite the mode of its layout. Checking this box reveals the "save/don't save" setting.
- Save / Don't Save - This toggle will determine whether the Fields value is saved during the normal save process. Choosing "don't save" will cause this fields value to be ignored during the saving process, and the value will not be saved to the database.
Hints:
- When Adding a new Item, Use "View Only - Save" in combination with Default Value to create the effect of a value that the user does not have to type in, and can not be changed, but which saves to the new item. For example, when creating a new "issue", set the Default Value of the Field "Created By" to "Current User" (using the Expression Builder). Then, set the Field to "View Only - Save". This way, the Users name will be entered automatically as the creator, and they can not change this.
- If, while in Add Mode, you setup a Default Value, but set the Field to "View Only - Don't Save" then you will create a series of events that probably aren't helpful. The User will see the value and assume it is going to be saved, but in fact it is not. The newly added Item will not have an entry for that Field.
- Validation - Fields set to "View Only - Don't Save" do not pass through a validation process for either the Field, or for the Layout it is in, regardless of whether a validation process is specified.
- View Only - Checking this box forces the Field to remain in view mode despite the mode of its layout. Checking this box reveals the "save/don't save" setting.



