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

call user objects dynamically

Status
Not open for further replies.

theogary

Programmer
Mar 3, 2003
99
US
Our business deals with several agencies. They all have a 3 letter acronym such as ABC, BMN ,QWS. Each agency has it own set of business rules. I would like to create a validation user object for each agency, such as ABC_validation, BMN_validation, QWS_validations. When a user logs into the system we reatain the agecny prefix into a global variable. I would like to instantiate the proper user object based on the agency prefix ex. "ABC"+"_validation". Is there a way to do this.

Thanks for your help
 
1. create an user object called n_business_rules and add functions common to ABC,BMN and QWS

2. create three user ojbects n_business_rules_ABC, n_business_rules_BMN and n_business_rules_QWS. These user objects should inherit from n_buisness_rules

3. Then, you can do something like

string ls_object
n_business_rules lnv_rules

ls_object = 'n_business_rules_' + <<global variable>>

if isvalid(findclassdefinition(ls_object)) then
lnv_rules = create using ls_object
end if


cheers!
MM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top