How to subtract a number of working days from a date field

January 16th, 2018

Version:  (DataEase DOS or Windows) and Ffenics

The first step is to deduct the number of days to the original date.
OrigDate – WorkingDays
Next the number of weekends need to be derived, simply by dividing the number of WorkingDays by the number of working days in a week, rounded down to get rid of decimal place and then multiplying that by the number of days in weekend.
floor ( WorkingDays / 5 ) * 2
Finally, we need to ensure that the resulting date is not a weekend. Do this by getting the remainder of the WorkingDays divided by the number of days in a week, deducting that from the original date and if that is a weekend, include the number of days in a weekend into the calculation.
if ( weekday ( OrigDate – mod ( WorkingDays , 5 ) ) > 5 , 2  , 0  )
The completed field derivation is:
OrigDate – WorkingDays –
floor ( WorkingDays / 5 ) * 2 )
if ( weekday ( OrigDate – mod ( WorkingDays , 5 ) ) > 5 , 2 , 0 )


DataEase and Ffenics – How to Export to a Variable Filename

May 26th, 2015

Define Global “gFilename” ;   Text 255 .

GFilename := data-entry EnterFilename .

run procedure “TestVariableExp2” .

define global “GFilename”   Text 255 .


list records
CountryCode in order ;
Country .
export to GFilename .

DataEase and Ffenics – Performing Dynamic Validations

May 26th, 2015

This script demonstrates how the PostEdit Event can be used to perform dynamic validation, by automatically testing values as they are typed in by the user. This example script rejects any input which contains spaces in the value.

Note that if you want to accept their typing you say return(1) ( or 0 would do ) but if you want to reject their input, re-instating the original contents type return(2).

In a fields script choose the PostEdit event and put…

if textpos( string , ” ” ) > 0 then
message “Please re-enter without using spaces” window .
return(2) . — failure of input to satisfy
return(1) . — acceptable input

This script uses the passed parameter for the postedit event which is “string” .

This contains the incoming value entered by the user, whereas the Value property of the field still
contains the original contents.

Provided by Simon Irwin    (DataEase Consultant)

DataEase 8.5 Functions Manual

May 7th, 2015

DataEase 8.5 Functions List for Build 1767 (Beta)


DataEase for DOS 5.x Features (Search Mode)

May 1st, 2015

Notes contains operating instructions and technical background to the new features introduced in DataEase for DOS 5.x. DataEase DFD 5xx Search Mode

DataEase and Ffenics Custom Defined Functions Guide (CDF’s)

February 27th, 2015

This PDF file contains a guide to the CDF functions originally supplied with DataEase and Ffenics.


DataEase 7 User Guides

December 23rd, 2014

For copies of  DataEase 7.2 Designer’s Guide and Help File, please email us at

DataEase 6 – 6.53 DQL Programmer’s Guide

December 18th, 2014

The DataEase Query Language (DQL) extends the data processing and reporting capabilities
of DataEase far beyond those of a standard form or report. In addition to letting you list,
modify, and delete selected records, DQL lets you:

Create batch processing procedures to enter, modify, or delete sets of records instead of
processing each record individually as changes are made in User View.

Use a special Data-entry form L to collect selection criteria, processing instructions, and
other user input each time a procedure is run.

Monitor the entry of new records and determine how each record is processed depending on
its field value.

Use global variables to pass values from one DQL Procedure to another.

Call and chain together menuscall_menu, forms, reports, other DQL Procedures – even other
programs – and link these actions together into a single automated Control procedure.

Who Should Read this Book

This book is written for professional application designers, system administrators, and
experienced users who want to create DQL programs to extend the power of their applications.
If you are not familiar with DataEase, we recommend that you begin by performing the handson
lessons in the DataEase Quick Start Guide (QSG).

If you are responsible for designing custom applications, you’ll find reference information on
creating tables, forms, reports, and menus, defining relationships, and other database design
guidelines in the DataEase Designer’s Guide (DG).

If you use an application designed by someone else, you’ll find all the information you need in
the companion volume, DataEase User’s Guide (UG).

Before you begin working with DQL, we recommend that you read the DataEase User’s
Guide (UG) and Designer’s Guide (DG) and become thoroughly familiar with DataEase
record entry and document creation operations.



DataEase and Ffenics OML Scripting Guide

November 30th, 2014

These guides can also be used for Ffenics as well as DataEase.

Up to and including DataEase 6.53 OMLScriptingGuide

DataEase 7.2 OML Scripting Guide


October 11th, 2014

CDFs are the icing on the cake of the DfW user interface. With them you can often provide that extra control. Whilst it
could be argued that DfW still lacks a scripting language with the power of NetPlus’s ScaleScript, CDFs can be made
to go a long way towards filling that needed.