PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: edjack on December 05, 2018, 08:37:28 AM

Title: Field Force development
Post by: edjack on December 05, 2018, 08:37:28 AM
A client wants to be able to indicate what fields in their account master file of our application should be forced/required before an update is allowed.
They just need a maintenance routine to allow them to indicate which fields are required and a file to store the results.
Our existing update could check this new file to see if all required fields are filled in.

Just wondering what would be the fastest way to develop this in nomads?

Title: Re: Field Force development
Post by: Mike King on December 05, 2018, 10:46:15 AM
There are a couple of methods you could use to do this.  Determining the easiest will depend on your applications.

Fundamentally you need to intercept the data just prior the file update (pre-WRITE) and make sure the fields are needed. 

Now if you are using the standard Nomads File Maintenance utilities you can create an interface program which can be PERFORMed before the write at the entry point FM_PRE_WRITE.  It it wants to cancel the write due to missing data it simply sets _IF_ERR$ to the message to display.
Title: Re: Field Force development
Post by: edjack on December 05, 2018, 12:47:56 PM
I have no problem with the field checking function...
I was wondering what the best method would be to construct a maintenance routine that will allow the users to specify which fields are required.
I am thinking about a drop list populated from the file DD that would have check boxes for each field.
Is this the easiest method?