Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Split dynamic number
#1
Solved: 11 Years, 4 Months ago
Hi,
If i submit an order, an order number with shipment details will be provided. The shipment Id is a dynamic generated value. I fetched that value from database and stored it in datatable.
eg:
Shipment_ID=BEN23599012

I want to pass partial (shipment Id) number as a variable for a field to search an order based on shipment Id.
I have tried,
Code:
For i = 1 to 5
split_ship=split(Datatable.Value("Shipment_ID",dtGlobalSheet),i)
Next

I may be wrong.
can you help me

Thanks in advance
Reply
#2
Solved: 11 Years, 4 Months ago
if i am getting it right you want to split it like 'Shipment_ID' and 'BEN23599012', if so split it like
Code:
split_ship = split(Datatable.Value("Shipment_ID",dtGlobalSheet),"=")

Reply
#3
Solved: 11 Years, 4 Months ago
Saket,

The value will be BEN23599012. I want to send a partial number as a variable to another field.How to split this continuos number?
Reply
#4
Solved: 11 Years, 4 Months ago
what exactly you are referring for partial number? do you need to split the alphabets and numbers?

Reply
#5
Solved: 11 Years, 4 Months ago
It is a dynamic number. Sometime it may be only numbers and sometimes alpha numeric. whatever the value is, i want first 5 characters to be passed as a variable. can you please help me with that.
Reply
#6
Solved: 11 Years, 4 Months ago
if this is the case..to get the first 5 character, you should use 'LEFT'

e.g.
Code:
Str = "ABC12345678"

sValue = Left(Str,5)
msgbox sValue

Reply
#7
Solved: 11 Years, 4 Months ago
Saket,

Thanks a lot. The logic you said, works fine.Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Split function in string nidhishnair 13 64,605 07-07-2020, 03:47 PM
Last Post: helmzshelmz
Question Split Function Chaithra N 0 1,170 12-18-2019, 11:33 AM
Last Post: Chaithra N
  Split a string with multiple delimiters in VBScript nandha 2 8,588 02-10-2018, 06:44 PM
Last Post: nandha
  Split Function diya 2 5,763 11-28-2012, 08:49 PM
Last Post: diya
Question Deatils on Split action with Nested type sams001 0 3,366 10-30-2012, 03:03 PM
Last Post: sams001

Forum Jump:


Users browsing this thread: 2 Guest(s)