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

help with if then else 1

Status
Not open for further replies.

ginkoba

Technical User
Jan 29, 2009
60
0
0
I created 2 optional parameters and have a couple of formulas for the user to either enter something or leave blank. They both work separately but wanted to combine them into one formula. Please see example below. When I put an else between the 2 formulas, it ignores the 2nd one. Can someone please assist?

if not (hasvalue(({?Status}))) or ({?Status}) = " " then True
else if
hasvalue({?Status}) then
{RIM_RISKS_AND_ISSUES.STATUS_CODE} in {?Status}
Else
if not (hasvalue(({?ProjectID}))) or ({?ProjectID}) = " " then True
else if
hasvalue({?ProjectID}) then
{INV_INVESTMENTS.CODE} in {?ProjectID}
 
If this either of the first two are true than it stops

Try

(if not (hasvalue(({?Status}))) or ({?Status}) = " " then True
else
if hasvalue({?Status}) then
{RIM_RISKS_AND_ISSUES.STATUS_CODE} in {?Status})
and
(if not (hasvalue(({?ProjectID}))) or ({?ProjectID}) = " " then True
else
if hasvalue({?ProjectID}) then
{INV_INVESTMENTS.CODE} in {?ProjectID} )

Ian
 
Thanks Ian. You're freaking awesome. Somehow I missed a combination. It works!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top