Link to home
Start Free TrialLog in
Avatar of dpicco
dpiccoFlag for United States of America

asked on

classic asp dim variable not working

Hello experts,
 
Is there anything wrong with the way I'm declaring and assigning asp variables here? The first variable (lvl_drill) always gets assigned correctly but the second variable (lvl_drill_tla) only gets assigned when lvl_entry = "company". Otherwise it stays at "ope"

dim lvl_drill
dim lvl_drill_tla
if lvl_entry="company" then
lvl_drill="operation"
lvl_drill_tla="ope"
elseif lvl_entry="operation" then
lvl_drill="division"
lvl_drill_tla="div"
elseif lvl_entry="division" then
lvl_drill="business_unit"
lvl_drill_tla="bu"
elseif lvl_entry="business_unit" then
lvl_drill="territory"
lvl_drill_tla="ter"
elseif lvl_entry="territory" then
lvl_drill="market"
lvl_drill_tla="mkt"
elseif lvl_entry="market" then
lvl_drill="location"
lvl_drill_tla="xyz"
end if

Open in new window

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dpicco

ASKER

GH - this is not inside a function or sub. Thanks.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dpicco

ASKER

looks like lvl_drill was getting set elsewhere in the code.
lvl_drill_tla was always set to "ope" because of some sql that was running  and setting lvl_entry to "company" each time the page loaded. Talk about spagetti code! Sorry about that. Thank you very much for your suggestions.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dpicco

ASKER

GH - I don't know how to split points after points have been assigned. Can you tell me how to do this? Thanks again for your help.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial