UCCX: unable to convert string into a number

Hi all,
I used the Get Digit String to pull a 4 digital numbers (stored as variable sYear) from a caller, this number is obviously stored as a string. Then i used 'set iYear=sYear' to conver this string to an integer.
I debuged the script, when I entered number of year without following #, it worked fine. If I entered number of year and followed by #, i got the message 'unable to conver string into a number'. Can someone help me with that?
Thanks a lot.

Hi Reena,
The UCCX version is 10.5.1.
I found the problem. It works after i changed input length to 5.  'The terminating key overrides the Maximum Input Length to terminate input'.
Thanks.

Similar Messages

  • Unable to convert string into binary

    Hello,
    I have a web application that does the following:
    1. Takes in user information via form. This includes images.
    2. Displays all the user information in a portfolio. Looks like the portfolio on this page:
    http://wrapbootstrap.com/preview/WB00PN23G
    3. When clicking on each item you are brought to a page that displays the form information and the images.
    So far it works fine but instead of sending the images as binary to SQL database I send them as strings and the problem is now when I update the code on my cloud host the images no longer display but all the text displays fine. I am thinking the problem
    is that instead of sending my images as strings I need to store them as binary and retrieve them as well. The problem is I did some research and have been unsuccessful in the ways mentioned.
    Here is my code for the form:
    //gather all the information from the form
    //I call a stored procedure to send my data to my sql database
    using (SqlCommand cmd = new SqlCommand("SaveImage", connection.con))
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.Add("@username", SqlDbType.VarChar).Value = UserName.Text;
    cmd.Parameters.Add("@email", SqlDbType.VarChar).Value = Email.Text;
    cmd.Parameters.Add("@project", SqlDbType.NVarChar).Value = Project.Text;
    cmd.Parameters.Add("@description", SqlDbType.NVarChar).Value = Description.Text;
    cmd.Parameters.Add("@img1", SqlDbType.VarBinary).Value = img1;
    cmd.Parameters.Add("@img2", SqlDbType.VarChar).Value = img2;
    cmd.Parameters.Add("@img3", SqlDbType.VarChar).Value = ppt;
    cmd.ExecuteNonQuery();
    cmd.Parameters.Clear();
    connection.con.Close();
    //Here is the stored procedure
    USE [TestDB]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER proc [dbo].[SaveImage]
    @username varchar(100),
    @email varchar(50),
    @project nvarchar(MAX),
    @description nvarchar(MAX),
    @img1 varbinary(MAX),
    @img2 nvarchar(MAX),
    @img3 nvarchar(MAX) as
    INSERT INTO ProjectTbl(UserName, Email, ProjectName, ProjectDescription, Image1, Image2, Image3)
    VALUES (@username, @email, @project, @description, @img1, @img2,@img3)
    // Here is the code for the page that displays all the projects submitted in the form of a portfolio (just the backend not the front-end)
    public static string CreateSessionViaJavascript(string strTest)
    Page objp = new Page();
    objp.Session["controlID"] = strTest;
    return strTest;
    public static string imgString;
    //public string[] array;
    public List<string> image1 = new List<string>();
    public List<string> image2 = new List<string>();
    public List<string> image3 = new List<string>();
    public List<string> finalimages = new List<string>();
    protected void Page_Load(object sender, EventArgs e)
    if (!IsPostBack)
    LoadData();
    private void LoadData()
    var data = DataAccess.GetCurrentProject();
    try
    data.Columns.Add("hrefPath");
    foreach (DataRow dr in data.Rows)
    dr["hrefPath"] = "project.aspx?ID=" + dr["Id"];
    DataListProjectImg.DataSource = data;
    DataListProjectImg.DataBind();
    catch (Exception ex)
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    var imgButton = sender as ImageButton;
    if (imgButton != null)
    Response.Redirect("project.aspx?ID=" + imgButton.CommandArgument, false);
    //And here is the code for the each individual item that is clicked on in the portfolio. The images are displayed in a carousel along with the user entered data:
    protected void Page_Load(object sender, EventArgs e)
    //string code = "" + Session["Code"].ToString();
    projectId = Request.QueryString["ID"];
    if (!this.IsPostBack)
    LoadData();
    private void LoadData()
    Connection connection = new Connection();
    try
    connection.connection1();
    SqlCommand com = new SqlCommand("Select Image1,Image2,Image3,UserName,ProjectName,ProjectDescription,Email FROM ProjectTbl Where id='" + projectId + "'", connection.con);
    SqlDataReader dataReader = com.ExecuteReader();
    while (dataReader.Read())
    image1.Src = dataReader["Image1"].ToString();
    image2.Src = dataReader["Image2"].ToString();
    image3.Src = (dataReader["Image3"] != null && (dataReader["Image3"].ToString().Contains(".ppt") || dataReader["Image3"].ToString().Contains(".pptx"))) ? "assets/img/PPTdefault2.png" : dataReader["Image3"].ToString();
    hprPptLink.HRef = (dataReader["Image3"] != null && (dataReader["Image3"].ToString().Contains(".ppt") || dataReader["Image3"].ToString().Contains(".pptx"))) ? dataReader["Image3"].ToString() : "#";
    Name.Text = dataReader["UserName"].ToString();
    ProjectName.Text = dataReader["ProjectName"].ToString();
    Description.Text = dataReader["ProjectDescription"].ToString();
    Email.Text = dataReader["Email"].ToString();
    FillDataForEditProjectModal(dataReader);
    dataReader.Close();
    catch (Exception)
    throw;
    private void FillDataForEditProjectModal(SqlDataReader dataReader)
    UserName.Text = Convert.ToString(dataReader["UserName"]);
    txtEmail.Text = Convert.ToString(dataReader["Email"]);
    Project.Text = Convert.ToString(dataReader["ProjectName"]);
    txtDescription.Text = Convert.ToString(dataReader["ProjectDescription"]);
    protected void btnSaveProjDetails_Click(object sender, EventArgs e)
    SaveUploadedFiles();
    LoadData();
    private void SaveUploadedFiles()
    try
    //validation part
    if (Images1.HasFile)
    if (!CheckImageFileType(Images1))
    GenerateImageUploadJavascriptError("Image 1 Upload");
    return;
    if (Images2.HasFile)
    if (!CheckImageFileType(Images2))
    GenerateImageUploadJavascriptError("Image 2 Upload");
    return;
    if (Images3.HasFile)
    if (!Images3.PostedFile.FileName.ToLower().Contains("ppt") || !Images3.PostedFile.FileName.ToLower().Contains("pptx"))
    string script = "alert('Please Select PPT/pptx type only')";
    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "pptUploadError", script, true);
    return;
    //End validation part
    //uploading part
    string image1Path = string.Empty;
    string image2Path = string.Empty;
    string image3Path = string.Empty;
    if (Images1.HasFile)
    image1Path = Path.GetFileName(Images1.PostedFile.FileName);
    Images1.SaveAs(Server.MapPath(image1Path));
    if (Images2.HasFile)
    image2Path = Path.GetFileName(Images2.PostedFile.FileName);
    Images2.SaveAs(Server.MapPath(image2Path));
    if (Images3.HasFile)
    image3Path = Path.GetFileName(Images3.PostedFile.FileName);
    Images3.SaveAs(Server.MapPath(image2Path));
    DataAccess.UpdateProjectDetails(UserName.Text, txtEmail.Text, Project.Text, txtDescription.Text, image1Path, image2Path, image3Path, projectId);
    //end of uplaoding part
    catch (Exception ex)
    throw;
    //Server.Transfer("current.aspx");

    Hi compuluv,
    To store it in the Image object. This image object must be converted to a byte array.
    Based upon your code as below, please try to change Varchar to byte[].
    cmd.Parameters.Add("@img1", SqlDbType.VarBinary).Value = img1;
    cmd.Parameters.Add("@img2", SqlDbType.VarChar).Value = img2;
    cmd.Parameters.Add("@img3", SqlDbType.VarChar).Value = ppt;
    cmd.ExecuteNonQuery();
    For more detailed information, please check
    C# Save and Load Image from Database
    By the way, since your project is a web application, I also found a asp.net version as below.
    You can get some hints.
    http://www.dbtutorials.com/retrieve/saving-retrieving-image-cs/ 
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Not able to convert string attribute to number and date please help me out

    not able to convert string attribute to number and date attribute. While using string to date conversion it shows result as failure.As I am reading from a text file. please help me out

    Hi,
    You need to provide an example value that's failing and the date formats in the reference data you're using. It's more than likely you don't have the correct format in your ref data.
    regards,
    Nick

  • Convert string into XML inside BPEL

    Hello ,
    How to convert string into xml format ? And make element and define attribute inside it ??

    There are several problems with your input:
    1. Your xml is not well-formed because the attribute values should be enclosed withing double " quotes and not single ' quotes;
    2. You use a prefix (sml) for the folowing part but you dont define the namespace:
    <ids>
    <VID ID="new"/>
    <data>
    <*sml:*attr name="std">
    <sml:value></sml:value>
    </sml:attr>
    <sml:attr name="xde">
    <sml:value></sml:value>
    </sml:attr>
    </data>
    </ids>
    Complete message should be:
    <ids xmlns:sml="somenamespace">
    <VID ID="new"/>
    <data>
    <sml:attr name="std">
    <sml:value></sml:value>
    </sml:attr>
    <sml:attr name="xde">
    <sml:value></sml:value>
    </sml:attr>
    </data>
    </ids>
    3. Do you assign this expression to a variable that is based on the schema of your message you want to parse
    Regards,
    Melvin
    * TIP Answer the question as helpful or correct if it helps you , so that someone else will be knowing that this solution helped you or worked for you and also it gives points to the person who answers the question. *

  • I purchased PDF Converter Plus, v1.0 (4 ). I am unable to convert PDF into text. I get all gibberish when I try to do the conversion.

    I purchased PDF Converter Plus, v1.0 (4 ). I am unable to convert PDF into text. I get all gibberish when I try to do the conversion.

    I went to the site and did exactly as the 'support' said. I tried three PDF documents for conversion to Word. On clicking 'convert', the last window gives the file with .doc suffix. After I save and open it the window says, "The XML file cannot be opened because there are problems with the contents." Under "Details", it says, "Incorrect document syntax".
    Please guide me further.
    Thanks

  • Using scan from string to convert a string into a number

    I wanted to use scan from string to change a string into a decimal number, but when the string is, for example, 9.14123E-2 it just returns 10. How can I get it to return .00914 or 9.14E-2(as a number not a string). Would there be something easier than scan from string? I'm using labview 5.1. Thank you!

    Hello,
    May be you can checkout the attached example.
    Perkash Mohan Lal
    Institute of Semiconductor Technology
    Technical University Braunschweig
    Attachments:
    string_conversion_1.vi ‏44 KB

  • Converting string to float number

    Here's what I'm trying to do. The user types a number, such as 12.011, in an input box. I want to check to see if the number they typed is between two numbers, such as 12 and 12.1. Therefore, I want to convert the string in the input box to a float number, not an integer, so I can check to see if it's in the correct range. How do I convert a string into a float number?
    thanks
    Mark

    Did you try:
    Number(textinput1.text);
    if(Number(textinput1.text)>12 && Number(textinput1.text)<12.1)

  • How to convert string into date

    Hi all,
    I m new to JDeveloper
    I m taking the date as a string then passing it as a string in the method.
    I want to convert tht string into the date of format (DD-MON-YYYY) or any other format
    require yur assistance in this job.
    THANKXX in advance
    ankit

    Is this what you are looking for:
    java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("dd-MMMMM-YYYY");          
    java.util.Date date1 = null;
    try
       date1 = formatter.parse("Thu Jun 3 09:09:30 2004");
    catch(Exception e)
       e.printStackTrace();
    System.out.println("Date1 in millis : " + date1.getTime());
    System.out.println("Date1 in string : " + date1);
    java.util.Date date2 = new java.util.Date(date1.getTime());
    System.out.println("Date2 in string : " + date2);or look at http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html for more options

  • Converting String to the Number

    Dear Members,
    I'm new to OAF.
    I have a requirement in which I need to convert a string to the number.
    Can any one please help me how to achieve this in OAF?
    Regards.

    Please import oracle.jbo.domain.Number;
    Then include the conversion in a try catch block
    try
    Number numValue = new Number (stringVal);
    catch(SQLException e)
    e.printStackTrace();
    Regards
    Sumit

  • How to convert waveform into complex number

    Hi,
    I need to convert the acquired voltage and current waveform through DAQ card into complex numbers in order to find the phase relationship
    between the waveform.Can u tell me is there any method to convert the acquired waveform into complex number array
    or is there any other method to find the phase??
    please help me in this
    Regards
    Meenatchi

    Dear Meenatchi,
    I am attaching two sample VI s for the issue you are facing. Hope this helps.
    The waveform in array format.vi gives you the values of the waveform obtained from your DAQ card in an array directly. You can choose this mode by selecting it from the options available on the DAQmx read vi. But if you still want to extract the array from the waveform data type please navigate to programming >> waveform >> get waveform components and extract the array component.
    The phase of the complex number created.vi gives you and array of the phases. Please specify the number of iterations of the for loop that determines the size of the array.
    If you need any further assistance, please feel free to contact us.
    Regards,
    Pavan Ramesh
    Applications Engineer
    NI India
    Attachments:
    Waveform array issue.zip ‏10 KB

  • "converting strings into integers in a array"

    I'm really left scrating my head trying to figure this out.
    What I have right now is this
    public class NameManager
         private names[] collection; // collection of names
         private int count;
         public NameManager() // Creating an array which for now is empty
              collection = new names[1000];     
              count = 0;
              String [] collection = {"boston", "Springfield", "New Haven",
                        "New York", "Albany"};
    Its a namemanager for my road trip project which will be sort of like mapquest. What it does, or it's supposed to do is I have a array of names of cities, that represented as strings, in a array called, collection. What my proffeser wants me to do is turn the strings into integers, so in this elements in the array can be referenced .
    It's probably so easy that I'll want to kick myself when I find out how to do it , but for whatever reason , all the information have found on the internet seems to go right over
    If any body can give some idea of how to turn the string you see above into a set of intege s I would be so grateful.

    turn the string into the index in the array
    i.e.
    boston => 0
    springfield => 1
    New Haven => 2
    New York => 3
    Albany => 4I should've mention this before but I need the names to go along with the numbers.
    This is the directions from my proffesser, I know it's not the easiest to understand
    but hopefully It will give you a better idea of what I'm talking about.
    A name manager. This object turns strings into numbers. Every time a name is added to the name manager, it is checked to see if it has already been seen. If so, return the number previously assigned to the name. If not, increment the "number of known names" and return this number as well as remember the string for future reference. You can assume that there will be no more than 1000 names in the manager. Each name is a string.
    A city. A city is a simple object: the city has a name and a number (at present).
    I got most of this part done it just strings integers part that's getting me.

  • Converting String into SecretKey

    Hi there,,
    I'm having probs with decrypting my encrytped data.In fact I have encrypted the data on the client side and have sent the encrypted data and the key to the server database.On the server side I wanna retrieve the key and decrypt the encrypted data with the help of it but I'm finding no way to retrieve it as a key,,moreover while trying to cast the retreived string (having converted it to an Object),,I get the ClassCastException,,
    SecretKey key=(SecretKey) myRetrievedKeyObject;
    Hope somebody can help me out with this,,,sample code highly welcomed....
    thanks...

    Here's the class I'm using for encryption and decryption..
    import java.security.*;
    import java.io.*;
    import java.util.StringTokenizer;
    import javax.crypto.*;
    import sun.misc.*;
    import java.sql.*;
    public class DesEncrypter {
    Cipher ecipher;
    Cipher dcipher;
    DesEncrypter(SecretKey key) {
    try {
    ecipher = Cipher.getInstance("DES");
    dcipher = Cipher.getInstance("DES");
    ecipher.init(Cipher.ENCRYPT_MODE, key);
    dcipher.init(Cipher.DECRYPT_MODE, key);
    } catch (javax.crypto.NoSuchPaddingException e) {
    } catch (java.security.NoSuchAlgorithmException e) {
    } catch (java.security.InvalidKeyException e) {
    public String encrypt(String str) {
    try {
    // Encode the string into bytes using utf-8
    byte[] utf8 = str.getBytes("UTF8");
    // Encrypt
    byte[] enc = ecipher.doFinal(utf8);
    // Encode bytes to base64 to get a string
    return new sun.misc.BASE64Encoder().encode(enc);
    } catch (javax.crypto.BadPaddingException e) {
    } catch (IllegalBlockSizeException e) {
    } catch (UnsupportedEncodingException e) {
    } catch (java.io.IOException e) {
    return null;
    public String decrypt(String str) {
    try {
    // Decode base64 to get bytes
    byte[] dec = new sun.misc.BASE64Decoder().decodeBuffer(str);
    // Decrypt
    byte[] utf8 = dcipher.doFinal(dec);
    // Decode using utf-8
    return new String(utf8, "UTF8");
    } catch (javax.crypto.BadPaddingException e) {
    } catch (IllegalBlockSizeException e) {
    } catch (UnsupportedEncodingException e) {
    } catch (java.io.IOException e) {
    return null;
    hope you can guide me...

  • Convert string into java.sql.Date

    Hi,
    I want to convert a date in string form into java.sql.Date to persist into the database column with Date as its datatype in Oracle. I'm trying as follows:
    import java.sql.Date;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    public class DateTest
    public static void main(String[] args)
    String strDate = "2002-07-16 14:45:01";
         System.out.println("strDate = "+strDate);
    Date aDate = null;
    try
    if(strDate != null && !strDate.trim().equals(""))
         SimpleDateFormat aSDF = new SimpleDateFormat();
         aSDF.applyPattern("yyyy-MM-dd hh:mm:ss");
         java.util.Date utilDate = aSDF.parse(strDate);
    System.out.println("utildate = "+utilDate);
         aDate = new Date(utilDate.getTime());
         aDate.setTime(utilDate.getTime());      
         System.out.println("aDate = "+aDate);
    catch (ParseException e)
    System.out.println("Unable to parse the date - "+strDate);
    catch (Exception ex)
    ex.printStackTrace();
    System.out.println("Caught Exception :"+ex.getMessage());
    It gives the output as :
    strDate = 2002-07-16 14:45:01
    utildate = Tue Jul 16 14:45:01 IST 2002
    aDate = 2002-07-16
    If I put this value into the database table, I can see only the date. Time part is missing. Is this the problem with java.sql.Date or Oracle datatype Date? Please help me asap.
    Thanks in advance.
    Regards,
    Rajapriya.R.

    If I put this value into the database table, I can
    see only the date. Time part is missing. Is this the
    problem with java.sql.Date or Oracle datatype Date?This is not a problem, this is the defined behaviour of the Date type. RTFAPI and have a look at Timestamp, while you're at it.

  • Converting String into double

    Hi,
    I want to convert 30.10 String Value into double.
    I need to get the value as 30.10 as double only.
    I tried but I am getting 30.1 only.
    Please suggest me.
    Thanks in advance..

    user13797408 wrote:
    Hi,
    I want to convert 30.10 String Value into double.
    I need to get the value as 30.10 as double only.
    I tried but I am getting 30.1 only.
    Please suggest me.
    Thanks in advance..Don't do it. A short read of the documentation will tell you why (and why several such methods in many similar Java classes have been deprecated).
    Simply said: 30.1 has no exact representation as a double; and it's quite possible that "30.10" will yield a different value from "30.1" (but hopefully not).
    As far as printing out is concerned, you should check out NumberFormat or String.format(...). You are trying to convert a number stored in binary, that you already converted from a decimal numer (30.1) back to decimal. Sound like overkill to you?
    PS: Have a look at BigDecimal. I think it may do what you want.
    Winston

  • How to convert string into date datatype

    hi! there
    i've a date in string format like MM/dd/yyyy
    eg:String sDate = "01/30/2002";
    and i want to convert this string format into java date format
    same as 01/30/2002 only
    when i write like this
    SimpleDateFormat formatter = new SimpleDateFormat ("MM/dd/yyyy");
              String sDate = "1/11/2002";
              java.util.Date oDate = formatter.parse(sDate);
    i'm getting the output
    Fri Jan 11 00:00:00 GMT+05:30 2002
    i just want the out put like 01/30/2002
    plz,help me

    Hi,
    Just use back the SimpleDateFormat object you defined.
    String myDateInStr = formatter.format(oDate);
    this will format a java.util.Date object to a string representation according to the format you specified in the instantiation of SimpleDateFormat object.

Maybe you are looking for

  • Issue with activated substitution role disappearing

    Hello, We have an example of a user that is experiencing problems accessing her substitution role. Her approver is off on long term sick, hence, her substitution role has been activated in 'Maintain Substitutions' in the ERP portal to enable her to a

  • Nervous About The ATI X1900

    I have a X1900 on backorder-should ship any day now. Having some time with my new Mac Pro and reading up on the X1900 makes me very nervous about glitches, bad drivers and heat issues. Are these problems being blown out of proportion or should I be l

  • DVD's play fine, but CD'splay for about 2 minutes then disk is rejected.

    I have tried various commercially created music CD's and each one pops out after about 2 minutes. DVD's seem to play fine. I have reinstalled the device driver, but no help. Any ideas? Alyn

  • Restoring iPhone 5 causes contacts to disappear.

    When I restore my iPhone 5 from my computer, the contacts at the start all appear from my last backup then after few seconds they are removed. i have restored the phone many times but the same problem occured. Please help.

  • Dynamic Link Error when sending sequence to AME

    Hi, I have a very short sequence without errors in premiere pro, but when I drag the project over to Adobe Media Encoder, I get a "Dynamic Link Error"... "There was an error when adding selected sequence to the batch". Any ideas on how I can fix this