Hi,
I'll give a bit of background to my situation before describing the advice I'm looking for here.
I've used AW a fair bit in the past, but since I've been working in a job which has Windows machines and uses a complex custom-written relational database for its main tool, I use it less often than I did, so I am a little rusty. It is the shortcomings of the complex relational database (which I do not have admin rights to, I'm a humble user of it) that has led me back to AW and its database module. Fortunately, I have a copy of AW for Windows on my machine at work.
Essentially, I am a complaints investigator, and the relational DB provided by my employer is used to keep track of correspondence and various metadata associated with the investigation of the complaint. However, although it is called a Complaints Management System (CMS), it does a very poor job of helping investigators manage their caseload. I've previously tried to create an Excel spreadsheet that would help me manage my work, but it is not a database (or I am not sufficiently skilled with Excel) and I cannot get it to provide me with what I want.
So, my problem.
I have complaints (cases) assigned to me to investigate. These cases have differing priorities, which means differing time limits for completion of the investigation. The priorities and time limits are set out below:
J (jurisdictional issues) - time limit = 1 month
D (discretion not to investigate) - time limit = 3 months
1 - time limit = 4 months
2 - time limit = 6 months
3 - time limit = 12 months
The priority field in my AW DB is currently a 'pop-up menu' field, but I could change this to another type if this would be advisable.
I have a date-type field in which I enter the date the complaint was received. I have an calculation-type field in which I calculate the age of the complaint using the function:
=(NOW()-'DateReceived')
This returns an age in days, which I input into a separate calculation field that divides the result of 'age in days' by 30, to give a rough approximation of the number of months old the complaint is. This latter field is the one that I display in the main data entry view of the database.
Given the priority assigned to the complaint, and the age of it, I am either 'On Target' or 'Over Target' for dealing with it.
Each month I have a meeting with my manager to review progress, and since the reports that can be extracted from the CMS are not very useful for this purpose, I want my AW database to help me generate reports that can form the basis of discussion in these meetings.
Part A of My Query
At present, I have a manually operated field, in the form of a pop-up menu, to indicate for each record (complaint) whether I am over or on target for completion of the investigation. I would like to make this an calculated field, so that the database keeps track of this for me automatically. Unfortunately, I'm either too dense, or not good enough with the syntax of AW functions, to be able to write a function which essentially does the following:
IF 'Priority'=1 AND 'Age in Months'<4 THEN 'On Target' ELSE 'Over Target'
It seems likely that the 'IF' function is what I'm after, but I haven't been able to get the syntax right to combine 'Priority' and 'Age in Months' in the format provided in the AW help, which is:
=IF(logical,true value,false value)
Getting the syntax of this function right would be a good start. However, I suspect that I have a larger problem in that I have 5 priorities to measure against and I need the overall calculation (that produces the 'On Target' or 'Over Target' results) to report in one result field. This means nesting the functions that look at the priority and age. I've tried and failed to get the syntax of such nesting right, so advice on this is doubly welcome.
I have a sneaking suspicion that unless the answer is much more concise than I imagine it to be, there will be an additional problem: AW has a character limit for the length of a function string in a calculation field which may be too short for my needs.
Part B of my Query
Even if the problem above cannot be solved, and I have to manually enter whether a complaint is 'On Target' or 'Over Target', I have a separate but related question for the reports I have to present to my manager.
On these reports, I would like to have a summary at the top (in a grand-summary part, I assume) which gives a count of how many complaints are 'On Target' or 'Over Target' for each priority. Below that is a sub-summary part, ordered by the type of action that must next be taken in the investigation. (Getting that right may be a subject of a separate post at a later date.) The report must, of course, only report on those complaints that are still being investigated ('open complaints') and not those which have been completed ('closed complaints'). So, I need a function in a summary field which will present an accurate count of the number of open complaints that are 'on target' for priority J (with separate summary fields that do the same thing for priorities D, 1, 2, and 3), and a separate set of summary fields that will present a count of open complaints that are 'over target' for each type of priority.
My guess is that it is easier to have the summary field simply count all the complaints that are on or over target for a given priority, regardless of whether they are open or closed, since the report could be based on a saved search (match) which strips out all closed complaints. But if I'm off-beam with that idea, I'm happy to have another way of cracking this nut.
Many thanks in advance to any AWUG members that take the time to try and help me with this.
Andrew