Mapping question: How to only pass on a certain number of characters?

I'm mapping a phone number from the idoc to the XML file.
I only want to send the first 12 characters of a phone number.
For example, if the phone comes in as, "123-456-7890 Ext 44", I only want to send "123-456-7890".
I thought I could use the substring function(0 to 12), but I get an error if the phone is not exacly 12 characters long.
I need to be able to process the value of the phone number if it's:
Blank
Has text like "no phone".
1234567890
123-456-7890
Is there a std function to do this, or would I need a custom java udf?
Thanks,
jeff

Jeff,
you can write a UDF with the following conditions.
I am not so good at Java programming. Hence I am giving you the logic try to draft a UDF using Java.
for(i=0; i<=11; i++) //worst case you are interested in first 12 values in the incoming payload incl "-"
1. If the read character is one of the alphabets or "" do not pass //to take care of blank or no phone or NA
2. If the read character is - do not pass.
3. If the read value is digit, pass it
if the concatenated string == 10 then pass it to target field.
if concatenated string =="", do not pass or take corresponding action.
this ways, the "NA" or "no Phone" or "" will be filtered out
Hope its useful
Venkat.

Similar Messages

  • How do I send out a certain number of pulses

    I am using the E-Series DAQ board, and in my programing I have three stages, I need to send out a certain number of pulse depending on the stage selected. For example if stage one is selected 30 pulses will be sent out and thats it. The pulses will be used to move a stepper motor. The stepper motor is a linear stepper so the pulses will be used to move the shaft 1 inch or 3 inches, depending on the stage selected.

    It sounds like you want to generate a "Finite Pulse Train". Depending on which programming language you intend to implement this with (LabVIEW, LabWindows/CVI, Measurement Studio for Visual Basic or C++), we probably already have an example written. From our website at www.ni.com simply search for Finite Pulse Train. You will want to only use examples that have been written for the DAQ-STC chip, which our E-Series DAQ devices leverage.
    The finite pulse train examples will show you how to output a finite pulse, of say 30 pulses, as well as configure the frequency and duty cycle.
    Regards,
    Justin Britten
    Applications Engineer
    National Instruments

  • How can I limit running headers to a certain number of characters?

    I have a client that has a few very long headings in their book. The headings can't be re-written. The immediate problem is that I have running headers in this book, so when Frame is using one of these long headings for the running header, the running header is garbled. The text runs all the way to the end of the line, then it starts over at the beginning of the line over the words that are already there.
    Is there a method to limit the number of characters in a running header (or does someone know of another tactic) to force the running headers to display suitably?
    I'm using Frame 9 on Windows 8. (It also occurs on Windows 7 with Frame 9.)
    Thanks in advance for your help!
    Karen

    If the MasterPage frame that contains the RHF is only one row high, and suitably short, I would expect lone text string to get clipped at the frame edge. Problem is, that might be in the middle of a character.
    I'd be tempted to use a variation on the RHF trick described lately at:
    http://forums.adobe.com/message/5730734#5730734
    where each Heading1 has an anchored frame normally visible only to the author, containing the actual Heading1.RHF text picked for use in the header.
    For most instances, each Heading1.RHF could just be an Xref to the full Heading1.
    For the troublesome long Heading1's, the Heading1.RHF text would be hand-typed and shortened suitably.
    > The headings can't be re-written.
    In this hack, they aren't.
    > I have a client ...
    That's always an easy problem to fix .
    If the anchored frames become an issue, you can also use the Marker trick described by Arnis in that same referenced thread. Markers take up no visible space, but might be less obvious for future document stewards to puzzle out. That person might be you .

  • Mapping question: How to display only hole numbers..??

    Hi all
    I have 3 fields in my message mapping where I need to convert them to hole numbers. This includes Invoice amount, Brutto and Netto weight. If Invoice amount says '2300.30' in my IDoc it should be '2300' in the xml document. If amount says '2300.70' result should be '2301'in my xml document. The same logic should be applied to the 2 weight fields.
    Thanks in advance
    Peter

    hi Peter,
    have you tried using <b>round</b> function?
    it's a standard function from the arithmetic functio group in the message mapping
    BTW
    with this function:
    2300.30 gives 2300
    2300.70 gives 2301
    tested
    description:
    round
    O = integer value back that is closest to the value of argument I. Corresponds to the Java function java.lang.Math.round().
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • How can i configure my iphone to only pass traffic from certain apps over vpn

    I have got a telephony app that connects to a phone system through vpn. when I turn on "send all traffic through vpn" internet and other apps are really slow. is their a way to configure the phone to send only traffic from the app through VPN.

    Now all my new apps as well as several others are gone from the iPhone.
    Look on other screens. The 4.1 update ands Game Center to the home screen. If that screen was full it create a blank screen and moves one app from the home screen to the new screen to make room for Game Center. All the other screens are pushed back one place.
    How can I get my apps back? It cost me a lot of time and money to discover those apps and get them onto the phone. Are they just gone now?
    If they are really gone, you can download them again. You will not be charged again if you use the same iTunes account.

  • Mapping question - how to remove empty recordsets from output XML?

    Hello everyone!
    I have a mapping problem I hope you can help me out with.
    Here is an example of the source message:
    <IDOC>
    .    <HEAD>
    .    </HEAD>
    .    <DET>
    .    .    <Node>
    .    .    .    <nodeA>001</nodeA>
    .    .    .    <nodeB>OA</nodeB>
    .    .    </Node>
    .    .    <Node>
    .    .    .    <nodeB>OB</nodeB>
    .    .    </Node>
    .    .    <Node>
    .    .    .    <nodeA>002</nodeA>
    .    .    .    <nodeB>OC</nodeB>
    .    .    </Node>
    .    </DET>
    </IDOC>
    After testing the above XML in the message mapping, here's what my target looks like:
    <FILE>
    .    .    <Rec>
    .    .    .    <nA>001</nA>
    .    .    .    <nB>OA</nB>
    .    .    </Rec>
    .    .    <Rec>
    .    .    .    <nB>
    .    .    .    <nA>
    .    .    </Rec>
    .    .    <Rec>
    .    .    .    <nA>002</nA>
    .    .    .    <nB>OC</nB>
    .    .    </Rec>
    </FILE>
    "Node" in the "source" message is mapped to "Rec" in my "target" message.
    "Node=" -
    > "Rec"
    You may notice the the "Rec" in the second entry has empty fields. The reason this is so is because I put an "IF" condition in field "nA" and field "nB" that checks whether "nodeA" in the "source" exists/has a value, and if it doesn't, empty values should be given.
    Here's my problem, I need the XML output to be clean. All empty Recs should be removed from the Output XML so that it resembles the one below:
    <FILE>
    .    .    <Rec>
    .    .    .    <nA>001</nA>
    .    .    .    <nB>OA</nB>
    .    .    </Rec>
    .    .    <Rec>
    .    .    .    <nA>002</nA>
    .    .    .    <nB>OC</nB>
    .    .    </Rec>
    </FILE>
    I've tried several ways to get this done to no avail. Would anyone be able to help me out? I would really, really appreciate it!
    Warm regards,
    Glenn

    Hello,
    Here's how the Display Queue looks like from the "CreateIF"
    Default Context:
    0     [false]     [suppress]
    1     [false]     [suppress]
    2     [false]     [suppress]
    3     [true]     []
    4     [false]     [suppress]
    5     [true]     []
    6     [false]     [suppress]
    7     [false]     [suppress]
    8     [false]     [suppress]
    9     [true]     []
    10     [false]     [suppress]
    11     [false]     [suppress]
    12     [false]     [suppress]
    13     [true]     []
    14     [false]     [suppress]
    15     [false]     [suppress]
    16     [false]     [suppress]
    17     [true]     []
    18     [false]     [suppress]
    19     [false]     [suppress]
    20     [false]     [suppress]
    21     [true]     []
    CreateIF Context up one notch:
    0     [false]     [suppress]
    1     [true]     []
    2     [true]     []
    3     [true]     []
    4     [true]     []
    5     [true]     []
    6      [true]     []     
    7     [true]     []
    8     [false]     [suppress]
    9     [false]     [suppress]
    10     [false]     [suppress]
    11     [false]     [suppress]
    Here's how the Display Queue looks like from the "NodeA"
    SUPPRESS     [false]
    SUPPRESS     [false]
    [0000000292]     [false]
    [0000000292]     [true]
    [0000000252]     [false]
    [0000000252]     [true]
    SUPPRESS     [false]
    [0000000078]     [false]
    [0000000078]     [false]
    SUPPRESS     [true]
    [0000000109]     [false]
    [0000000109]     [false]
    SUPPRESS     [false]
    [0000000292]     [true]
    [0000000292]     [false]
    SUPPRESS     [false]
    [0000000076]     [false]
    [0000000076]     [true]
    SUPPRESS     [false]
    [0000000292]     [false]
    [0000000292]     [false]
    SUPPRESS     [true]
    SUPPRESS     [false]
    NodeA context one notch up:
    SUPPRESS     [false]
    [0000000292]     [true]
    [0000000252]     [true]
    [0000000078]     [true]
    [0000000109]     [true]
    [0000000292]     [true]
    [0000000076]     [true]
    [0000000292]     [true]
    [0000000074]     [true]
    [0000000077]     [true]
    [0000000081]     [true]
    [0000000292]     [true]
    [0000000252]     [true]
    [0000000081]     [true]
    [0000000081]     [false]
    SUPPRESS
    Hope that helps you help me!
    Glenn

  • Simple Task - Syntax Question (how do you pass variables from one component to another component - databinding)?

    Hi all,
    I'm trying to pass some width/height/URLs from a Video Player component to a Social Bookmarking component's embed text input field. (for people to grab and share videos).
    I know this is a simple task, but it's the end of the day and I seem to be having a brain failure... What's the syntax to achieve this? Do I have to import the video player component? These widths/heights/URLs are all being dynamically generated from an XML... should I be pulling it from the XML or just reuse the variables that already exist in the Video Player component?
    Here's my code...
    Video Player:
    [Bindable]
    public var source:String = "";
    [Bindable]
    public var autoPlay:Boolean = false;
    [Bindable]
    public var fullScreenMode:Boolean = false;
    [Bindable]
    public var clipTag:String = "_movie";
    [Bindable]
    public var iag_code:String = "";
    [Bindable]
    public var officialURL:String = "http://www.movies.com/";
    [Bindable]
    public var referer:String = "unknown";
    [Bindable]
    public var gID:String;
    [Bindable]
    public var starterImageURL:String = 'http://www.movies.com/jazzmaster/images/default_starter_image.
    [Bindable]
    public var oldWidth:Number;
    [Bindable]
    public var oldHeight:Number;
    Sharing Component:
    <mx:HBox
      height="10%"
      horizontalCenter="-25"
      verticalCenter="0"
      paddingBottom="5">
      <mx:Text text="Embed Code:" paddingTop="1" color="#FFFFFF" fontSize="12"/>
      <mx:TextInput  text="{oldWidth}"/>
    </mx:HBox>
    The code above throws an error... "Attempted access of inaccessible property oldWidth through a reference with a static type com:SharingBookmarks."
    Thanks all!
    DK

    Try this..
    create a new flex project and add a folder called "src"
    create a new MXML component named "VideoComp.mxml" and copy/paste
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var videoWidth:int = 300;
    [Bindable]
    public var videoHeight:int = 300;
    ]]>
    </mx:Script>
    <mx:Label text="Vidoe" />
    <mx:TextInput text="{videoWidth}" id="w" change="this.videoWidth = int(w.text);" />
    <mx:TextInput text="{videoHeight}" id="h" change="this.videoHeight = int(h.text);" />
    </mx:VBox>
    create a new MXML component named, "SharingComp.mxml" add copy/paste this..
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var videoWidth:int;
    [Bindable]
    public var videoHeight:int;
    ]]>
    </mx:Script>
    <mx:Label text="Sharing Comp." />
    <mx:Label text="{videoWidth}" />
    <mx:Label text="{videoHeight}" />
    </mx:VBox>
    and here is the main.mxml file
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:src="src.*">
        <mx:Script>
            <![CDATA[
                private function doSomething():void
                 sharingComp.videoHeight = videoComp.videoHeight;
                 sharingComp.videoWidth = videoComp.videoWidth;
            ]]>
        </mx:Script>
       <src:VideoComp id="videoComp" />
       <mx:Button click="doSomething()" label="copy" />
       <src:SharingComp id="sharingComp" />
    </mx:Application>
    Hope this helps,
    BaBo,

  • How to only have footer on certain pages?

    I want to only have page number after the second page, is there any way to do this?

    simon1116 wrote:
    Hi everyone,
    I have a few pictures in a publication, and I only need to see the bleed on those pages. However, when I select bleed option under document setting, the bleed appears on every single page.  How to show bleeds only on the pictures pages? Thank you very much!
    Simon
    You can fake a bleed by drawing a rectangle on a non-printing layer. Show or hide the layer as needed. Because showing/hiding a layer affects all pages in a document, to show one or another fake bleed independent of others, place each on its own layer. Although in InDesign CS5's Layers panel, you can select objects on layers and show or hide them individually, it's tricky to figure out which is which; it's easier to place each fake bleed rectangle on its own layer.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • How to only show bleeds on certain pages?

    Hi everyone,
    I have a few pictures in a publication, and I only need to see the bleed on those pages. However, when I select bleed option under document setting, the bleed appears on every single page.  How to show bleeds only on the pictures pages? Thank you very much!
    Simon

    simon1116 wrote:
    Hi everyone,
    I have a few pictures in a publication, and I only need to see the bleed on those pages. However, when I select bleed option under document setting, the bleed appears on every single page.  How to show bleeds only on the pictures pages? Thank you very much!
    Simon
    You can fake a bleed by drawing a rectangle on a non-printing layer. Show or hide the layer as needed. Because showing/hiding a layer affects all pages in a document, to show one or another fake bleed independent of others, place each on its own layer. Although in InDesign CS5's Layers panel, you can select objects on layers and show or hide them individually, it's tricky to figure out which is which; it's easier to place each fake bleed rectangle on its own layer.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Is it possible for a mac to run across a Windows based server such as in a school, and still be able to access all networked folders? I have been told that macs can only read down a certain number of folders

    Is it possible to run a mac on a windows based server? We have a server based on Windows 7 in our school, and our techies are reluctant to let me buy a mac as they say macs can only read a number of folders deep, which would preclude me from accessing shared folders on our servers. Is this true, and is there a way round this? I would eventually like to get a suite of macs, but because all our resources are on the server, I have to be able to access them.
    Thanks for any help,
    Mike

    I have found that both Linux and Mac (unix) are capable of reading "deep" folders while win 32 will have issues, your it people are clearly wrong.  I run a network with both win/mac. And as long as the win servers/pc's that have shares are set to allow apple file sharing in their folder properties.   And the macs are set to allow smb there should absolutely no trouble with you accessing anything across the platforms, heck, from a Mac to a win pc on some occasions you don't even need to include a "domain" name to log on to, and you can create aliases and make your own shortcuts etc... So you don't have to manually connect each time you boot up etc... But that's all personal preferences I suppose.
    All I can tell you is that, I do it on a daily basis managing a small business. So your answer is yes you can.

  • How to restrict user to insert certain number of records (urgent)

    i have master detail Form. My requirement is as following.
    1) In master block user enter other information and enter suppose 5 in text item.
    2) Then 5 rows should be display in detail block. and user couldnt enter more than 5 records in detail block.

    i hope understand,
    To close a query when :max_record = TO_NUMBER(:global.max_rec) and
    keep count of the number of records retrieved,
    create a POST-QUERY trigger.
    IF :parameter.max_record = TO_NUMBER(:global.max_rec) THEN
    ABORT_QUERY;
    ELSE
    :global.max_rec := TO_CHAR(TO_NUMBER(:global.max_rec) + 1);
    END IF;
    :parameter.max_record = number record you want retrieve and set in PRE-FORM
    Hope help you

  • How can I pass the value to another frame?

    Hi all,
    The following is part of my coding of a frame. Once i click on the jButton2, the selected value will be stored into a variable named NAME and the value will be displayed by a label in same frame. At the same time, a new frame named TESTING3 will be set to visible.
    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)
    // TODO add your handling code here:
        String name = (String)jList1.getSelectedValue();
        jLabel1.setText(name);       //display the value in a label in same frame
        new testing3().setVisible(true);     //a new frame set to visible
    }      Question: How can I pass the value to TESTING3 frame and display it on that frame?
    Thanks,
    ning.

    just make an archive that save that variable and them get them from de clase were you save it
    public class sav {
    String n;
    public sav {
    n="";
    public void addn(String x){
    n=x;
    public String shown(){
    return n;
    and them save it from the frame
    sav sun = new sav();
    sav.addn(f);
    them call it from the other frame
    sav sin = new sav();
    String s = sin.shown();
    label.setText(s);
    and i think thats you want to do if its not please explain me better
    bye

  • Droid Pro- how to delete apps and google maps question

    is there anyway I can delete verizon apps off my droid pro?? I mean for example there is the google maps that came on it, a navigation, and VZW navigator that came it. I only use the google maps, and I want the other 2 off and I can't figure it out.
    Also,  my google maps updated today, and the new feature on it is 3d maps. How the heck do I find the 3d maps?

    Kyla1234 wrote:
    is there anyway I can delete verizon apps off my droid pro?? I mean for example there is the google maps that came on it, a navigation, and VZW navigator that came it. I only use the google maps, and I want the other 2 off and I can't figure it out.
    Also,  my google maps updated today, and the new feature on it is 3d maps. How the heck do I find the 3d maps?
    Carrier-loaded apps are part of the phones everywhere; Verizon, AT&T, Sprint, etc.  I've had them on even the feature phones--Backup Assistant, Get It Now, etc.  They can not be deleted on any phone on any carrier without [Edited to comply with Terms of Service] which is another topic.  You can set up your home screens to your satisfaction by deleting any unwanted icons--press and hold the icon, then drag it to launcher tab which should be highlighted red--it serves as the trash can.  This is how it worked on my Droid 1.  

  • How can I pass more than one parameters in PDK-URL services?

    Hi all,
    How can I pass more than one parameters in PDK-URL service? All samples on Portal Center shows just one parameter passing.
    <inputParameter class="oracle.portal.provider.v1.URLPortletParameter">
    <name>csz</name>
    <isMandatory>false</isMandatory>
    <displayName>What location do you want a map for (City, State or Zip)?</displayName>
    </inputParameter>
    How can I write the privider.xml file for passing multiple parameters?

    I answer to my question. I've got the answer.
    I repeatly write down the <inputParameter> tags, and it works.

  • How can we pass the entire rows of a table to a web service in a VC model ?

    Hi,
    On the click of the submit button, I have to pass the rows of two tables into an enterprise service. This service also takes other fields of a form as an input.
    How can we pass the entire rows of a table into a service ?
    Regards,
    Nitin

    Hi Nitin,
    It seems that you have two or three different structures to pass data using your webservice. In your main question, two tables, you can join both in one table and from there call the webservice. In order to pass the entire table you need:
    1. Draw a line between your joinned table and your service,
    2. Map the fields,
    3. Create a 'SUBMIT' in your table tool bar. Right click on your table and choose 'Create Toobar', '+', name and choose 'Submit' as your event.
    4. Go to Configure Element (Table View) 'Multiple' at Selection Mode.
    Reward points if helps you to solve your question.
    Regards,
    Gilson Teixeira

Maybe you are looking for

  • New Questions not displaying on a page Survey App Part SharePoint 2013

    I wanted to insert a survey app part on a page in my site so i followed steps mentioned in the below link http://sharepoint.stackexchange.com/questions/86903/showing-only-survey-questions-in-page it successfully created but now when insert another qu

  • Problem in Resultset

    hello i got a problem using jfreechart. as the constructor of the chart takes and integer and double[], but how can we pass resultset into double[]. i tried converting the resultset into double and store it in a vector. reading the size of vector and

  • Dialer not connecting to campaign manager

    Hello, I have the dialer not connecting to campaign manager and showing the following: 10:00:50 Trace: Attempting EMT connection to computer [172.16.200.82/172.16.200.82], port [40032] 10:00:51 Trace:         Unable to establish an EMT connection: 10

  • Planning DataExport

    I have created a business rule to export data planning. The data is exporting to the path specified. Content of the rule for export is as below: FIX DATAEXPORT "File" ";" "W:\export.txt" "0"; ENDFIX Our situation is such that many users will be expor

  • Oracle BI Add-In for Excel - Need VBA Macro Command to Refresh Data

    I am trying to find the VBA command that i can use within my Excel Macro to refresh the data from my BI Connector