Our customer data base has six fields for "account manager" if none assigned the value is either -1 or 0, else it has a UserID value that I can translate to a name.
Here is the record selection method i need. It works fine if I use the first three selections, when I submit as below, it times out
if {vwComp.AcctMgr1} > 0 then {vwName_1.Name} = {?Account Manager}
Else if {vwComp.AcctMgr2} > 0 then {vwName_2.Name} = {?Account Manager}
Else if {vwComp.AcctMgr3} > 0 then {vwName_3.Name} = {?Account Manager}
Else if {vwComp.AcctMgr4} > 0 then {vwName_4.Name} = {?Account Manager}
etc
Tables vwName are linked to the vwComp table with a single connection between the UserID fields, always using Left-Outer-Join
If there a better way to structure this selection? I hope so, because I also need to add a criteria for Country and State/Province and by that time the logic is out of control.
Here is the record selection method i need. It works fine if I use the first three selections, when I submit as below, it times out
if {vwComp.AcctMgr1} > 0 then {vwName_1.Name} = {?Account Manager}
Else if {vwComp.AcctMgr2} > 0 then {vwName_2.Name} = {?Account Manager}
Else if {vwComp.AcctMgr3} > 0 then {vwName_3.Name} = {?Account Manager}
Else if {vwComp.AcctMgr4} > 0 then {vwName_4.Name} = {?Account Manager}
etc
Tables vwName are linked to the vwComp table with a single connection between the UserID fields, always using Left-Outer-Join
If there a better way to structure this selection? I hope so, because I also need to add a criteria for Country and State/Province and by that time the logic is out of control.