How to do this in coldfusion

hi i had insert statement and the statement is
<cfqueryparam value="#right(trim(items[1]),13)#" cfsqltype="cf_sql_varchar">,  
i need to do padding for this because we had some values of length 4(ex:1234),some have lenght 5(ex:12345),so i need to make them all to lenght of 13 by usig padding (ex:0000000001234),
how can i do this in coldfusion.

LJustify() and RJustify() functions allow you to space pad strings to a desired length.
Then a simple Replace() function allows you to change those spaces into another character.
I.E.
<cfoutput>#replace(LJustify("1234",13)," ","0","ALL")#</cfoutput>

Similar Messages

  • How to made this in coldfusion

    Hi
    users must have the ability to select multiple options from dropdown  when generating reports .  In addition, the user must have the ability to see which options  were selected prior to generating the report.
    Thanks,

    Try what I have below.  Pretty sure its what's you are try to do.  Hope this helps.  If it answers your question please mark as so, I'm new to these forums and I'd like to generate some points.
    <script>
    function myFunc(obj)
      document.getElementById('mySpan').innerHTML=''; //blank it out
      //loop through the options
      for (i=0; i <= obj.options.length - 1; i++)
       if (obj.options[i].selected)
        if (document.getElementById('mySpan').innerHTML == '') //first one, don't lead with comma
         document.getElementById('mySpan').innerHTML=obj.options[i].value;
        else
         document.getElementById('mySpan').innerHTML=document.getElementById('mySpan').innerHTML+' , '+obj.options[i].value;
    </script>
    <select name="test" id="test" multiple="true" size="10" onclick="myFunc(this)">
    <option value="1">One</option>
    <option value="2">Two</option>
    <option value="3">Three</option>
    <option value="4">Four</option>
    <option value="5">Five</option>
    <option value="6">Six</option>
    <option value="7">Seven</option>
    <option value="8">Eight</option>
    <option value="9">Nine</option>
    <option value="10">Ten</option>
    </select>
    <br>
    You have selected: <span id="mySpan"></span>

  • How can I make this using coldfusion?

    Hi, I'd like to make a photo changing gallery as you see on
    the news sites when you click next it loads a new photo and text
    without reloading the page (
    http://news.aol.com/story/ar/_a/miners-families-outraged-in-utah/20070806121809990001)
    is this done in ajax? do you know where I can find the code
    or application to do this in coldfusion?
    Thanks

    this can be done with a simple image swaping javascript like
    the attached code, and then you call it with and onclick event
    like:
    "imageSwap('BigImage', 'myPicture.jpg');" to cycle through
    several images you can use a javascript array to hold all your
    image names and have the next button just increment through the
    list everytime you click it.

  • How to integrate java into coldfusion MX7

    I am beginner and taking training in coldfusion since 2
    months.I want to know how to integrate java into coldfusion
    MX7.

    You might take a look at this doc -
    http://livedocs.macromedia.com/coldfusion/7/htmldocs/00001557.htm
    HTH,
    Anne Sandstrom
    Senior Technical Writer
    ColdFusion
    Adobe Systems, Inc.

  • Ive lost my apple ID for my ipod, now i have an iphone and i want to use the same apple ID for both can someone tell me how to do this

    I have lost my apple ID for my ipod, now ive got a new iphone and i want to use the same ID for both, can anyone one tell me how to do this? ( i no my ID for the iphone)

    Just use the same ID.
    These may alos help:
    How to use multiple iPods, iPads, or iPhones with one computer
    What is the best way to manage multiple...: Apple Support Communities

  • I locked myself out of my ipod touch for 60 mins then actually typed the wrong password in again.  Now it is telling me to "connect to itunes".  I am unsure how to do this.  I am unable to use my ipod at all now. Please help.

    Hi,
    Due to my brother locking me out of my ipod touch I had to wait an hour to log in again.  Unfortunately when I did this, I, again put in the wrong password twice more, each time locking me out for a further 60 minutes.  On my 3rd attempt to log in the wrong password was entered again.  This time though instead of logging me out for another 60mins it now tells me to "connect to itunes" but I have no idea how to do this and I am now unable to use my ipod.  Please help.

    See Here  >  http://support.apple.com/kb/HT1212

  • I recieve SMS and i hear established melody and I do't hear the person on all over SMS. How to solve this problem?

    Problem with an incoming message. For example, during my conversation the second line receives a call, I hear the sound in dynamics such as "piiiip piiiip," but when in this situation I recieve SMS and i hear established melody and I do't hear the person on all over SMS. How to solve this problem? Perhaps someone tell me? save in advance

    Not Charge
    - See:     
    iPod touch: Hardware troubleshooting
    iPhone and iPod touch: Charging the battery
    - Try another cable. The cable for 5G iPod (lightning connector) seems to be more prone to failure than the older cable.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar

  • Recently loaded Lion on my laptop and now my computer crashes often. Black screen and keyboard lights up. Any ideas on what's wrong and how to fix this?

    Recently loaded Lion on my laptop and now my computer crashes often. Black screen and keyboard lights up. Any ideas on what's wrong and how to fix this?

    Everytime this happens Ihave to power down and restart! Any ideas would be appreciated!

  • I bought an I pad 2 from us but I can not activate the Facetime in UAE(Dubai)as I can not see the country in the I pad's  drop list, anyone has an idea as how to resolve this issue

    I bought an I pad 2 from us but I can not activate the Facetime in UAE(Dubai)as I can not see the country in the I pad's  drop list, anyone has an idea as to how to resolve this issue

    I'm not that familiar with how FaceTime works. I know how to set It up but I don't use it. I just know that you can't activate in the UAE. I believe that you can activate in any country that permits it's use. Whether you will need a new ID or not, I can't confirm.
    You can Google this and get all sorts of articles on workarounds. Apparently if you set up a VPN you can use it in the UAE. Here is one article that I found.
    http://talkfree7.blogspot.com/2010/09/how-to-facetime-voip-call-from-uae.html
    I Googled "workaround for FaceTime in UAE" to find this.

  • After moving to iCloud I can only get my email through the cloud, no new emails are making it to my home computer. Does anyone have any advice on how to fix this issue?

    After moving to iCloud I can only get my email through the cloud, no new emails are making it to my home computer and .mac account. Does anyone have any advice on how to fix this issue?

    Welcome to the Apple Community.
    Which OS are you using.

  • My iPhone 4 no longer connects to my car or alarm clock after a recent sync to my computer.  The message at I get when trying to. Connect is "this accessory is not optimized for the device" or something like that.  Anyone know how to fix this?

    My iPhone 4 no longer connects to my car or alarm clock after a recent sync to my computer.  The message at I get when trying to. Connect is "this accessory is not optimized for the device" or something like that.  Anyone know how to fix this?

    Hello there philp_69,
    If I understand correctly it sounds like your phone hasnt been recognized in iTunes on your PC since the last couple of updates. I would use the troubleshooting in the following article which will walk you through the steps one by one. 
    iPhone, iPad, or iPod touch not recognized in iTunes for Windows
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • My new iPhone 4S can't connect to iTunes, App Store or iBooks via Wi-Fi. Works with 3G network. How to fix this?

    My new iPhone 4S (week old) can't connect to iTunes, App Store or iBooks via Wi-Fi (and some other apps e.g. Hollister – but most of the other apps like Safari or ebay work fine). There is no problem with those apps loading via 3G network. When I turn off the wi-fi, it runs over 3G and i can access App store without any problem. When i turn off the 3G network and turn the Wi-Fi on, those apps like App Store won't work, other apps work fine. When i turn on both Wi-Fi and 3G, the App store (and so on) is also not working, other apps are.
    I also found out that when the Wi-fi is on and I sign out my apple ID, the App store starts working! But when I log in again, it will imediatelly stop working. I've tried logging in with others apple IDs, still with the same result. There is no problem with my apple ID account, because it works on my iPad, even via Wi-Fi.
    When i first set up my iPhone, there were no complications using App store ia Wi-fi with exactly the same account. I don't know if it has anything to do with it, but this problem started when i logged in with my UK account and then wanted to log back in with my Czech account.
    I tried turning it off, hard reset and deleting my iPhone several time (even without back up). Nothing worked since then.
    Does anyone have any idea how to fix this?
    I would really appreciate ANY help. This porblem is driving me crazy!

    I am also having the same issue. Please help!

  • TS2755 Iphone 4s voice to text messaging has stopped working. Any information on how to correct this?

    Iphone 4s voice to text messaging suddenly stopped working. The little dots that appear while program is preparing to tranfer audio to text shake side to side and no text appear.

    Any ideas on how to fix this problem
    Depends on what the problem is.

  • When I open iTunes it will automatically go to full screen mode. I can't work out how to turn this off. Only iTunes opens to full screen mode.

    When I open iTunes it will automatically go to full screen mode. I can't work out how to turn this off. Only iTunes opens to full screen mode.

    Go to System Preferences (under the Apple logo in the menu bar).  Choose "General".  Click "Always close windows when quitting an application".
    That should fix it.

  • Having purchased and installed pages after finishing my 30 day trial I now can't save changes to documents, it keeps saying that my trial is over and I need a serial number?  Never got a serial number, any ideas how to rectify this?

    Hi, having purchased and installed pages after my 30 day trial had finished I am now unable to save any changes to documents I had created in the trial version.  It says I need a serial number, which I never got when I purchased the pages app.  Does anyone kno how to rectify this, I would be very grateful for any help as I'm currently writing up my thesis and am now unable

    Hi, I had the same problem and I found that you don't need a serial number anymore. Here is what I did:
    (1)I went to Applications fodder on my Mac. (You can navigate to the Application folder from 'New Finder Window.')
    (2) Deleted Pages (installed as part of the free  free trial version) from the Applications Folder. Also deleted 'IWorks' from the Applications folder.
    (3) Started AppStore.
    (4) Clicked on  Purchases.
    (5) Clicked on Pages.
    (6) Clicked Install.
    (4) repeated (5) and (6) for Numbers and Keynote

Maybe you are looking for