Stripping out Digits in ID Number

Our system requires that you add a '19' or '20' in front of every ID number.  I want to strip out the 19 or 20, but not all ID numbers are the same length and some are missing the 19 or 20.  ID numbers should be 4-5 digits in length.
Ex
2010011
199237
07011
2009001
I try using the Right Function, but it doesn't work well with numbers > 5 digits long .  It either adds a 0 or 9.
Right (,5)
Results
10011
99237 - (9237 is correct ID No.)
07011
09001
Any suggestions?

I modified the first line to fix the syntax and it works!!
If left({your stringnumber}, 2 ) in
["19", "20"]
Amazing.  Thanks for the help.
Edited by: egreene on Jun 6, 2011 10:51 AM

Similar Messages

  • How do you strip out certain groups of characters from a String variable

    for exapmle...
    String date = "11-Feb-2005";
    String day;
    String month;
    String year;
    how would you strip out '11' from date to assign it to 'day', and 'Feb' to assign it to 'month' and '2005' to assign it to 'year'.
    in my program the variable 'date' will always be in the format of:
    ist two digits are numbers followed by '-'
    then three digits (letters) followed by '-'
    then four digits that are numbers.
    i think it has something got to do with charAt or something, im not sure how to do it.
    any ideas?

    yea i tried the first method and it works fine.
    thanks very much.
    also... i tried the other one and it outputs... 11 1 2005
    which means it works but you see i wanted to put the date in the format of...
    Calendar date = new GregorianCalendar(2005, Calendar.FEBRUARY, 11); so i can compare it to another Calender object to see which one is earlier.
    that is why i am doing it like this...
    Calendar date = new GregorianCalendar(+ year + ", Calendar." + month + ", " + day);
    for example...
    Calendar xmas = new GregorianCalendar(1998, Calendar.DECEMBER, 25);
    Calendar newyears = new GregorianCalendar(1999, Calendar.JANUARY, 1);
    // Determine which is earlier
    boolean b = xmas.after(newyears); // false
    b = xmas.before(newyears); // true
    anyways i am just curious.

  • Stripping out data from unstructured documents

    I have hundreds of word and html documents that I need to strip out certain information. The html docs are completely unstructured. The word documents may or may not have the same structure. How can I leverage PL/SQL to extract out the data that I need? I have seen scripts where using PL/SQL you can give a byte position number. This may work for extracting out some of the data if positioned in the same place but I am looking to simplify the process and get the right information out in one pass. Any help would be greatly appreciated. I am not necessarily looking for an exact answer but rather information that can lead me in the right direction. Of course the exact answer wouldn't hurt.

    I read all of the thread for that particular post and I still don't believe I have what I need.
    Maybe it is the instr function that you wanted me to look at and maybe not. I just don't know how I would use that to extract data.
    What I am looking to do is to use some kind of PL/SQL statement to extract a unique identifier that will be in the document, dates that the document was created or appended, and then some region numbers. So can I use instr to find a value from each document, hold it in a flat file and then import this information back into the database? The value of course will be different in every document.
    These files are currently not in a database. I am trying to get this information out of the document to store as metadata for each document. Am I looking at the right way to do this using PL/SQL or is there some other method of data extraction that I should consider

  • Digial waveform index out digital lines

    I am having trouble stripping out the seperate lines from a 9401 cdaq card in DAQ-9172 chassis. I have attached the vi I am using and can get the seperate line to display on a graph but can't strip each one out. I want to run each line through a dac and use single tone on the analog waveform to get the frequency of each.
    Solved!
    Go to Solution.
    Attachments:
    Cont Read Dig Freq.vi ‏80 KB

    After looking into your issue a little further Please conduct the following, on your Create Channel VI there is a terminal named: "Line Grouping".  Create a Constant/Control off of this terminal and select "one Channel for each line" from the drop down Enum.  The Default is "one channel for all lines". This will ensure that the data is recorded on a channel basis and not a port basis.  This will therefore create an array of waveform with index 0 for channel 0 and index 1 as channel 1.  Instead of how you had it before where index zero related to port 0.
    See the attached VI for details on this.  
    Thank you 
    Regards,
    CharlesD
    Digital MultimetersSchedule a Free 1 Hour LabVIEW Tutorial with an NI Applications Engineer
    Attachments:
    Cont Read Dig Freq.vi ‏84 KB

  • Lost Digits of big Number - convert Double into Hex

    My Number is 24563383270390080
    if i debug the Variable it has got a value of 2.45633832703901e+016, so i lost a little bit of the value.
    if i bring ist into a sting, i can see the complete value "24563383270390080"
    i have to convert the number in to a Hex-Value, the Reuslt should be "$57444456503941" an can be written into a string.
    my problem is to bring the original value into a string of hex, because diadem round the last digits of my number
    i tryed several convertions, but the the probmel of lost digits is still there....
    maybe you´ve got an idea
    dim Number, NumberString, HexTest1, HexTest2, HexTarget
    Number = 24563383270390080  '17 Digits
    HexTarget = "$57444456503941"
    NumberString = Str(Number, "d")
    HexTest1  = Str((Data.Root.ChannelGroups("Neu").Channels("Vin_Data").Values(1)), "$")
    HexTest2  = Str(Val(Number), "$")
    '---> Result
    ''--> Number       = 2.45633832703901e+016
    '--> NumberString = "24563383270390080"
    '--> HexTarget  = "$57444456503941"  
    '--> HextTest1  =  $57444456503940  !!!!! Last Postion !!!!
    '--> HextTest2  =  $57444456503940

    You are a little bit out of luck with your example because
    dim number : Number = 24563383270390080 '17 Digits
    dim txt
    txt = txt & Str(Number, "d") & " ref: 24563383270390080" & VBCRLF
    txt = txt & Str(Number, "$") & " ref: $57444456503940" & VBCRLF
    MsgBox txt
     0 at the end is correct. (At least the MS calculator says so.) But this is by incident because of the number you picked.
    VBS only supports 64 bit double values. 64 bit doubles have a mantissa of 52 bits.
    24563383270390080
    becomes
    1010111010001000100010001010110010100000011100101000000
    which has 55 bit in use. Because your last bits aren't in use the number you picked can be represented by a double without loosing precission.
    24563383270390081
    would show the behavior you described because it is using 55bit range. The 1 is just cut when converted to double.
    But I have no solution for this because it will not work with VBS.

  • I had my iphone 4s synced to itunes on my work laptop. The IT group at work stripped out that installation and will not allow me to reinstall. My iphone insists it has to sync to my work laptop itunes. How do I change iphone settings to look at an itunes

    I had my iphone 4s synced to itunes on my work laptop. The IT group at work stripped out that installation and will not allow me to reinstall. My iphone insists it has to sync to my work laptop itunes. How do I change iphone settings to look at an itunes installation on my personal laptop?

    dcotejr wrote:
    I had my iphone 4s synced to itunes on my work laptop. ... How do I change iphone settings to look at an itunes installation on my personal laptop?
    You cannot.
    By Design the iPhone can Only Sync to One iTunes Library at a time.

  • Error executing CFC. Parameter index out of range (2 number of parameters, which is 1)

    Hi,
    My CFC component is defined as:
    <cffunction name="updateNote" output="false" access="remote"  returntype="void" >
         <cfargument name="notedetails" required="true" type="string" >
         <cfargument name="notename" required="true" type="string" />
         <cfquery name="qupdateNote" datasource="notes_db">
               UPDATE
                   notes
               SET
                   notes.notedetails=<CFQUERYPARAM CFSQLTYPE="CF_SQL_VARCHAR" VALUE="#ARGUMENTS.notedetails#">,
               WHERE
                   notename="<CFQUERYPARAM CFSQLTYPE="CF_SQL_VARCHAR" VALUE="#ARGUMENTS.notename#">"
        </cfquery>
    </cffunction>
    In Flash builder when I test the operation I get this error:
    "There was an error while invoking the operation. Check  your server settings and try invoking the operation again.
    Reason:  Server error Unable to invoke CFC - Error Executing Database Query. Parameter  index out of range (2 > number of parameters, which is 1)."
    Im really quessing that this is something small but right now its causing me to pull my hair out of my head!! Argg. Tried a bunch of things but I know thik im stuck.
    Help would be very very appreciated.
    Thanks

    Create test.cfm along these lines:
    <cfset myObj = createObject("component", "dotted.path.to.cfc.file")>
    <cfset myResult = myObj.myMethod(arg=value1, etc)>
    <cfdump var="#myResult#">
    Or, really, you could just browse to this:
    http://your.domain/path/to/your.cfc?method=yourMethod&arg1=value1 [etc]
    Although I dunno which of those two approachs will give you a better error message (indeed, it might be the same).
    Try both.
    Adam

  • My ipod was stolen, can I find out what the serial number of it is, based on looking at a connection history in my itunes? How would I do this? I didn't register it.

    My ipod was stolen, can I find out what the serial number of it is, based on looking at a connection history in my itunes? How would I do this? I didn't register it. I think I found the guy selling it, just looking to confirm the serial number and I'll make a phone call to the police.
    Thanks

    kevilay2013 wrote:
    is this possible?
    Yes.
    Open iTunes on the computer you used to sync the iPod and select Preferences… from the iTunes menu.
    Select the Devices pane. Position the cursor over any of its backups. The iPod's serial number will appear in a popup window.

  • Unable to trace out the Reference Document number in commitment line item.

    Dear All,
          Kindly help me in bellow problem
    When I click the reference document no. in the line item wise display the commitment in t-code S_ALR_87013558 at that time the system open the display PR screen and the massage is displayed in the below, the Purchase document does not exist.
    Due to this reason the price capture in commitment line item is not traceable and I am not able to delete the commitment line item.
    Kindly suggest how to trace out the reference document number and delete it and release the commitment price.
    Thanks,
    Asu.

    >
    Asutosh Mahapatra wrote:
    > Dear All,
    >
    >       Kindly help me in bellow problem
    >
    >
    > When I click the reference document no. in the line item wise display the commitment in t-code S_ALR_87013558 at that time the system open the display PR screen and the massage is displayed in the below, the Purchase document does not exist.
    >
    > Due to this reason the price capture in commitment line item is not traceable and I am not able to delete the commitment line item.
    >
    > Kindly suggest how to trace out the reference document number and delete it and release the commitment price.
    >
    > Thanks,
    > Asu.
    Can you explain what is your requirement..?
    Do you want to correct the data in the report..?
    Or  it is effecting your availability control and you want to correct it..?
    Or you want to trace a deleted document..? Which is not possible...

  • How to strip out leading numbers in auto-generated bookmarks?

    For years now my team has used an Acrobat plug-in called Compose, which lets us strip out the leading numbers from bookmarks in PDFs generated from FrameMaker 7.2. (The tool works after the fact, so that all bookmark creation occurs after the PDF is created.)
    For example, these document headings:
    1.1 Intro to Happy Fun Ball
    1.1.1. System Requirements
    1.1.2. Cautionary Information (WARNING)
    are translated to the bookmarks:
    Intro to Happy Fun Ball
    System Requirements
    Cautionary Information (WARNING)
    After evaluating the new Adobe Tech Comm Suite, it seems that Acrobat 9 Extended Pro isn't compatible with the Compose plug-in (or at least, the version we've been using for years).
    Does anyone know if there's a method -- built into either FrameMaker 8 or Acrobat 9 Pro Extended, or in an SDK -- that allows you to auto-generate bookmarks but strip out leading numbers? It seems this is a no-brainer of a feature, yet I can't find it listed anywhere in the Acrobat documentation.
    Other names for this feature might be "wild card" or "text masking," not to mention "strip leading numbers."
    Thanks very much for your help.
    Regards,
    Buster

    The following code can be run from the JavaScript console, but since you're new to this, it might be easier to create a button, paste the code shown below into the Mouse Up event of the button, select the Hand tool and click the button to execute the code, and then delete the button if everything is OK.
    If you need to do this a lot, you should consider setting up a custom menu item or toolbar button that executes this code:
    function removeBookmarkPrefix(bookmark) {
        // Resursive function to remove bookmark prefix
        // Rename bookmark without prefix
        bookmark.name = bookmark.name.replace(/^\S+\s+/, "");
        if (bookmark.children != null) {
            for (var i = 0; i < bookmark.children.length; i++) {
                removeBookmarkPrefix(bookmark.children[i]);
    // Remove all bookmark prefixes, recursively
    removeBookmarkPrefix(bookmarkRoot);
    The code uses what's called a regular expression, which in this case is fairly simple: /^\S+\s+/
    This regular expression means to search the bookmark name for the beginning of the string (^), followed by one or more non-whitespace characters (\S+), followed by one or more white space characters (\s+), and replace all that with an empty string (""), thus removing it. This should work with the bookmark name prefixes you describe.
    The function is called recursively, which is an efficient way to handle the hierarchical structure that the bookmark tree can have.
    If you get stuck, post again.
    George

  • How does one strip out all Live Cycle data from a PDF and rebuild the form fields in Acrobat?

    Someone in a different department built a bunch of forms in Live Cycle. We now need to make minor edits to these forms but we all have Macs and can't use Live Cycle. Currently our only option to change a date and a name on each form  is to buy a new Windows workstation, buy a copy of Live Cycle and train someone for it.
    I understand the Live Cycle technology and Acrobat technology for forms are somehow different but there must be a way to just strip out all the Live Cycle form programming so that I just have the bare PDF with the text and layout.  Then make the text edits and rebuild the form fields in Acrobat.

    It depends on your PDF. Is the PDF a static XFA or a dynamic XFA?
    You can check to see if the PDF is static/dynamic by clicking File=>Save As, and it should say static or dynamic PDF as file type.
    iText will work with Static XFA forms created in LiveCycle. Dynamic XFA forms are not supported.
    You can also submit XML data to a server side script and parse the XML data using C# system.xml.xmlreader.
    Another tool that may speed the development of the project is:
    http://www.fdftoolkit.net/
    Note: FDFToolkit.net utilizes iText Technologies.

  • I just upgraded to the latest software for my pages.  When I opened an old document it stripped out all the images I had in my tables.  How do I get them back

    I just upgraded to the latest software for my pages.  When I opened an old document it stripped out all the images I had in my tables.  How do I get them back

    Don't save. Close the documents.
    Pages '09 should still be in your Applications/iWork folder.
    Pages 5 will damage/alter older files, something Apple didn't tell its users.
    Pages 5 is a severely stripped down version with over 90+ features removed.
    We recommend trashing/archiving Pages 5 after Exporting any files you may have saved back to Pages '09.
    Also rate/review Pages 5 in the App store.
    Peter

  • Third Party Plugins Stripped Out After Editing/Saving

    Hello All,
    I'm really hoping someone can help.
    Ok here's the tech stuff:
    Workflow-
    Mac - OS 10.4.9, InDesign CS3 5.0.2
    Windows - XP InCopy CS3 5.0.2
    Plugins used in InDesign (Mac) AutoPrice (Meadows Pub.) & Sonar Indexing (Virginia Systems)
    These 2 plugins are vital to our Catalogs.
    What I'm seeing,...
    I export stories (copy blocks) in InDesign for editing in InCopy on the Windows Machine.
    I open up the same document in InCopy (windows) to test, edit some copy, save, check in, close.
    Now, open this same document again in InDesign (Mac), copy updates needed, update the copy, but wait! all of the Third Party Markers are gone!
    Everything that was tagged, or marked for the Index, and all the Pricing Tags are gone.
    I've found out when the InCopy document is saved, this is when this happens. It strips out all Third party invisible text, placeholders, etc...
    WHAT???
    I can't believe we're the only one's in the world having this issue. And its hard to believe Adobe would even do this.
    I've talked to both Plugin Companies about this, One thinks this is a Bug Issue on Adobe's end.
    The other, is trying to work out something to stop this from happening.
    Ok,... So we're ready to move to a InCopy workflow, but now this. I need HELP!
    We can't implement InCopy when it destroys our vital information,....
    Thanks for any help on this,
    Christopher

    Hello All,
    I'm really hoping someone can help.
    Ok here's the tech stuff:
    Workflow-
    Mac - OS 10.4.9, InDesign CS3 5.0.2
    Windows - XP InCopy CS3 5.0.2
    Plugins used in InDesign (Mac) AutoPrice (Meadows Pub.) & Sonar Indexing (Virginia Systems)
    These 2 plugins are vital to our Catalogs.
    What I'm seeing,...
    I export stories (copy blocks) in InDesign for editing in InCopy on the Windows Machine.
    I open up the same document in InCopy (windows) to test, edit some copy, save, check in, close.
    Now, open this same document again in InDesign (Mac), copy updates needed, update the copy, but wait! all of the Third Party Markers are gone!
    Everything that was tagged, or marked for the Index, and all the Pricing Tags are gone.
    I've found out when the InCopy document is saved, this is when this happens. It strips out all Third party invisible text, placeholders, etc...
    WHAT???
    I can't believe we're the only one's in the world having this issue. And its hard to believe Adobe would even do this.
    I've talked to both Plugin Companies about this, One thinks this is a Bug Issue on Adobe's end.
    The other, is trying to work out something to stop this from happening.
    Ok,... So we're ready to move to a InCopy workflow, but now this. I need HELP!
    We can't implement InCopy when it destroys our vital information,....
    Thanks for any help on this,
    Christopher

  • In Photoshop CS6, Save for Web strips out my filename after a period "." character

    I have a file named label-1.5oz.psd.  In Photoshop CS6 when I use "Save for Web" to save it as a JPG, it only wants to save a part of the filename: label-1.jpg
    I strips out everything after the period "." character.  I know it's incorrectly thinking that's a file extension.
    Any ideas how I can fix this?  Any settings I should tweak?  I'd really love for it to save the full filename without requiring me to retype the last part every time.
    Thanks in advance for any help!

    Oh if only it were that easy...  Unfortunately, they have to be cropped and resized, converting over from a print catalog where much of that work was originally done in InDesign, and now have to convert each individual image to make the web site look like the catalog...  but thanks for the suggestion, have already tried to automate what I could..  But much of this is going to be hands on...  getting my familiar quick keys to function correctly would help greatly.

  • XI 2.0 Inbound message to XI has XML Tags Stripped out

    Hi
    We are developing an XI 2.0 application.  A message is sent from a 3rd party company over a VPN and routed to our XI box.
    On receiving the message, XI tries to carry out the message mapping. However it fails because it does not like the content of the message. When I check the message content (View -> Source) we see that all the XML Tags have been stripped out somehow. Only the actual data field contents remain, in a big string. So obviously the mapping fails.
    If I run the same scenario, but send the message from a JMS Test Client on my PC and route it to the XI box everything is fine and the message retains the XML Tags.
    The messages route through the SAP Adapter Engine in XI.
    The 3rd party company say the message does contain the tags when it leaves their systems.
    Has anybody come across this scenario? Would any settings in the SAP Adapter Engine force the XI tags to be stripped? Any suggestions would be very welcome!
    Many Thanks
    Jaime

    Hi Jaime,
    The visual J2EE administrator is the standard administrator tool of any SAP WEBAS system so it is not a specifc XI tool.
    Typically your SAP WEB AS basis administrators use the tool to configure the J2EE part of the SAP WEB AS.
    SAP OSS note 76921 has all the details on tracing the XI adapter framework for version 3.0 - might be usefull for version 2.0 as well ...
    Regards,
    Steven
    BTW - are you that Diagonal bloke with whome I have been on a project for a client in Rozenburg, Netherlands ? I was that SAP BC B2B bloke

Maybe you are looking for

  • PLEASE HELP ME WITH THIS CODE I NEED A NAV BAR ASAP!!!!

    The code is below I just want a simple navigation bar that when I click on biography it takes me to the biography page and so on...I even tried the "href" nothing works I try it in live view and it doesnt work I try it out of live view and it still d

  • HT201317 video to icloud

    How do you get video from iphone 5 to icloud?  Whay won't it upload automatically like photo?

  • SmartView TotalYear "Locking" behaviour

    Hi all, I encountered an issue on Friday which I hadn't seen before, I'd like to know if it's expected behaviour and if not, if there's any work around. If a user Logs into Hyperion Planning and Locks a TotalYear member in a web form, they are able t

  • BDc for multiple items in po.

    Hi friends. I want to write BDc program for uploading Purchase orders.but problem is that PO has multiple line items and also there are many POs. also i want flat file format for same If any one have program for same please send me on [email protecte

  • Want to use a text as shape without convert to shape. is it possible?

    I'm using PS6. Want to use texts as shape for path operations with custom shapes. hope can explain my problem.