Cast string in a text field as date in UK format on reports

Hi All,
I have UK locale setup for all my users, so all date / time fields display in dd/mm/yyyy hh:mm:ss format. However this one field is a text field and has a timestamp value in it in US format like 05/26/2011 16:31:00 and I am trying to display it like 26/05/2011 16:31:00 in reports.
I tried to Cast it as DATE or TIME or TIMESTAMP it errors out saying invalid month. Understandable.
The best I have managed to do is to simply use the SUBSTRING, LEFT and RIGHT functions as below and rearrange the characters to display it the way I want, but I don't want to hard code it that way. There are a few US locale users as well and it will impact them if I hard code it.
SUBSTRING ("- Service Request Custom Attributes".TEXT_35 FROM 4 FOR 3) || LEFT("- Service Request Custom Attributes".TEXT_35, 3) || RIGHT("- Service Request Custom Attributes".TEXT_35, 13)
Is there a way to achieve this? Please suggest. The reason I am doing it is in the same report there are other date / time fields displaying in UK format except this one so it's confusing to users.
Regards,
Udaya

The reason you're receiving the "Invalid Month" error is that the date format expected by the cast function is dd-mmm-yyyy (as in: 11-Jun-2011). You can use substring and case statements to pull out what you need from the data field, and then cast it to an actual date.
Chris

Similar Messages

  • Text field and data retrieve

    hi ppl
    am new to java. jus help me on dis.
    i ve placed a text field and a button in applet
    and when i click d button i need the data in text field ( dat is typed by the user)
    to be displayed in the applet.

    hi ppl
    am new to java. jus help me on dis.
    i ve placed a text field and a button in applet
    and when i click d button i need the data in text
    field ( dat is typed by the user)
    to be displayed in the applet.If the user keyed the text in, it should already be displayed in the Applet. ;oP All kidding aside, as mentioned you will find a method called getText(), which can be called on the TextField or JTextField, as the case may be, that returns a String. What you do with that String is what you need to be more specific about.

  • How to populate text fields with data present in a table

    Hi,
    The page i'm building has got a select list for the primary key column and text fields corresponding to rest of the columns in the table.
    upon selecting some value from the list, the data corresponding to that row should get populated in the respective items. I don't want to add source in each item. can't i create a process or something else where this is done for each item.
    for eg there's a table with columns A(primary key) and B.
    there is a text fields on this page.
    this textfield should populate the data from the table whenever i submit the page such that teh value in B is select B from tablename where A = the selected value.
    Thanks
    Dhirendra

    So I assume page was not built using a wizard. Why on earth you would want to I dont know, but you could create an "After Header" pl/sql process to populate the relevant fields, assuming the id was know on entry to the page. If you want to select the id on the page and then populate the fields, guess you will need to use a "Text Field (always submits page when Enter pressed)" and then use an "On Submit" process to populate the items.
    If you are using an Automated Row Fetch, remember to select "Set memory Cache on Fetch" in that process.
    Hope this helps.

  • How to open a new window by clicking the string in the text field ?

    Hi
    is it possible to do this ?
    Some string value is retrieved from database and it is placed in the text field. [ done with this part ]
    i have to provide link to that string to open a new window. [ yet to do ]
    Please help me in this.
    Note : if this is not possible , give me some other idea to do this.
    -Arun

    whether this is useful ?
    I am using string field here.
    public StringField(java.lang.String name,
    java.lang.Object listener,
    java.lang.String callback,
    java.lang.String value)Constructs a StringField
    Parameters:
    name - Name of field
    listener - Listener to update
    callback - Callback of listener
    value - Value of field
    -Arun

  • Having issues with populating a Text Field with data from 2 other fields

    I have 3 fields Tools_1a_pri, Tools_1a_pri_other, Tools_1a_pri_txt.
    Tools_1a_pri is a drop down combo with a predefined list. One of the options is "Other".  When "Other" is selected, the text field Tools_1a_pri_other becomes visible for users to enter the name of the other tool.
    The Tools_1a_pri_txt is a text field with a calculation that shows either text stating that no tool has been selected or the Tools_1a_pri & or Tools_1a_pri_other.
    When I select one of the predefined tools, everything works.  When I select other, it appears that nothing has changed.  It requires that I click on another field before it populates.  This is confusing to the user.
    Tools_1a_pri   Validate code
    this.getField("Tools_1a_pri_Other").display = event.value=="Other" ? display.visible : display.hidden;
    Tools_1a_pri_txt  Calculation code
    //if nothing is selected, do the following
    if (getField("Tools_1a_pri").value.length < 2) {
    event.target.textColor = color.red
    event.value = "No primary tool identified";
    }else if (getField("Tools_1a_pri").value != "Other") {
    //otherwise do this if other is selected
    event.target.textColor = color.black
    event.value = getField("Tools_1a_pri").value;
    }else if (getField("Tools_1a_pri").value = "Other") {
    //otherwise do this if other is not selected
    event.target.textColor = color.black
    event.value = getField("Tools_1a_pri").value + " - " + getField("Tools_1a_pri_Other").value;

    You made the classic mistake of using the assignment operator in an if-statement instead of the comparison operator. Change this line:
    } else if (getField("Tools_1a_pri").value = "Other") {
    To this:
    } else if (getField("Tools_1a_pri").value == "Other") {

  • How can I change the caption of a text field using data?

    Hi, I've read that this is possible to do but when you have an xsd file, I'm using a preview xml data file, so there is no way to link them together, any ideas?.
    Thanks!.

    1) In Designer, Tools>Options
    2) Select Data Binding in the left pane and make sure Show Dynamic Properties is checked
    3) Select the field that you want the caption to be driven by XML
    4) In the Object palette under the Field tab you'll notice Caption is now green and underlined, click it.
    5) If your form is bound to a schema you can see the hierachy when you press the button beside the binding entry field or in your case to access the Caption attribute in your XML type> $.textField1.Caption
    Assuming '$' is your root node.
    Kyle

  • How to restrict Date field entered in a text field should be of MM/dd/yyyy

    Hi,
    I have an text field for Date entry,the Date format is MM/dd/yyyy,while entering the value i want to verify wether the values entered are valid or not,like month should n't be more than 12,date value depends on month should not exceed 30,31 or 28,year should not exceed 9999 like,if not possible at the time of entery i want to stop at least before submission.Right now i am traing to use my own model which extends PlainDocument calss,
    as in the fallowing way.But i t could not stop me to enter the wrong values ,Any help would be appreciated.
    mport javax.swing.text.PlainDocument;
    import javax.swing.text.AttributeSet;
    import javax.swing.text.Document;
    import javax.swing.text.BadLocationException;
    import java.awt.Toolkit;
    * Insert the type's description here.
    * Creation date: (11/26/2001 6:22:14 PM)
    * @author: Administrator
    class DateFormatDocument extends javax.swing.text.PlainDocument {
    * DateFormatDocument constructor comment.
    String sInputMask;     DateFormatDocument(){
    //     sInputMask="MM/dd/yyyy";
              sInputMask="09/30/2000";
    try{
    //     insertString(0,"MM/dd/yyyy",null);
         insertString(0,"09/30/2000",null);
         }catch(BadLocationException ex){System.err.println(ex);}
    public void insertString(int offs,String str,AttributeSet a) throws BadLocationException{
         String sText=super.getText(0,getLength());
         if(sText.length()==0)
              super.insertString(offs,str,a);
              return;
         int len=str.length();
         String sText1 = super.getText(0,2);String sText2 = super.getText(3,5);String sText3 = super.getText(6,10);
         int str1=Integer.parseInt(sText1);int str2=Integer.parseInt(sText2);int str3=Integer.parseInt(sText3);
    //     System.out.println("str1:"+str1);
         if(offs<2 && str1<=12){
         if(len<=2){
                   super.remove(offs,len);
                   super.insertString(offs,str,a);
         else if(offs==2){
              super.remove(offs,1);
              super.insertString(offs,"/",a);
         else if(offs<5 && str2<=30){
              if(len<=2){
                   super.remove(offs,len);
                   super.insertString(offs,str,a);
         else if(offs==5)
              super.remove(offs,1);
              super.insertString(offs,"/",a);
         else if(offs<10 && str3<=9999 ){
              if(len<=4){
                   super.remove(offs,len);
                   super.insertString(offs,str,a);
         else{
              System.err.println("Beep!");
              //Toolkit.beep();
    public void remove(int offs,int len) throws BadLocationException{
         System.err.println(offs + " " + len);
         if(offs<2){
              if(len==1){
                   super.remove(offs,len);
                   super.insertString(offs," ",null);
              else if(len==2){
                   super.remove(offs,len);
                   super.insertString(offs," ",null);
         else if(offs==2){
              //do nothing
         else if(offs<5){
              if(len==1){
                   super.remove(offs,len);
                   super.insertString(offs," ",null);
              else if(len==2){
                   super.remove(offs,len);
                   super.insertString(offs," ",null);
         else if(offs<10){
              if(len==1){
                   super.remove(offs,len);
                   super.insertString(offs," ",null);
              else if(len==2){
                   super.remove(offs,len);
                   super.insertString(offs," ",null);
              else if(len==3){
                   super.remove(offs,len);
                   super.insertString(offs," ",null);
              else if(len==4){
                   super.remove(offs,len);
                   super.insertString(offs," ",null);
    }

    <code>
    mport javax.swing.text.PlainDocument;
    import javax.swing.text.AttributeSet;
    import javax.swing.text.Document;
    import javax.swing.text.BadLocationException;
    import java.awt.Toolkit;
    * Insert the type's description here.
    * Creation date: (11/26/2001 6:22:14 PM)
    * @author: Administrator
    class DateFormatDocument extends javax.swing.text.PlainDocument {
    * DateFormatDocument constructor comment.
    String sInputMask; DateFormatDocument(){
    // sInputMask="MM/dd/yyyy";
    sInputMask="09/30/2000";
    try{
    // insertString(0,"MM/dd/yyyy",null);
    insertString(0,"09/30/2000",null);
    }catch(BadLocationException ex){System.err.println(ex);}
    public void insertString(int offs,String str,AttributeSet a) throws BadLocationException{
    String sText=super.getText(0,getLength());
    if(sText.length()==0)
    super.insertString(offs,str,a);
    return;
    int len=str.length();
    String sText1 = super.getText(0,2);String sText2 = super.getText(3,5);String sText3 = super.getText(6,10);
    int str1=Integer.parseInt(sText1);int str2=Integer.parseInt(sText2);int str3=Integer.parseInt(sText3);
    // System.out.println("str1:"+str1);
    if(offs<2 && str1<=12){
    if(len<=2){
    super.remove(offs,len);
    super.insertString(offs,str,a);
    else if(offs==2){
    super.remove(offs,1);
    super.insertString(offs,"/",a);
    else if(offs<5 && str2<=30){
    if(len<=2){
    super.remove(offs,len);
    super.insertString(offs,str,a);
    else if(offs==5)
    super.remove(offs,1);
    super.insertString(offs,"/",a);
    else if(offs<10 && str3<=9999 ){
    if(len<=4){
    super.remove(offs,len);
    super.insertString(offs,str,a);
    else{
    System.err.println("Beep!");
    //Toolkit.beep();
    public void remove(int offs,int len) throws BadLocationException{
    System.err.println(offs + " " + len);
    if(offs<2){
    if(len==1){
    super.remove(offs,len);
    super.insertString(offs," ",null);
    else if(len==2){
    super.remove(offs,len);
    super.insertString(offs," ",null);
    else if(offs==2){
    //do nothing
    else if(offs<5){
    if(len==1){
    super.remove(offs,len);
    super.insertString(offs," ",null);
    else if(len==2){
    super.remove(offs,len);
    super.insertString(offs," ",null);
    else if(offs<10){
    if(len==1){
    super.remove(offs,len);
    super.insertString(offs," ",null);
    else if(len==2){
    super.remove(offs,len);
    super.insertString(offs," ",null);
    else if(len==3){
    super.remove(offs,len);
    super.insertString(offs," ",null);
    else if(len==4){
    super.remove(offs,len);
    super.insertString(offs," ",null);
    </code>

  • Using Javascript to create concatenated string from checkbox fields to one text field

    Hi. I have a PDF form that I am trying to have output to a spreadsheet that matches my database schema. Here is the dilemna:
    * I have a set of checkboxes for available languages (LANGUAGE_ENGLISH, LANGUAGE_SPANISH, etc.) When they export to spreadsheet, the value is TRUE.
    * I need to take values from checked boxes and create a single string in a text field called LANGUAGE_DISPLAY (so my UI will not need to do the concatenation). If LANGUAGE_ENGLISH is TRUE (checked), append "English, " to LANGUAGE_DISPLAY, else append "". Then, if LANGUAGE_SPANISH is TRUE (checked), append "Spanish, " to LANGUAGE_DISPLAY, else append "". And on and on
    In the LANGUAGE_DISPLAY text field properties, I am inserting a Custom Calculation script to try to achieve this, but am not getting any results. I tried teh following even trying to pull the checkboxes default values and string them together:
    box1 = this.getField("LANGUAGE_ENGLISH").value.toSrting();
    box2 = this.getField("LANGUAGE_FARSI").value.toSrting();
    box3 = this.getField("LANGUAGE_MANDARIN").value.toSrting();
    event.value = box1 + ', ' + box2 + ', ' + box3;
    I also played with this to get the desired strings output...but to no avail:
    if ( LANGUAGE_ENGLISH.rawValue == true )
    box1.rawValue = "English, ";
    if ( LANGUAGE_FARSI.rawValue == true )
    box1.rawValue = "Farsi, ";
    if ( LANGUAGE_HEBREW.rawValue == true )
    box1.rawValue = "Hebrew, ";
    event.value = box1 + box2 + box3;
    Then I tried to simplify to see one field output so used this script...still no results:
    event.value = "";
    var f = this.getField("LANGUAGE_ENGLISH");
    if ( f.isBoxChecked() == true) {
    event.value = "English";
    Couple questions:
    1) Am I on the right track with any of these scripts?
    2) Is there something else I need to do to get the script to run before running the Create Spreadsheet with Data Files comman in Acrobat to get my csv file output? Maybe there needs to be some event to get the checkbox values read by that field in order to calculate/create the string.
    Appreciate any help you can provide.

    LiveCycle Designer has shipped with all Acrobat Professional versions since the "Professional" version was introduced with version 6.
    You do not let us know want results you get in the field or the JavaScript console.
    Using:
    box1 = this.getField("LANGUAGE_ENGLISH").value.toString();
    box2 = this.getField("LANGUAGE_FARSI").value.toString();
    box3 = this.getField("LANGUAGE_MANDARIN").value.toString();
    event.value = box1 + ', ' + box2 + ', ' + box3;
    returns "Off, Off, Off", when no box is checked and returns "Yes" for the appropriate box being checked when the default value is used for the creation of the check box. So if one would make the 'Export Value' of the box from the default value of 'Yes" to the appropriate language, one would get a more desirable result. But for each unchecked box the value would appear as "Off". So one needs to change the 'Off' value to a null string. But one is still left with the separator when there is an unchecked option.
    Using the following document level function:
    // Concatenate 3 strings with separators where needed
    function fillin(s1, s2, s3, sep) {
    Purpose: concatenate up to 3 strings with an optional separator
    inputs:
    s1: required input string text or empty string
    s2: required input string text or empty string
    s3: required input string text or empty string
    sep: optional separator sting
    returns:
    sResult concatenated string
    // variable to determine how to concatenate the strings
    var test = 0; // all strings null
    var sResult; // re slut string to return
    // force any number string to a character string for input variables
    s1 = s1.toString();
    s2 = s2.toString();
    s3 = s3.toString();
    if(sep.toString() == undefined) sep = ''; // if sep is undefined force to null
    assign a binary value for each string present
    so the computed value of the strings will indicate which strings are present
    when converted to a binary value
    if (s1 != "") test += 1; // string 1 present add binary value: 001
    if (s2 != "") test += 2; // string 2 present add binary value: 010
    if (s3 != "") test += 4; // string 3 present add binary value: 100
    /* return appropriate string combination based on
    calculated test value as a binary value
    switch (test.toString(2)) {
    case "0": // no non-empty strings passed - binary 0
    sResult = "";
    break;
    case "1": // only string 1 present - binary 1
    sResult = s1;
    break;
    case "10": // only string 2 present - binary 10
    sResult = s2;
    break;
    case "11": // string 1 and 2 present - binary 10 + 1
    sResult = s1 + sep + s2;
    break;
    case "100": // only string 3 present - binary 100
    sResult = s3;
    break;
    case "101": // string 1 and 3 - binary 100 + 001
    sResult = s1 + sep + s3;
    break;
    case "110": // string 2 and 3 - binary 100 + 010
    sResult = s2 + sep + s3;
    break;
    case "111": // all 3 strings - binary 100 + 010 + 001
    sResult = s1 + sep + s2 + sep + s3;
    break;
    default: // any missed combinations
    sResult = "";
    break;
    return sResult;
    And the following cleaned up custom calculation script:
    box1 = this.getField("LANGUAGE_ENGLISH").value;
    box2 = this.getField("LANGUAGE_FARSI").value;
    box3 = this.getField("LANGUAGE_MANDARIN").value;
    if (box1 == 'Off') box1 = '';
    if (box2 == 'Off') box2 = '';
    if (box3 == 'Off') box3 = '';
    event.value = fillin(box1, box2, box3, ', ');
    One will get the list of languages with the optional separator for 2 or more language selections.

  • Date  in text field

    Hi,
    I have a text field :P1_DATE . I want to enter date into it and date can be in any format like 01102012 means 01/10/2012 .if i enter date like 01102012 this should be enter like a date in table as date column accept.when i edit to the record date should be display like 01102012.
    Thanks & Regards
    Vedant

    Dear Friend,
    i have created two region.1st region have some item .using these item i have created invoice header.after creaing invoice header i have added no of line w.r.t invoice header.
    in 1st region i have take text item to enter invoice date it's data type is date type.
    in 2nd region which has created using tabular form here is i ma using one column invoice date.
    i want to display 1st region invoice date into tabular form invoice date column.so i have use item (application or page item) and pass :p1_invoice_date.
    i have use :p1_invoice_date as a text field but data type is date type date format is 'DDMMYY' and i am try to display it into tabular form invoice date column. it's also date type but i have display it as a text field and os i have put :p1_invoice_date into Tabular Form Element item default type (application or page item) .
    But it display me error
    report error:
    ORA-01790: expression must have same datatype as corresponding expressionHow to display 1st region invoice date into tabular form invoice date column.
    How can i do this.
    Thanks
    Edited by: Vedant on Oct 25, 2012 3:16 AM

  • Insert Date Using Text Field

    Hi,
    i have date item ,Can i insert date from text field in dd/mm/yy format.
    My Column for date is DATE type in table.
    How can i ido this with Text field .
    Thanks

    I think you want to have text field for user to input the date? (instead of date picker item type)
    If you are using custom PL/SQL code, it is fine, because you just use to_date(:Px_DATE_ITEM, 'dd/mm/yyyy'); or whatever format you are expecting, in your insert statement.
    If it is a DML process type, I don't think it's possible - apex probably converts the text from the data picker into a date datatype at run time, but not sure it'd do it when its just a text box.
    Ta,
    Trent
    Edited by: trent on Jan 28, 2011 10:57 PM
    I take that back. So long as you have specified the application date format in the globalization attributes, and the format in the text box is the same/valid (otherwise it must be in the format as specified in NLS_DATE_FORMAT), it will insert no trouble in a DML process. http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/bldr.htm#CHDBHCBB

  • How do I set the value of a dynamic row text field

    I have a repeated row form which contains a button and multiple text fields.  There is a text field (Input Data Field) further up with some information I want to place in the table and multiple buttons that I want to read the value of and set to the table.  I apologize there are multiple questions I have and I am using pseudocode to describe it.
    Top form looks like
    InputField
    | ButtonX1 | ButtonY1 | DescriptionX1 (read only Text Field)
    | ButtonXn | ButtonY1 | DescriptionXn
    OutputRow looks like
    | ButtonOutput | OutputField1 | OutputField2 | OutputField3 |
    So I would like it to do
    ButtonX1.click
    OutputTable.OutputRow.addInstance(true)  //this works - everything else I have questions on
    OutputTable.OutputRow.OutputField1.rawValue = DescriptionX1.rawValue
    Question 1
    How do I address the location in each table to set a value
    Question 2
    How do I get the value of the description field in the same table and row as the button
    I would like to say something to the effect of  OutputTable.OutputRow[??].OutputField1.rawValue = this.parent.DescriptionX
    OutputTable.OutputRow.OutputField2 = InputField.rawValue
      Same question as above - how do I specify a dynamic row - is this the proper syntax for getting the value from the input field?
    OutputTable.OutputRow.OutputField3 = this.ButtonLabel
    Question 3
      How can I get the value of the button's label to set in the field
      There should be very many of these buttons and buttons will be added - I would prefer to set the value based on the button's label to make the value easier - not requiring changing the code
    Question 4 - unrelated to those above.
    Is it possible to build the first table
    | ButtonX | ButtonY | Description |
    from an XML File.  I have seen examples of how to build if it is just data, but can the XML be pushed into a form with code to do the above actions?

    Each object in a form must have a unique name. I doing so it is not neccessarily the name but the path or SomExpression associated with that object that must be unique. In your case you have a Table.Row.object configuration. The Row is the part that is repeating so to give each object a unique name an instance number is placed on the repeating part. So objects in the 1st row woudl be Table.Row[0].object...objects in the second row woudl be Table.Row[1].object etc .....You can see this by adding a debug instruction on the Enter event of the description field. Put the code app.alert(this.somExpression) and when you enter the field you will see what the somExpression is. Do this for a few rows and you will see the pattern (don't forget to remove the debug code from the enter event). Now you know what you have to use to address the fields. If no instance is given it is assumed to be 0 ..that is why only the 1st row is being affected.
    So now to answer your questions:
    Question1: The square bracket notation is an issue for javascript (this is the notation for an array) so we have to use a different means of addressing the field to include the instance number. So to address the Description in the 3rd row we woudl use:
    xfa.resolveNode("Table.Row[2].Description").rawValue = "This is my new description";
    Note that the instance number is 2 for the 3rd row because the instance numbers are 0 based.
    Question2. The resolveNode notation allows you to pass a string so you can also concatinate expressions to make the string. If you are writing code on a button in the same row you can get the instance that you are on by using the expression this.parent.index. The "this" portion refers to the current object (the button) and the parent.index gets you th eindex of the Buttons parent. If the button is embedded deeper in a hierarchy then you can continue to add parent indicators until you get back to the node that you want. So rewriting your expression from Q1 it woudl be:
    xfa.resolveNode("Table.Row[" + this.parent.index + "].Description").rawValue = "This is my new description";
    Question3: The buttons caption can be retrieved by using ButtonName.caption.value.text.value
    Question4: When you say build from an XML file. What are you expecting to come from the XML file? The caption that goes on the button? Typically the XML file carries data (not to say that it cannot carry other things). Just need a bit of clarification on this one first.
    Hope that helps
    Paul

  • A string of spaces in middle of data shrinks to just one space in report.

    My report returns data that can contain more than one space in a string. For example, the code value that should be displayed in my report should be "OM   12". Please note that there are three spaces between the "OM" and the "12". (I had to work hard just to get those three spaces to display properly in this note.)
    If I set the "Define As" property on the Column Attributes page to "Standard Report Column", the value displayed in my report is "OM 12". It has only one space between the "OM" and the "12".
    If I set the "Define As" property on the Column Attributes page to "Text Field", the value presented in my report is "OM 12". It has the expected three spaces between the "OM" and the "12".
    But I don't want to present my report on-screen with text fields; I want to use the standard report column. How can I do that, and not lose the multiple spaces, without using the REPLACE() function to replace spaces with "& nbsp"?
    Thanks,
    -Ken

    As discussed in Re: Preserving leading spaces in a report column..
    Thought I'd figured out where I went wrong with the HTML Expression on that occasion and unchecked "Strip HTML" from the Report Properties. Left the &lt;pre&gt; but stripped the spaces? Very odd...

  • How to put cursor in a text field

    hi,
    I have a text field in my jsf page.By default I want to put the cursor into this text field.when a letter is entered into this text field,the data table below this text field must change depending upon the value entered into the text field.After this change also,the cursor must be in the same text field.
    how it is possible.
    when I entered any letter in this field,there is a call to the server.the cursor must be in that textfield after the call.

    Use DOM+JS.
    With element.focus() you can set the focus on the desired element.
    With the 'onkeypress' attribute you can execute some piece of Javascript on every key press, for example submitting the form or doing an AJAX request.

  • Problem with append += text in Text Field

    Hi guys
    i have a problem with append text.
    I have one array which contain some city names, like CityArea=["NAME 1", "NAME2" ...etc];
    Then i have one String and one Text Field.
    Using for loop im getting right results. But when im running script again then im getting  same text again.
    F.ex.
    First time:
    City name: Name 1
    City name: Name 2
    Second time:
    City name: Name 1
    City name: Name 2
    City name: Name 1
    City name: Name 2
    I have tried to make TextField to and String to Null and delete it, but it's appearing again.. :/
    How to avoid this?
    Here is script:
    for (var i1:int = 0; i1 < CityArea.length; i1++)
      _CityAreaString1 += "<P ALIGN='LEFT'><FONT FACE='Verdana' SIZE='32' COLOR='#ffffff'>        "+CityArea[i1]+"</FONT></P>";
      _CityAreaString1 += "<P ALIGN='LEFT'><FONT FACE='Verdana' SIZE='5' COLOR='#ffffff'><BR></FONT></P>";
    _CityAreaTF1 = new TextField();
      _CityAreaTF1.border = true;
      _CityAreaTF1.wordWrap = true;
      _CityAreaTF1.multiline = true;
      _CityAreaTF1.selectable = false;
      _CityAreaTF1.antiAliasType = AntiAliasType.ADVANCED;
      _CityAreaTF1.name = "CityAreaTF1";
      _CityAreaTF1.embedFonts = true;
      _CityAreaTF1.htmlText = _CityAreaString1.toUpperCase();

    I think i found why.
    There was no problem with TextField.
    There was a problem with Array. "CityArea"
    So each time I executed script it added new string in Array. And that is because i got like:
    TextField
    City 1
    City 2
    City 1
    City 2
    Running this script is Ok:
    for (var i1:int = 0; i1 < CityArea.length; i1++)
      _CityAreaString1 += "<P ALIGN='LEFT'><FONT FACE='Verdana' SIZE='32' COLOR='#ffffff'>        "+CityArea[i1]+"</FONT></P>";
      _CityAreaString1 += "<P ALIGN='LEFT'><FONT FACE='Verdana' SIZE='5' COLOR='#ffffff'><BR></FONT></P>";
    But outside of this for loop there is another for loop for adding Cities in CityArray.
    I fixed it by adding empty array at the start of function
    function myFunc():void
    CityArea = [ ]; // Empty array fixed this issue
    // LOOP FOR ADDING SHOPS IN CITY AREA
    for (var j:int = 0; j < _Shops; j++)
    CityArea.push(_Shop);
    // FOR LOOP TO ADDING SHOPS IN STRING
    for (var i1:int = 0; i1 < CityArea.length; i1++)
      _CityAreaString1 += "<P ALIGN='LEFT'><FONT FACE='Verdana' SIZE='32' COLOR='#ffffff'>        "+CityArea[i1]+"</FONT></P>";
      _CityAreaString1 += "<P ALIGN='LEFT'><FONT FACE='Verdana' SIZE='5' COLOR='#ffffff'><BR></FONT></P>";
    Thank you for your help kglad

  • Trying to retrieve content from a text field & use it in a conditional statement

    Hi Everyone,
    I have a form with a text field and a button. The  text field is called "orderNo", and the button is called "genOrder".
    Initially  the text field is empty, and clicking on the button fills the text  field with an appropriate order number.
    I need to check the text  field for data (content) before writing the order number to it, this  way if an order number is already present in the text field it will not  be over written.
    My intention is to use an if / else structure to  perform the testing, however I don't know how to retrieve the content  of the text field (if content is present!).
    If anybody can  suggest how I can go about retrieving the content of the text field and  then use it in an if / else statement it will be greatly appreciated.
    Kind  Regards,
    Davo

    Hi try67,
    Thanks for your assistance. I have posted in this http://www.acrobatusers.com/forums/aucbb/viewtopic.php?pid=70276#p70276 forum asking for further assistance if your able to help more.
    Once again thanks for your time.
    Cheers
    Davo

Maybe you are looking for

  • My Apple ID is not an email address but my iCloud address is.  How do I sync songs?

    I have a iPhone 4S and it's running IOS7.  My Apple ID is not an email address.  I have an email attached to the Apple ID, which is the same as my iCloud ID.  How do I sync music and photos onto my iPhone?

  • CRM 5.0 IC WebClient NOT Compatable with IE7?

    Hi Group I have been trying to run the WebClient from IE7 and it doesnt work.  My landscape is : CRM 5.0 Windows XP Internet Explorer 7 (Release Candidate) I launched the WebClinet link from CRM.  System takes me to the web link.  When I click to cho

  • Bank Account Details to be Mandatory

    Hi, I am a FI consultant and as per client requirement, In Vendor master, " Bank Account details to be made mandatory'. Could u please guide me how to configure ? thanks JK

  • Print comments

    I just installed Reader 8.1.2. I have a document with comments (sticky notes and other) that I cannot print. Help says to go to Preferences and then to Commenting but I have no Commenting in my Preference. Can anyone help?

  • HT4623 Change of Email Address

    Hi , Kindly advise me how to update my email address to my iphone from : ***** to ***** with immediate effect. Tks & Rgds Lisa Chye <E-mail Edited by Host>