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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Little help with a Parameter/Formula HELP!!!

Status
Not open for further replies.

BlurredVision

Technical User
Aug 6, 2001
326
GB
I have the following formula which looks at a parameter, which then returns true if found. I have the formula in my select statement to return only records which are 'True' - My problem is, it works perfect for everything but the last statement where I look field {PROBLEMS.NODE_NAME}, which returns 0 records. Any ideas why it seems to ignore this part?

Thanks for any help given.

if {?Group ID} = 'ALL' THEN
{MEMBER_OF.GROUP_ID} in ['IT SHIFT OPS', 'HELPDESK', 'HELPDESK ATM', 'HELPDESKWIN'] else

if {?Group ID} = 'HELPDESK' THEN
{MEMBER_OF.GROUP_ID} = 'HELPDESK' else

if {?Group ID} = 'HELPDESK ATM' THEN
{MEMBER_OF.GROUP_ID} = 'HELPDESK ATM' else

if {?Group ID} = 'HELPDESK WIN' THEN
{MEMBER_OF.GROUP_ID} = 'HELPDESKWIN' else

if {?Group ID} = 'IT SHIFT OPS' THEN
{MEMBER_OF.GROUP_ID} = 'IT SHIFT OPS' else

if {?Group ID} = 'EXPERTVIEW' THEN
length(trim({PROBLEMS.NODE_NAME}))<>0;
 
Try This :

Thanks for any help given.

(if {?Group ID} = 'ALL' THEN
{MEMBER_OF.GROUP_ID} in ['IT SHIFT OPS', 'HELPDESK', 'HELPDESK ATM', 'HELPDESKWIN'] else

if {?Group ID} = 'HELPDESK' THEN
{MEMBER_OF.GROUP_ID} = 'HELPDESK' else

if {?Group ID} = 'HELPDESK ATM' THEN
{MEMBER_OF.GROUP_ID} = 'HELPDESK ATM' else

if {?Group ID} = 'HELPDESK WIN' THEN
{MEMBER_OF.GROUP_ID} = 'HELPDESKWIN' else

if {?Group ID} = 'IT SHIFT OPS' THEN
{MEMBER_OF.GROUP_ID} = 'IT SHIFT OPS' else true)

and

(if {?Group ID} = 'EXPERTVIEW' THEN
length(trim({PROBLEMS.NODE_NAME}))<>0 else true)

Let me know if it works.

Reebo
Scotland (Sunny with a Smile)
 
There's nothing here evaluating to true, did you forget something?

I would create a SQL Expression for the last statement which trims the field so that the database does the work, in any case, change the record selection formula:

if {?Group ID} = 'EXPERTVIEW' THEN
(not (isnull({%PROBLEMS.NODE_NAME}))
and
{%PROBLEMS.NODE_NAME} <> &quot;&quot;)

Also add one more else to the end of your record selection formula:

else
True

This will then return everything if none of the above IFs qualify.

-k
 
Reebo: How could the {?Group ID} = 2 things, in other words, why use an AND when an else works fine?

-k
 
Thanks to the both of you for your quick replies to my cry for help.. Got it working! I went with the following:

if {?Group ID} = 'EXPERTVIEW' and
(not (isnull({PROBLEMS.NODE_NAME}))) then true else

if {?Group ID} = 'HELPDESK ATM' and
{MEMBER_OF.GROUP_ID} = 'HELPDESK ATM' then true else

if {?Group ID} = 'HELPDESK WIN' and
{MEMBER_OF.GROUP_ID} = 'HELPDESKWIN' then true;

Thanks again, You two rock!

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top