Script to Take Substring of a Field (First 6 characters)

  • 44 Views
  • Last Post 2 days ago
zroy21 posted this 3 days ago

I am trying to take the first six characters of an extracted field and was wondering if anyone has done this in a simple VB script. I am open to use C# too but I am just more familiar with VB. 

 

Thanks in advance, everyone!

Order By: Standard | Newest | Votes
zroy21 posted this 3 days ago

Right now this is what I have but I do not believe that I am calling the variables correctly:

Field("ExportDate") = Field("Document Creation Time").Substring(0,6)

HamdiM posted this 2 days ago

Hello,

For C# :

 

string Field;

NewString = Field.Substring(0,6);

 

 

Regards,

Hamdi

 

sara posted this 2 days ago

Hi,

This script c#, is giving an error. I have a VendNo field and want to get first 9 char.

Please elaborate.

 

string Field;

NewString = Field.Substring(0,6); 

  • Liked by
  • HamdiM
HamdiM posted this 2 days ago

Can you please attach for me an exemple of the doc you have ? 

Regards,

 

sara posted this 2 days ago

Hi,

Can not share doc.Consider a fields has 13 alphanumeric chars. I want 9 chars from starting. How to make it with your code?

Regards,

 

Close