Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula - flagging a certain group

Status
Not open for further replies.

geestrong

Programmer
Jun 24, 2005
58
US
Hello,

I have a formula that is flagging either YES or NO. Here it is below:
@CheckPending
If (GroupName ({PENDING_VIEW.PER_ACT_DECISION}) in ['APPR', 'APPR W/C','APPR W/P','APPROVED'])
then
// Activity Approved
'YES'
Else
// Hold Open
'NO'
Im using this flag to help in calcalutions in other formulas

The report looks like this:
Group1 is the application number
Group2 is the agency
Group3 is decision code (Approved or Hold)


BL1-0001 - Group1
Agency1 - Group2
Approved - Group3
BL1-0001 Yes
BL1-0001 Yes
BL1-0001 Yes
Hold - Group3
BL1-0001 NO
BL1-0001 NO

Agency2 - Group2
Hold - Group3
BL1-0001 NO
BL1-0001 NO

The applications can go to many different agencies. On the Group2 level I only need to check if there is a HOLD on that application. In Agency1, the agency put it on HOLD then later APPROVED it, but I do not need to flag those NO. Only applications with Holds...

What's wrong with my logic for @CheckPending

Thanks,
 
There's no reason to use groupname, just use:

If {PENDING_VIEW.PER_ACT_DECISION}) in
['APPR', 'APPR W/C','APPR W/P','APPROVED']
then
'YES'
Else
'NO'

Rather than speaking about the number of agencies, post meaningful technical information, such as where this formula resides, and ther formulas that are using it.

On general successful posts include:

Crystal version
Database/connectivity used
Example data
Expected output

And a lot less of a description.

yo state that group 3 has decision cod, which doesn';t make sense, since you are trying to learn for an outer grouping what the status is, and the group might have both.

Posting example data and expected output should resolve.

-k
 
I think I would try to use a date field and write a formula like:

if {table.date} = maximum({table.date},{table.agency}) and
{table.decisioncode} = "Hold" then "Flag"

-LB
 
Ok

I am using CR XI, Oracle 8/ using Oracles ODBC driver

Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top