Reset Text Items in For Loop

Hi everybody,
OS: Windows XP SP2
Forms: 10.1.2.0.2
Browser: FireFox 2.0.0.5
I have in my form (100 text items) and the following code:
DECLARE
i NUMBER := 0;
BEGIN
FOR i IN 1 .. 100 LOOP
SET_ITEM_PROPERTY( 'txt_segment_' || i , VISIBLE , PROPERTY_FALSE );
SET_ITEM_PROPERTY( 'txt_segment_' || i , ENABLED , PROPERTY_FALSE );
END LOOP;
END;
I want to reset all text items in my for loop i.e.
txt_segment_1 = '';
txt_segment_2 = '';
txt_segment_100 = '';
But I want to do it in the for loop, how ??
Please help, and best regards ('',)

Kevin .. you are GENIUS ;)
It worked with NAVIGABLE set property.
I have another question since you're around :)~
I'm trying to concatenate all text items in a for loop into a varable x with the following code:
FOR i IN 1 .. 100 LOOP
COPY( x || 'txt_segment_' || i , x );
END LOOP;
but I end up with the following error:
FRM-40738: Argument 2 to builtin COPY cannot be null.
Its equivalent to the following code:
x := x || txt_segment_1;
x := x || txt_segment_2;
x := x || txt_segment_100;
OR equivalent to:
x := txt_segment_1 || txt_segment_2 || .. || txt_segment_100;

Similar Messages

  • Text item cateory for variant config item

    Hi,
    I'm trying to create a text type item category for a variant config item. I tried to use the std TEXT but it doesn't work possibly coz its a variant config item. The item category grp assigned to this item is 0002. I used ZVAC and removed relevant for delivery n billing as I don't wnt this item to b relevant for either or even appear in either of those. But it still doesn't work. When i create the order and enter the item and hit enter, it takes the default item category grp for that order type (TEXT item category is added in manual item category field) and it grays out. I cannot make any changes to this item category although the order has not even been saved yet.
    Has anyone done any such config or know anything abt it? Pls help.

    0002 is basically for single-level configuration. So right there you are probably getting the issue, as well as using the standard TEXT item categoty..
    0004 is for multi-level config, which is, I guess, what you are looking for.
    But you will also want some other "Z__" item category defined for what you are looking for - don't use TEXT. I know, then it's a pain 'cuz you have to do all the copy control, but you really need to.
    Now with your new "Z__" make it Non-pricing-delivery-rqmts-picking-delivery-billing-etc.
    It's lots of fun, isn't it !

  • BAPI for reset cleared items ie for transaction FBRA

    Hi all,
    Is ther any BAPI for trasaction FBRA ?
    Ther are 2 BAPIS REVERSE_CLEARING or FM_REVERSE_CLEARING
    but are not released .
    Kindly do the needful.

    Hi ,
    You should use FM CALL_FBRA AND CALL_FB08 function modules one by one.
    CALL_FBRA is for clearing items
    CALL_FB08 is for Reversing items
    Regards,
    Imran

  • Tabular form for text item -save changes not working

    Hello,
    I have created a tabular form in which I have made one of the columns say deptno as an Text item using APEX_TEXT.ITEM package.
    In my tabular form by default I have created it with all the buttons like with ADD ROW,CANCEL,SUBMIT(SAVE).
    My problem is that whenever I make any changes to the text item for deptno column, and then try to save the changes by clicking SUBMIT - the changes are not taking place to the deptno text item column.
    Can anyone help me out with this.
    thanks.

    hi Denes Kubicek.
    the thing is that i have made it as text item because I have concatenated it with an popup image when clicked on it opens up an new popup window
    which is a report containing dept table details. So if need to make a change to the deptno text item column in the parent window for a particular record
    then i do through the popup window (like by selecting the deptno from the popup window - so that this value is returned to my parent window deptno text item column)
    for this reason i have made the column deptno as an text item.
    can you help me out with this issue.
    thanks.

  • Change the color of text item after execute query

    Dear friends
    I would like to know how can I make a tabular form like grid and chang the color of text item when (for exp in emp table) the value of sal column between 2000$ and 4000$.
    I used the SE_IEM_PROPERTY command but it change all of the text items of sal column.
    please help me
    thanks a lot

    Highlight the Existing Record in Forms
    (Compatible with 4.x, 5.x, 6.x & 9i)
    Step 1: Create a New Visual Attribute(BLUE_VA) (Color of highlighted record)
              Font – Arial
              Size – 8
              Style – Plain
              Font width - Normal
              Font Weight - Bold
              Foreground Color – Black
              Background Color – Blue
              Fill Pattern – Transparent
    Step 2: Create another Visual Attribute (WHITE_VA) (Default Color of the record)
              Font – Arial
              Size – 8
              Style – Plain
              Font width - Normal
              Font Weight - Bold
    Foreground Color – Black
              Background Color – White
              Fill Pattern – Transparent
    Step 3: Add Following code to Block-level Trigger WHEN-NEW-RECORD- INSTANCE, POST-BLOCK
    (Add to the block, which has these records)
    -- Following code will only highlight an item
    DISPLAY_ITEM(<block_name>.<item_name>,'BLUE_VA');
    -- Following code will highlight complete Record (ref: DISPLAY_ITEM example)
    DECLARE
              cur_itm VARCHAR2(80);
              cur_block VARCHAR2(80) := :System.Cursor_Block;
    BEGIN
    cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
    WHILE ( cur_itm IS NOT NULL ) LOOP
    cur_itm := cur_block||'.'||cur_itm;
    Display_Item( cur_itm, 'BLUE_VA');
    cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
    END LOOP;
    END;
    Step 4: Add Following code to Block-level Trigger PRE-RECORD, PRE-BLOCK
    (Add to the block, which has these records)
    -- Following code will only highlight an item
    DISPLAY_ITEM(<block_name>.<item_name>,'WHITE_VA');
    -- Following code will highlight complete Record (ref: DISPLAY_ITEM example)
    DECLARE
              cur_itm VARCHAR2(80);
              cur_block VARCHAR2(80) := :System.Cursor_Block;
    BEGIN
    cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
    WHILE ( cur_itm IS NOT NULL ) LOOP
    cur_itm := cur_block||'.'||cur_itm;
    Display_Item( cur_itm, 'WHITE_VA');
    cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
    END LOOP;
    END;
    I am using the above code in one of my forms and I so far haven't seen any problem

  • Display number 1 to 10 in a text item or display item

    I want to know how do i display the number of 1 to 10 in a text item or a display item.
    What triggers should I use? What are the differences for each smarttriggers?
    What are the differences between a text item and a display item?
    Thank you in advance.

    Trigger
    PRE-TEXT-ITEM
    ============
    BEGIN
         FOR i IN 1..10
         LOOP
              dbms_output.put_line(i);
              END LOOP;
    END;
    I have a text item on my form. How can I display the output on to them when I have compiled and run the form?

  • Display Hint Text in Oracle Forms 6i at Text Item

    Dear all seniors
    I want to show Hint text at Text Item in Oracle Forms 6i.
    when my cursor Focus goes at that item. I mean when I go with Tab key or Enter button then it show display text.
    even though my mouse is not on that item.
    please how it would be possible
    thanks.
    G.Y

    Please create a display_item(for eg. Disp_Mess) just below the text field (For eg:-MyField) where you want to show hint. And then assighn Hint text to "DISP_MESS" in NEW-FORM-INSTANCE or at Initial value. Then create a PRE-TEXT-ITEM and POST-TEXT-ITEM trigger for MyField.
    -- PRE-TEXT-ITEM trigger write following code.
    SET_ITEM_PROPERTY('DISP_MESS',VISIBLE,PROPERTY_TRUE);
    --POST-TEXT-ITEM write following code.
    SET_ITEM_PROPERTY('DISP_MESS',VISIBLE,PROPERTY_FALSE);
    It will work for you.
    Regards
    Ahamed Rafeeque Cherkala

  • For loop interrupt

    Attached please find my test vi(i use while loop instead of for loop,cause my labview version is 8.2, which don't have interrupt condition item in for loop. )
    i wanted to stop the vi while the vi was running, such as i pressed the stop button when i was 4, the vi wouldn't stop immediately,it first finished the current cycle, gave me the 5th random number and time delay, then it ran the next cycle and gave me the 6th random number and stop, so i had to wait some time(time delay+the 6 cycle duration)since i pressed the button, now i hope someone can give me some advice that don't let the next cycle happen and stop the vi immediately.
    Solved!
    Go to Solution.
    Attachments:
    test.vi ‏13 KB

    413332985 wrote:
    to altenbach:
    thanks for your help,  it's very helpful. But i still have a small problem, your example vi don't creat the first random number immediately, it waits 500 million seconds. If i change the number "500" to a much bigger number, i have to wait a longer time to get the first number, so how can i get the first number immediately while others wait?
    No, that's not correct. The initial timeout is 0, so it generates the first random number immediately. Try it once more.
    Here's a modification that shows it more clearly. Once the program is started, you need to press another button to start with the random numbers. As you see, the first one appears immediately.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    testtimeout2.vi ‏16 KB

  • Clearing Text Item Field

    When navigating back and forth between forms (i.e. using “Back” and “Continue” Buttons) if I’ve entered something in one of the fields, any value that I’ve entered, regardless of whether or not it’s been saved to the database will still be there when I go back into it the second time (Text Item).
    For example, if I enter John Doe into the "Name" field and press "Back" before submitting, when I return to the "Personal Information" Form, "John Doe" will be already populated in the "Name" field.
    How do I insure the field is always blank? Is there a SET_ITEM_PROPERTY I’ve missed in the trigger?

    don't know exactly what you mean with "back" and "continue"-buttons, but if you navigate to some block shown on a different canvas and you want to clear the data there are several options:
    GO_BLOCK('MYBLOCK');
    CLEAR_BLOCK(NO_VALIDATE);clears the whole block without asking for saving.
    GO_BLOCK('MYBLOCK');
    CLEAR_RECORD;clears the current record and
    :BLOCK.ITEM:=NULL;justs clears the value of one item.

  • Text Item Category

    Hi ..
    I need to ask you ppl .. I have this request to create a text item category for contract . ( WK1 ) 
    Which item cat should I use  ?  TATX or G2TX or it doesnt matter ?
    The contract later will then be used to be brought over to debit memo request .
    Hope you can show me some light .
    Thanks
    Moon

    I 'm quite sure that you need to use TATX as G2TX is used for returns. Check the item category setup in spro trx VOV7!
    I hope this helps.
    Gerard

  • Including delivery text item (object VBBP) in a Smartform

    Hi,
    I want to include 'Delivery Text' ( Object VBBP, Text ID 0004) into my Delivery smartform.
    I have created a Include Text Text field but what is the Text Name of this delivery text item.
    tnks for any help

    it is delivery number + item number
    delivery number should be 10 digits ,0000045677000010

  • Resetting items in my loop

    So i have my items that I bring onto stage with my loop function with dynamic text fields within the loop. If I want to clear these items using a reset button on the stage how can I do this. From my code below when I press the reset button I receive: TypeError: Error #1010: A term is undefined and has no properties.
    So a little snippet of my code just to give an idea what I use to bring items to stage and what Im trying to use to reset
    //Brings items to the stage
    for (var i:Number=0; i<imageArray.length; i++)
    var item:NewItem = new NewItem();
    item.name = "item" + i;
    MainItem.addChild(item);
    item.rank_text.text = "1";
    // to reset items i tried the below
    reset_btn.addEventListener(MouseEvent.CLICK, resetFields);
    function resetFields(e:MouseEvent):void
    this.pos = 1;
    for(var i:Number=0; i<imageArray.length; i++) {
    var item:NewItem = new NewItem();
    item.name = "item" + i;
    MainItem.item.rank_text.text = "";
    What am I doing wrong?
    Thanks
    Mark

    I know the first part works as it displays how it should. Basically my first loop is set as default: item.rank_text.text = "". Then further on in my script I assign numbers to each of my items i.e.
    //inside of my for loop
    item.button.addEventListener(MouseEvent.CLICK, controlClick);
    //outside my for loop
    function controlClick(e:MouseEvent):void
    (e.target).parent.gotoAndStop(2);
    if (!(e.target).parent.ranked)
    (e.target).parent.rank_text.text = String(this.pos);
    (e.target).parent.rank_text.alpha = 0.8;
    this.pos+=1;
    (e.target).parent.ranked = true;
    gives me an increased number when I click on them:
    So now what im trying to do is reset this to default before anything is clicked. My reset_btn code should just just tell my loop to empty rank_text. SO something below is not working correctly when trying to go inside this item and set the rank_text.text = "";
    Hope this clears things up
    Mark

  • Pricing For Text Item in Sales Order

    Hi ,
    How to give price for text item in sales order.
    With regards.
    Afzal

    Hi Afzal,
    consider to create a single service material as a generic one, type DIEN, with basic data and sales org views, with  item category group LEIS (it will determine item category TAX in sales order). Material description could be "Don't forget to change me!" so in sales order user remembers to changes the description according to the especific sales order requirements.
    Regards,
    JM

  • How to get only the filename and extension for a text item?

    Suppose there is a non-database text item called :myfilename
    :myfilename := 'C:\SomeFolder\SomePath\myfile.doc';
    I would like to get the file name only without the full path,
    i.e. myfile.doc
    and the file extension, i.e. 'doc', 'bat', 'java', 'xhtml' etc., i.e. the last few chars from the right to the period.
    Any help is welcome.

    Thanks for the hints.
    I defined the non-database Text Item called FULLFILENAME and another two text items called FILE_NAME, FILE_EXTENSION. The following can extract the file extension,
    select substr(:FULLFILENAME,instr(:FULLFILENAME,'.')+1) into :FILE_EXTENSION from dual;
    e.g.
    :FULLFILENAME := 'C:\MyFolder\AnotherFolder\file.doc';
    FILE_EXTENSION becomes 'doc'
    but I would also like to extract only the filename without path into FILE_NAME,
    i.e. file.doc
    Please give more hints. Thanks.

  • Remove text field from Array via for loop

    Hi,
    i have a problem to remove text fields added via for loop.
    That im doing is, via for loop im dynamically creating menu with 10 buttons.
    Each button contain, dynamically created, background (shape) and text field.
    And everything is fine.
    But when im try to remove text fields then i got this error:
    - Im using button to remove text fields - lang_btn.addEventListener(MouseEvent.CLICK, clickHandler);
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
              at flash.display::DisplayObjectContainer/removeChild()
              at Loading_Img_fla::MainTimeline/xmlLoaded()
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flash.net::URLLoader/onComplete()
    In the script bellow marked with red is what should remove text fields from an Array, instead giving me error.
    Here is my script
    // Create for loop
    for (var i:int = 0; i < 10; i++)
              for each (xml in listItems)
                        if (i == xml.attribute("Id"))
                                  // Add MovieClip to stage to hold the data
                                  addChild(lmHolder);
                                  lmHolder.x = 0;
                                  lmHolder.y = 0;
                                  // Create new MovieClip to hold buttons
                                  lmButtonsMCArray[i] = new MovieClip();
                                  lmButtonsMCArray[i].buttonMode = true;
                                  lmButtonsMCArray[i].mouseChildren = false;
                                  lmButtonsMCArray[i].x = 20;
                                  lmButtonsMCArray[i].y = 20 + btCount * buttonSpace;
                                  // Add each button MovieClip to lmHolder MovieClip
                                  lmHolder.addChild(lmButtonsMCArray[i]);
                                  // Create Background to buttons
                                  lmButtonsArray[i] = new Shape();
                                  lmButtonsArray[i].graphics.beginFill(lmBgColor0, 1);
                                  lmButtonsArray[i].graphics.drawRect(0, 0, 230, 85);
                                  lmButtonsArray[i].x = 0;
                                  lmButtonsArray[i].y = 0;
                                  // <<-- Add Background shape to the buttons MovieClips
                                  lmButtonsMCArray[i].addChild(lmButtonsArray[i]);
                                  // Create a new array to preserve data from XML List
                                  lmNameArrayEG = new Array();
                                  lmNameArrayUS = new Array();
                                  // Create local variable to hold
                                  var lmTxtFieldContentUS:String;
                                  var lmTxtFieldContentEG:String;
                                  var lmTxtContent:String;
                                  // If clicked button is EG then make array with Arabic text
                                  // If clicked button is US then make array with English text
                                  if (footer.lang_btn.langState == "EG")
                                            for each (var leftMenuName:XML in egLanguageList)
                                                      lmNameArrayEG.push(leftMenuName);
                                            lmTxtFieldContentEG = lmNameArrayEG[i];
                                            lmTxtContent = lmTxtFieldContentEG;
                                  else
                                            for each (var leftMenuNameUS:XML in usLanguageList)
                                                      lmNameArrayUS.push(leftMenuNameUS);
                                            lmTxtFieldContentUS = lmNameArrayUS[i];
                                            lmTxtContent = lmTxtFieldContentUS;
                                  // Setup new text field each time script is executed
                                  lmTxtFieldsArray[i] = new TextField();
                                  lmTxtFieldsArray[i].width = 110;
                                  lmTxtFieldsArray[i].border = false;
                                  lmTxtFieldsArray[i].wordWrap = true;
                                  lmTxtFieldsArray[i].multiline = true;
                                  lmTxtFieldsArray[i].selectable = false;
                                  lmTxtFieldsArray[i].embedFonts = true;
                                  lmTxtFieldsArray[i].antiAliasType = AntiAliasType.ADVANCED;
                                  lmTxtFieldsArray[i].autoSize = TextFieldAutoSize.CENTER;
                                  lmTxtFieldsArray[i].text = lmTxtContent.toUpperCase();
                                  lmTxtFieldsArray[i].x = 10;
                                  lmTxtFieldsArray[i].name = "lmTxtFieldName" + i;
                                  // <<-- Add Text fields to the Movie Clip
                                  lmButtonsMCArray[i].addChild(lmTxtFieldsArray[i]);
                                  // If clicked button is EG then set Arabic text format, and make array with Arabic text fields
                                  // If clicked button is US then set English text format, and make array with Egnlish text fields
                                  if (footer.lang_btn.langState == "EG")
                                            lmTxtFieldsArray[i].setTextFormat(txtFormat_lm_eg);
                                            // Make array from text fields;
                                            pushEgTFintoArray.push(lmTxtFieldsArray[i]);
                                  else
                                            lmTxtFieldsArray[i].setTextFormat(txtFormat_lm_us);
                                            // Make array from text fields;
                                            pushUsTFintoArray.push(lmTxtFieldsArray[i]);
                                  // If clicked button is EG then loop thrue the for loop and remove English text fields from array
                                  // If clicked button is EG then loop thrue the for loop and remove Arabic text fields from array
                                  if (footer.lang_btn.langState == "EG")
                                            for (var rNr_us:Number = 0; rNr_us < pushUsTFintoArray.length; rNr_us++)
                                                      //remove the text field array from the display
                                       removeChild(pushUsTFintoArray[rNr_us]);
                                            //clear the array
                                            pushUsTFintoArray = [];
                                  else
                                            for (var rNr_eg:Number = 0; rNr_eg < pushEgTFintoArray.length; rNr_eg++)
                                                      //remove the text field array from the display
                                       removeChild(pushEgTFintoArray[rNr_eg]);
                                            //clear the array
                                            pushEgTFintoArray = [];
              btCount++;

    it looks like those tf's are children of  lmButtonsMCArray[i], not the current scope.  use:
    if (footer.lang_btn.langState == "EG")
                                            for (var rNr_us:Number = 0; rNr_us < pushUsTFintoArray.length; rNr_us++)
                                                      //remove the text field array from the display
                                        lmButtonsMCArray[rNr_us].removeChild(pushUsTFintoArray[rNr_us]);
                                            //clear the array
                                            pushUsTFintoArray = [];
                                  else
                                            for (var rNr_eg:Number = 0; rNr_eg < pushEgTFintoArray.length; rNr_eg++)
                                                      //remove the text field array from the display
                                        lmButtonsMCArray[rNr_eg].removeChild(pushEgTFintoArray[rNr_eg]);
                                            //clear the array
                                            pushEgTFintoArray = [];

Maybe you are looking for

  • 2013 MacBook Air for CS6

    I've been looking at the new 2013 13-inch MacBook Air for quite some time now. I'm a graphic designer, so I'll be looking to use Adobe CS6 (Photoshop, Illustrator, InDesign and Acrobat) and Aperture. Also of course, the general things such as Safari,

  • OS X 10.9 reinstalling stuck at "24 minutes left"

    I was going to clean reinstall Mac OS X. I was running on Yosemite, but for some reason "Mac OS X Utilities" were on Mavericks. I didn't really pay any attention to it, I could freely download 10.10 after the installation. Anyway, after erasing my dr

  • Changing a Salespersons First name on their account is reflected in some, but not all places

    We have a BI Chart report against our Sales Cloud application which displays a total of Pipeline dollars grouped up to the Direct Report.  The report is displaying the data as we expect it to except when we made changes to a user's name.  We had a re

  • How to invoke Outlook Express to send mail in a JAVA GUI

    hi.. i want to send a mail thru a java GUI...but when i press submit button..it has to invoke MS Outlook express and send the mail via this. pls reply soon.. bi..

  • Problem with opening docs with Reader 9

    I upgraded from 6 to 9 two days ago and now having problems opening pps files attached to e-mails.  What should I do?