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!

Whether customer or staff created an order

Status
Not open for further replies.

kwirky

MIS
Apr 22, 2010
85
AU
Hey all,
I am trying to find a smart way to verify whether the person who created the online order is a staff member or a customer (customers have access to online ordering system).
Obviously I can create a formula which would list staff members and compare to the creator;

if {MainJobDetails.CreateUserName} = "John Smith" then "Staff" else
if {MainJobDetails.CreateUserName} = "Mary Magoo" then "Staff" else
"Customer"

and do a listing for all staff members and incorporate an if then else. I would be able to get what I want.

BUT...
We have high staff turnover :( and I wanted to use a separate table & field called {Users.FullName}, which I could then use to identify whether it was a staff or customer:

if {MainJobDetails.CreateUserName} in {Users.FullName} then "WW Staff" else "Customer"

However I am having significant issues trying to link this table so that I can get the report to check if the creator is on that list. If they are on the list, then I would want them to be "Staff" however if they do not appear on the list, then they should be designated "customer".

Am using CR 2008 and SQL database.

Any help would be fabulously wonderful
 
You should be able to use a left outer join FROM the MainJobDetails table TO the Users table on the name field. Then use a formula like this:

if isnull({Users.FullName}) then
"Customer" else
"WW Staff"

Of course the names in each table would have to exactly match (if they do).

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top