jordan gibson Posted June 19, 2009 Posted June 19, 2009 Hello all. I have two fields Ordernumber and line number. I want to join them together to become one number but its a bit more special than that. order:5082544 line:050 what i want =0005082544000050 order:5082544 line:500 what i want =0005082544000500 order:5082544 line:5000 what i want =0005082544005000 Although not a great way of doing it I was doing this with some if statemants depending on the length on the ordernumber but something tells me this is not the best way of doing it. Any thoughts. Jord
jordan gibson Posted June 19, 2009 Author Posted June 19, 2009 Well after a bit of laying about I went with this Right ( "000" & ccg_3::order_number ; 10 )& Right ( "0000" & ccg_3::line_number ; 6 ) Which appears to do what I want , still not sure if its the proper way of doing it though
comment Posted June 19, 2009 Posted June 19, 2009 (edited) Try: SerialIncrement ( "0000000000000000" ; 10^6 * order + line ) Edited June 19, 2009 by Guest Corrected a typo (thanks to LaRetta for catching it!)
Recommended Posts
This topic is 5695 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now