For loop for text field

5 check boxes are A, B, C, D, E and 3 text fields are Text1, Text2,  Text3.
If any check box is marked, corresponding value(A,B,C,D or E) will be goes into Text1, Text2 or Text3.
It may be output like this
Text1= A
Text2= E
Text3= C
I have placed a code under checkbox A: mouc up:
var aList = new Array("Text1.0","Text1.1","Text1.2");
for(i = 0; i < aList.length; i++)
if(this.getField("CheckBox4").value = "1" && this.getField(aList[i]).value=="") {
this.getField(aList[i]).value = "A";
I do not get check mark when click on check box and "A" value is going into all text fields- Text1.0=A, Text1.1=A, Text1.2=A.
What should I do?

Yes A, B, C, D, E are check box. When I replace to this.getField("A").value == "1", it does not work. I have placed in the On Focus. I am not sure where is the perfect.
Actuall issue is that there are 5 checkbox name A, B, C,D,E. and 3 text field named Text1.0, Text1.1, Text1.2.
If user check A, textfield automatically filled with "A" (into any one text Field of three text Field)
If user check C, textfield automatically filled with "C" (into any one text Field of three text Field)
If user check D, textfield automatically filled with "D" (into any one text Field of three text Field)
So output may be like this:
Tex1.0= A
Tex1.1= C
Tex1.2= D
again if user uncheck A, corresponding value will be removed automatically. How can I do this?

Similar Messages

  • Is the component uiscrollbar for use with text fields only

    Is the component uiscrollbar for use with text fields only?

    Yeah, it isn't in the library, you need to call it up using code.  It is documented in the help files though, so that should help you get it into use.

  • How to write "for loop" for this block in as3?

    hello all, could you please help me to write a for loop for the following code?
    PS: bx1,bx,2bx3... are movie clips, xfir1,xsay1,xad1,xtip1,xdil1 are dynamic text boxes.
    var xmlLoader9:URLLoader = new URLLoader();
    xmlLoader9.addEventListener(Event.COMPLETE, showXML99);
    xmlLoader9.load(new URLRequest("spops.xml"));
    function showXML99(e:Event):void
    XML.ignoreWhitespace = true;
    var fir:XML = new XML(e.target.data);
    bx1.xfir1.text =  fir.sno[0].aa.text();
    bx1.xsay1.text =  fir.sno[0].bb.text();
    bx1.xad1.text  =  fir.sno[0].cc.text();
    bx1.xtip1.text =  fir.sno[0].dd.text();
    bx1.xdil1.text =  fir.sno[0].ee.text();
    bx2.xfir2.text =  fir.sno[1].aa.text();
    bx2.xsay2.text =  fir.sno[1].bb.text();
    bx2.xad2.text  =  fir.sno[1].cc.text();
    bx2.xtip2.text =  fir.sno[1].dd.text();
    bx2.xdil2.text =  fir.sno[1].ee.text();
    bx3.xfir3.text =  fir.sno[2].aa.text();
    bx3.xsay3.text =  fir.sno[2].b.text();
    bx3.xad3.text  =  fir.sno[2].cc.text();
    bx3.xtip3.text =  fir.sno[2].dd.text();
    bx3.xdil3.text =  fir.sno[2].ee.text();

    And for the second, try this:
    var stThings:Array = [st1, st2, st3];
    var bxThings:Array = [bx1, bx2, bx3]
    var globalURLRequest:URLRequest = new URLRequest ("tgs.aspx?st=1003")
    for each(var stWhat in stThings)
    stWhat.addEventListener(MouseEvent.CLICK, clickHandler);
    stWhat.addEventListener(MouseEvent.MOUSE_OVER, overHandler);
    stWhat.addEventListener(MouseEvent.MOUSE_OUT , outHandler);
    function clickHandler(event:MouseEvent):void
    navigateToURL(globalURLRequest,"_blank")
    function overHandler(event:MouseEvent):void
    var index:int = stThings.indexOf(event.target);
    bxThings[index].visible = true;
    function outHandler(event:MouseEvent):void
    var index:int = stThings.indexOf(event.target);
    bxThings[index].visible = false;
    It's difficult to interpret your code--you may want to take some time to write more readable code.
    For example, what is an 'st1'? Is it a button? What does it do?
    Consider if it were a button made to load Story 1... a much more readable name would be btnStory1.
    Also, there really is no advantage to identifying events as eeeeevt, zeeeevt and changing those.
    Pick a convention and stick to it. I prefer 'event', others use 'e' or 'evt'.
    And try to use function names that mean something, "function a1003mo(zeeevt2:MouseEvent):void {" is much more easily read as "function outHandler(event:MouseEvent):void"
    I'd be interested to see what it is you're making, I believe there are some real opportunities to optimize it.
    HTH
    -Ted

  • How to create a group/list of check box variables for display in text field, in appended format

    I need to identify a series of single-response checkbox variables and display the ones selected (as a group) in a text field in an appended (comma, space) format. Last week, you provided a great little script for a similar need using List Box (multiple response) variables. This time I need to know how to formally identify the checkbox variables and, I presume, use a similar script to display the results in a comma, space format.
    You've been of great help.
    Thanks

    Here's the script adapted to this situation. It assumes there are ten check boxes named cb1, cb1, cb2, ...cb10.
    // Custom Calculate script for text field
    (function () {
        // Initialize the string
        var v, s = "";
        // Loop through the check boxes to build up a string
        for (var i = 1; i < 11; i++) {
            // Get the value of the current check box
            v = getField("cb" + i).value;
            if (v !== "Off") {
                if (s) s += ", ";  // Add a comma and a space if needed
                s += v;  // Add the selected value
        // Set this field value to the string
        event.value = s;
    You'll have to change the field name and starting/ending numbers to match your form.

  • How do I get multiple lines to print for a blank text field so that it can be filled in by hand?

    I have to design forms that are fillable electronically and by hand.  The problem that I am running in to is supplying multiple lines that will print for people that are hand filling the form.  I have tried to add an image of lines behind the text field, but these would get in the way when the form was filled in electronically.
    I am using LiveCycle Designer ES2 v. 9.0 on a Windows machine.
    Thanks.

    Ok.
    Take a textfield
    Go to Object | Allow multiple lines
    Go to Layout | Height | activate "Expand to fit"
    Go to the initialize-Event or readyform (You have to change the _ for your textfield)     this.rawValue = "___________\n___________\n___________";
    Go to the enter-Event   this.rawValue = null;
    Go to the exit-Event  
              if(this.rawValue == null)
                    this.rawValue = "___________\n___________\n___________";
              }else{}
    With this solution you can simulate the same as pattern see above.
    I hope this is helpfull for you,
    Mandy

  • Setting default field values for multi-line text fields in lists?

    For the multiple lines of text field in a list, I'm using SharePoint Designer 2013 to set a default
    value for the field, but I need that default value to include rich text formatting (the default value includes a formatted table). Is this possible without having to delve into JavaScript? And if so, how?

    Yes, we can :)
    You can do it with powershell
    $web = get-spweb <yourweb>
    $list = $web.lists["<yourList>"]
    $field = $list.fields["<yourField>"]
    $field.DefaultValue = "place your html code here"
    $field.update()
    hope that helps

  • Workarounds for searching a text field in SQL Server 2000

    Hi,
    I have a need to search within a text field in SQL Server 2000. In the
    limitations section it notes that this is not possible. Is there a
    recommended workaround for this in terms of performance? I have no way
    of knowing the length of the text field in advance, and this could be
    fairly large. Also, the number of objects that could contain the text
    can be fairly large as well.
    Thanks in advance,
    Khamsouk

    Note that some databases (or Oracle, at least) provide alternatives to
    LIKE '%foo%' that are more efficient for large text blocks, given that
    you have the appropriate indexing plugins etc. etc.
    To use one of those types of search operators, you'd have to put
    together a custom extension.
    -Fred
    Fred Lucas <[email protected]> wrote:
    I'm assuming that when you say 'a text field', you're referring to a
    SQLServer TEXT field, as opposed to just any old field that contains
    text.
    Like I said, I'm by no means a SQLServer pro, but I just ran:
    SELECT CLOBSTRINGX
    FROM LOCATORTESTOBJECTX
    WHERE CLOBSTRINGX LIKE '%o%';
    and got back my test row with 'foo' in the CLOBSTRINGX column.
    CLOBSTRINGX is a TEXT column.
    So, it is possible that our stringContains() extension will just work.
    But then again, maybe not. I'm guessing it will.
    Give it a try and, if you get an error, post the generated SQL (turn on
    SQL output by setting the com.solarmetric.kodo.Logger property to
    'stdout') and the error that you get. Also, try executing the generated
    SQL directly against your data store to see if it works there.
    -Fred
    Khamsouk Souvanlasy <[email protected]> wrote:
    Basically I just want to use kodo's extended stringContains syntax on a
    text field. Is this possible?
    Khamsouk
    Fred Lucas wrote:
    I'm not intimitely familiar with SQLServer's text searching
    capabilities, but I'm confident that you could create a query extension
    that would do what you need it to do.
    What is the SQL that you are trying to generate?
    -Fred
    Khamsouk Souvanlasy <[email protected]> wrote:
    Hi,
    I have a need to search within a text field in SQL Server 2000. In the
    limitations section it notes that this is not possible. Is there a
    recommended workaround for this in terms of performance? I have no way
    of knowing the length of the text field in advance, and this could be
    fairly large. Also, the number of objects that could contain the text
    can be fairly large as well.
    Thanks in advance,
    Khamsouk
    Fred Lucas
    SolarMetric Inc.
    202-595-2064 x1122
    http://www.solarmetric.com

  • Substitution rule for gl account text field in line item.

    Hi
    We have intercompany postings made for a no.range of GL accounts ex: 1000-1999.When ever this accounts are getting posted ,i.e the accounting doc,need to make substitution such that what ever the description is given in the offsetting entry(ex: vendor 10000 - Material vendor ) for this GL in the accounting doc should come in the text field .
    I want the description of the vendor account to be inb the text field in the line item of the gl account.Is it possible thru substitution.If so how.
    Please advise.

    Thanks for all your replies.
    I Want the field BSEG- KOBEZ i.e description field in the accounting doc of the offsetting entry to be replaced in the GL account  text field.
    Ex :
    PK    Account        Description                  Amount           Text
    31    100000         Furniture  Vendor             50             Sales
    40    1999             Inter Compy                     50             Furniture Vendor
    I want the description of offsetting entry vendor description i.e Furniture vendor (field BSEG-KOBEZ) to be replaced in GL line item text BSEG-SGTXT.
    I cant find the field BSEG- KOBEZ while i search in the substituion to replace in Text field.
    How do i write in substitution to say that the offsetting entry description should be in text field of GL account.

  • How to reference SQL column value for  page item text field

    greetings,
    I created a simple report based on sql query. the query is select employeeid,salary from emp_tbl. under the report column i see employeeid and salary. I created a page item text field with the source type pl/sql function body. inside this source is simple block.
    begin
    if salary < 10000 then
    return (1);
    else
    return (2);
    end if;
    end;
    from the error i take it that it doesn't understand salary. I have tried bind variable (:salary) , hash marks (#salary#), ampersand (&salary.) but nothing works. Is this even possible?
    thank you,
    mon

    Hi Mon,
    I think you will find that anything you do in Forms, you can achieve in Apex, but you may have to think a little differently. Finding direct equivalents in both environments may not be easy or even possible in some circumstances, but with a little knowledge and thought an equivalent overall business flow can be achieved that is just as efficient.
    For example, in Forms where you have a multi row block based on a table, if you need to add any derived fields then you will add these at the block level. I can see that this is what you are trying to achieve in Apex.
    In Apex this will be more easily achieved by specifying the derived fields as part of the query for the region, and if the derivation of the fields is complex you can use user defined functions. If you require page type items to be displayed such as text boxes, LOV's, radiogroups, datepickers etc then these can be embedded in the query with the use of the Apex API, see the APEX_ITEM supplied package.
    I know this is still very high level, but I hope it helps you on your way in your journey with Apex.
    Regards
    Andre

  • How do I use an enhanced for loop / for each on my ViewObjectImpl ?

    Guys and Gals,
    With all of my newly acquired Java knowledge in tow, I spent this weekend cleaning up all of my code, dealing mainly with for loops. I converted them from a huge mess to a for each type loop using language such as ...
        RowSet priceUpdateRows = (RowSet)((PriceUpdatesViewRowImpl) priceUpdate).getPriceUpdateRowsView();
        for (Row priceUpdateRow: priceUpdateRows)
        { // do operations on row... which makes perfect sense to me. For each Row in the RowSet, do something. It doesn't, however, makes sense to the compiler. It pouts and gives me a "foreach not applicable to expression type" error. So I read up on iterators and such, messed with code examples, and still can't get the RowSet to iterate with the above code. Could I make RowSet implement Iterable? How would I do that? I tried to create a class called RowSetExt which extended RowSet and implemented Iterable, but then I got a class cast exception.
    I know I could implement something like the following or a while(hasNext()) but they're really not what I'm looking for.
    ViewObject vo = … < Get ViewObject > …
    RowSetIterator rsi = vo.createRowSetIterator("rowsRSI");
    while (rsi.hasNext())
         Row row = rsi.next();
         row.setAttribute("YourAttribute",your_value);
         rsi.closeRowSetIterator();How do I make the for(Row row : <RowSet>) example work? Or could someone point me in a direction?
    Will

    One thing I tried was to make a framework extension class for my ViewObjectImpls
    public class PcsViewObjectImpl
      extends ViewObjectImpl
      implements Iterable<Row>
      Set<Row> set = new HashSet<Row>();
      public Iterator<Row> getRows()
        return set.iterator();
      public Iterator<Row> iterator()
        return getRows();
    }AppModuleImpl
        PriceUpdateRowsViewRowImpl priceUpdateRows = (PriceUpdateRowsViewRowImpl)((PriceUpdatesViewRowImpl) priceUpdate).getPriceUpdateRowsView();
        for (Row priceUpdateRow: priceUpdateRows)
        {However, this gives me a class cast exception at runtime. But I would think some kind of extension class would be the way to go ... ?

  • How to index a array to give it to for loop for one value at a time sequence to be ensured

    I need to give one number from a array at a time to a for loop. means the for loop have to execute one number at a time  from a array of numbers. How to do it

    Ranjeet,
    Ranjeet_Singh wrote:
    But question is same only. is in it ?
    With all due respect, NO.
    Please make sure you know what you are talking about before blatantly countering someone else's comment. Can you prove that your vi and TiTou's snippet will do the same thing?
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • Parallel for-loop for FPGA

    The new parallel for-loop feature for multi-core CPU is great, but does it support FPGA as well?  Since everything runs in parallel onthe FPGA, it would seem natural to do parrallel for-loop there.  I'm doing some time-critical vector multiplications that can be done quickly with parralel process, and I know I can MANUALLY put several parallel loops to speedup the process.  However as the length of the vector change, so would the number of parralel loops.  I'm wondering if there is a automatic process that does this for me.

    Will this help?

  • The long text for purchase order text  field in mm03

    Hi,
         Please provide me long text for purchase order field.in mm03 the view purchase order text having the long text for purchase order.this is enter when ever your creating the material.but we have table and field name for that and also how to handle this long text.please provide me urgently.
    Thanks & Regards,
    Radhakrishna.

    Hi,
    A sample code for ur requirement.
    TABLES : ekko,   "Purchasing Document Header
             ekpo,   "Purchasing Document Item
             thead.  "SAPscript: Text Header
    DATA: t_theads LIKE stxh  OCCURS 0 WITH HEADER LINE.
    DATA: t_tlines LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA: v_ebeln_ebelp(15) TYPE c.
    TYPES: BEGIN OF t_download,
           ebeln LIKE ekko-ebeln,
           ebelp LIKE ekpo-ebelp,
           tdobject LIKE stxh-tdobject,
           tdid LIKE stxh-tdid,
           tdspras LIKE stxh-tdspras,
           count(4) TYPE c,
           tdformat LIKE tline-tdformat,
           tdline LIKE tline-tdline,
         END OF t_download.
    TYPES: BEGIN OF t_header,
          line1(20) TYPE c,
          line2(20) TYPE c,
          line3(20) TYPE c,
          line4(10) TYPE c,
          line5(10) TYPE c,
          line6(10) TYPE c,
          line7(10) TYPE c,
          line8(10) TYPE c,
          END OF t_header.
    DATA: g_filename TYPE string.
    DATA: gt_header TYPE STANDARD TABLE OF t_header.
    DATA: gs_header TYPE t_header.
    DATA: gt_download TYPE STANDARD TABLE OF t_download.
    DATA: gs_download TYPE t_download,
        gt_tlines   LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA: v_subrc TYPE subrc.
    DATA: v_nb_lines TYPE i.
    DATA: v_ok TYPE i.
    DATA: v_ko TYPE i.
    DATA: v_ow TYPE i.
    DATA:  p_fname TYPE string.
    DATA: g_append.
                              SELECTION SCREEN                          *
    SELECT-OPTIONS : s_ebeln  FOR ekko-ebeln.
    PARAMETERS:
       p_filedn(132) TYPE c OBLIGATORY,
       p_file(132) TYPE c OBLIGATORY.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filedn.
      PERFORM file_f4_get CHANGING p_filedn.
    START-OF-SELECTION.
    *Select all the purchase order corresponding to select criteria
      CLEAR t_theads. REFRESH t_theads.
      SELECT *
      FROM ekko
      WHERE ebeln IN s_ebeln.
    *Select all the text for P.O. header
        SELECT * FROM stxh
              APPENDING TABLE t_theads
              WHERE tdobject = 'EKKO'
              AND tdname      = ekko-ebeln.
    *Select Item of each P.O.
        SELECT *
        FROM ekpo
        WHERE ebeln = ekko-ebeln.
          CONCATENATE ekpo-ebeln ekpo-ebelp
          INTO v_ebeln_ebelp.
    *Select the text for P.O. item.
          SELECT * FROM stxh
                APPENDING TABLE t_theads
                WHERE tdobject = 'EKPO'
                  AND tdname   = v_ebeln_ebelp.
        ENDSELECT.              "select ekpo
      ENDSELECT.             "select ekko
      DESCRIBE TABLE t_theads LINES v_nb_lines.
      LOOP AT t_theads.
    Read the text from pool
        CLEAR thead.
        REFRESH t_tlines.
        CALL FUNCTION 'READ_TEXT'                               "#EC *
             EXPORTING
                  id                      = t_theads-tdid
                  language                = t_theads-tdspras
                  name                    = t_theads-tdname
                  object                  = t_theads-tdobject
             IMPORTING
                  header                  = thead
             TABLES
                  lines                   = t_tlines
             EXCEPTIONS
                  id                      = 1
                  language                = 2
                  name                    = 3
                  not_found               = 4
                  object                  = 5
                  reference_check         = 6
                  wrong_access_to_archive = 7
                  OTHERS                  = 8.
        MOVE-CORRESPONDING thead TO gs_download.
        gs_download-ebeln = thead-tdname+0(10).
        IF thead-tdobject = 'EKPO'.
          gs_download-ebelp = thead-tdname+10(5).
        ENDIF.
        gs_download-count = 0.
        LOOP AT gt_tlines.
          gs_download-tdformat = gt_tlines-tdformat.
          gs_download-tdline = gt_tlines-tdline.
          gs_download-count = gs_download-count + 1.
          APPEND gs_download TO gt_download.
        ENDLOOP.
        CLEAR gs_download.
      ENDLOOP.
    END-OF-SELECTION.
    Hope this helps.
    please reward points if  useful.
    Regards
    rose

  • Run a for loop for specified time period

    Hello to everyone,
    I am trying to create a data acquisition system for a NI 9162 board. I need to
    acquire a certain quantity of data (for example 10 minutes) each half an hour
    for example and repeat this process a lot of times. I am trying to do this with
    a loop execution but this is not working well. The first data acquired  is
    ok but in the rest there are a lot of problems. The times are not being
    respected and the board is not acquiring anything. Does anyone can help me? I
    am attaching the VI that I am using.
    Thanks,
    Attachments:
    Consulta.vi ‏80 KB

    You can either use an System.Timer event OR a timed loop in the Structures pallete.
    Use the NI Example finder and search for timer to get an example of timed loops.
    Or use a .NET constructor, go to System in the drop down, the select System timer for the timer control, register the event callback.
    Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
    using LV 2010 SP 1, Windows 7
    Attachments:
    Timer.vi ‏11 KB

  • How to run a for loop for an array value

    Hello
    I got an array of value(for ex 1,4,6,10),depending on the array value i need to run the porgram in the case structure(as the examaple values given earlier case1,4,6,10)the program needs to run once for all the values in the array(i mean the program needs to run 1st for case1,then case4 and so on)
    Any suggestions pls.

    Can you describe exactly what you want to do?  In most cases, you do not need a loop to deal with arrays.  Many functions are polymorphic and will deal with arrays directly. 
    R

Maybe you are looking for

  • Adhoc Query Report

    Hi SAPients.. I have a n issue in Adhoc Query In Adhoc query report ( PQAH ), X person having authorization to see the folder Additional Personal Data (IT0077), but Y person can access the Adoc but could not see the folder (IT0077). Please guide what

  • Someone Remote Accessed my MacBook Pro. What do I do now?

    About a month ago I was watching a movie on my laptop whilst in the bath (laptop on a chair by the side of the bath, obviously). Then I paused the full-screen playback, so I could rinse my hair (too much detail, you say), I immediately noticed the cu

  • Database Link with 11g R2 and Teradata

    Trying to create a database link from Oracle to a Teradata database using Oracle Database Gateway, and I'm receiving ORA-12154: TNS:could not resolve the connect identifier specified... I'm pretty new at this and my head is spinning a bit.  After fol

  • Problem with document going back into credit check

    Hi Gurus, I have a scenario where the document that is released from credit check is coming back into credit check before the stipulated time. Further information: 1. OVA8 for the particular credit control area and risk category has the settings as f

  • How to configure listener while upgrade to RAC 11.2.0.2?

    I have 11.2.0.1 and preparing for upgrade to 11.2.0.2. While upgrading the single node we have to set the new oracle_home then configure listener for new home then upgrade the db. How to follow the same steps in case of RAC. The listeners are running