Normal Topic Programing question (Read 473 times)
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Programing question
Jan 11th, 2006 at 12:25am
Print Post Print Post  
Question is...
How do I program the LE Job_Type0 field if it contains one of these words (SHOP,PM,INSTALL,PARTS, or SERVICE) then perform the task.
Below is what I thought it should be but it does not function.

Can I program it so if it says (ESTIMATE) in LE Job_Type0 then don’t do this?

Thanks for any help.


If Job_Type0 = "SHOP;PM;INSTALL;PARTS;SERVICE"
     {
           If Loc1 = "Shop"
                       {
                             Xpost(@fn,brp_1,"BRPINV!brp_no",Qty1,"Shopqty","SUB")
                       }
           Else If Loc1 = "Trk2"
                       {
                             Xpost(@fn,brp_1,"BRPINV!brp_no",Qty1,"truck_2","SUB")
                       }
           Else If Loc1 = "Trk3"
                       {
                             Xpost(@fn,brp_1,"BRPINV!brp_no",Qty1,"truck_3","SUB")
                       }
           Else If Loc1 = "Trk4"
                       {
                             Xpost(@fn,brp_1,"BRPINV!brp_no",Qty1,"truck_4","SUB")
                       }
     }
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: Programing question
Reply #1 - Jan 11th, 2006 at 1:42am
Print Post Print Post  
The easy answer is….
If Job_Type0 = "ESTIMATE"
     {
           STOP
     }
Else
     {
           If Loc1 = "Shop"
                       {
                             Xpost(@fn,brp_1,"BRPINV!brp_no",Qty1,"Shopqty","SUB")
                       }
blah blah blah!

Works good, thank you for listening!
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Programing question
Reply #2 - Jan 11th, 2006 at 4:40am
Print Post Print Post  
Quote:
If Job_Type0 = "SHOP;PM;INSTALL;PARTS;SERVICE"

I see that you have answered your own question. But, for future reference, the line quoted above should be written out like this:

Code
Select All
If Job_Type0 = "SHOP" or Job_Type0 = "PM" or job_Type0 = "INSTALL" or Job_Type0 = "PARTS" or Job_Type0 = "SERVICE" 



Also, you should avoid using the STOP command. Ray, Mark, and Erika will tell you that it is a very bad way to exit out of programming.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: Programing question
Reply #3 - Jan 11th, 2006 at 4:48am
Print Post Print Post  
Thank you yet again Carl, I will make the recommended changes.
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged