Add repeating entry to collection

Hi
How can I add repeating entry to collection. For example by pressing button it add entry to collection with date column on 1st of month and with text "example" in column Text for 5 years so the collection will looks like this
1/1/2014   example
2/1/2014   example
3/1/2014   example
12/1/2018  example

We do not currently support the list comprehension sort of construct that you describe. However, you can use the timer control to simulate iteration. Hopefully the following example will help you get started.
Add a timer control to your canvas. Change its properties as follows:
TimerEnd: UpdateContext({TStart:100});UpdateContext({TStart:0});UpdateContext({counter:counter+1})
End: 2
Start: TStart
Text: "Timer: " & counter
Now hit F5 to go to preview mode. Click the timer control. You will see it steadily increasing--you can speed up by setting Interval to 0.1 or something like that.
What is happening is that the timer is going from 0 to 2. When it hits 2, the TimerEnd rule resets TStart to 100 and then to 0--the variable's value needs to change for data to flow. This will cause the timer to continue in a loop. We also increment
counter--this value is displayed on the timer itself because of the Text rule above. What you now have is essentially a while loop and you can add Collect statements to the end of the TimerEnd rule to collect values of the counter.
You can also set termination condition:
TimerEnd: If(counter < 5, UpdateContext({TStart:100});UpdateContext({TStart:0});UpdateContext({counter:counter+1}), false)
I hope that gets you started :-)

Similar Messages

  • Repeated entries in JComboBox

    The problem I encountered is that while JComboBox can display repeated items, it doesn't allow selecting them. Try selecting item #2 in the attached example. Any suggestions?
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ItemEvent;
    import java.awt.event.ItemListener;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    public class ComboTest extends JFrame
         private JComboBox m_name;
         public ComboTest()
              String[] values = {"item 0 is unique","items 1 and 2 are identical","items 1 and 2 are identical","item 3 is unique"};
              m_name = new JComboBox(values);
              m_name.addItemListener(new ItemListener()
                        public void itemStateChanged(ItemEvent e)
                             System.out.println("itemStateChanged, new index = "+m_name.getSelectedIndex()+" >>>"+e.paramString());
              m_name.addActionListener(new ActionListener()
                        public void actionPerformed(ActionEvent e)
                             System.out.println("actionPerformed, new index = "+m_name.getSelectedIndex()+" >>>"+e.paramString());
              m_name.setSelectedIndex(-1);
              m_name.setEditable(true);
              getContentPane().add(m_name);
              setSize(250,60);
         public static void main(String[] args)
              ComboTest mm = new ComboTest();
              mm.show();

    I would agree with earlier posters who suggested that putting repeated entries into the JComboBox is probably not much help. It seems better to wrap People up in a class which contains some unique identifier, even if the toString() method can return duplicates.
    You can get what you want, but you will have to write a custom ComboBoxModel, since DefaultComboBoxModel delegates storage to java.util.Vector, which returns the first index that matches when you use indexOf. See http://java.sun.com/j2se/1.3/docs/api/java/util/Vector.html#indexOf(java.lang.Object) for more details.
    There are plenty of problems in Java. I don't think this is one of them.
    -- Scott

  • How to add the entries and how to delete the entries from custom Z-table?

    Hi Experts,
    My requirement is I need to add the entries from program to three custom z-tables . Assume as zabc1,zabc2,zabc3.
    Here how to add the entries from program to Z-table.???
    And one more requirement is I want to provide a deletion checkbox in selection screen . Initial it was unchecked. If I am giving tick mark then the entries should be deleted from above custom Z-tables. this all will done in backgroung job?
    Could you please guide me the logic how to crack this???
    Let me know if you need more Info
    Thanks
    Sanju

    Hi Sanjana,
    What you can do is to use the ABAP keyword INSERT or MODIFY to add or modify records to a given database table. Here are the syntax taken from SAP documentation:
    *Insert Statement
    INSERT dbtab
    Syntax
    INSERT { {INTO target VALUES source }
           | {     target FROM   source } }.
    Effect
    The INSERT statement inserts one or more rows specified in source in the database table specified in target. The two variants with INTO and VALUES or without INTO with FROM behave identically, with the exception that you cannot specify any internal tables in source after VALUES.
    System Fields
    The INSERT statement sets the values of the system fields sy-subrc and sy-dbcnt.
    sy-subrc Meaning
    0 At least one row was inserted.
    4 At least one row could not be inserted, because the database table already contains a row with the same primary key or a unique secondary index.
    The INSERT statement sets sy-dbcnt to the number of rows inserted.
    Note
    The inserted rows are finally included in the table in the next database commit. Up until this point, they can still be removed by a database rollback.
    *Modify Statement
    MODIFY dbtab
    Syntax
    MODIFY target FROM source.
    Effect
    The MODIFY statement inserts one or several lines specified in source in the database table specified in target, or overwrites existing lines.
    System fields
    The MODIFY statement sets the values of the sy-subrc and sy-dbcnt system fields.
    sy-subrc Meaning
    0 At least one line is inserted or changed.
    4 At least one line could not be processed since there is already a line with the same unique name secondary index in the database table.
    The MODIFY statement sets sy-dbcnt to the number of processed lines.
    Note
    The changes are transferred finally to the database table with the next database commit. Up to that point, they can be reversed using a database rollback.
    Hope it helps...
    P.S. Please award points if it helps...

  • A function module to add an entry to the change log of the ODS needed

    Hi all,
    I want to add an entry to the change log table of the ODS .
    Is there a Function module available for this or a work around for this.
    Regards
    Akshay

    Hi Kiran,
    You can directly add days to the date.
    Eg:
    DATA date LIKE sy-datum.
    DATA days TYPE i.
    date = sy-datum.
    days = 100.
    date = date + days.
    WRITE date.
    Regards
    Wenceslaus

  • How to Add multiple entry to the group policy security filtering

    How to Add multiple entry to the group policy security filtering
    Is there any way we can add multiple entry to the Domain group policy Security filtering tab.Currently its not allowing to add more then one entry at a time.
    Getting Error like "only one name can be entered,and the name cannot contain a semicolon.Enter a valid name"

    Hi
    Are you trying to add more users or groups through Group Policy Management Security Filtering tab?
    Try right clicking on the policy and then edit
    Then in Editor Right click on the name of the policy and Properties
    Security tab and add user or group from this tab. Just make sure if you are adding user or groups "Select this object type" has
    the correct option also "From this Location" is set to your entire directory not the local server.
    Update us with the above.
    Thanks

  • Calendar Sync Issue With repeating entry deletions Notes 8.5 to BB

    I have an issue where when synchronizing may calendar with Lotus Notes version 8.5, the Blackberry will delete repeating entries. Specifically, if I load the Blackberry with all my calendar entries from Notes and then in one entry in my Notes calendar a "single" occurance of a meeting gets canceled .. the next time I sync with the Blackberry it deletes "all" occurances of that meeting from the BB. The entries remain correct on Lotus Notes. The only way I can seem to fix that is to reset sync setting and reload the calendar to the BB all over again, and then this occurs again .... this happens with both V5 and V6 of the BB Desktop Software. Has anyone seen this and is there a fix ?

    I have an issue where when synchronizing may calendar with Lotus Notes version 8.5, the Blackberry will delete repeating entries. Specifically, if I load the Blackberry with all my calendar entries from Notes and then in one entry in my Notes calendar a "single" occurance of a meeting gets canceled .. the next time I sync with the Blackberry it deletes "all" occurances of that meeting from the BB. The entries remain correct on Lotus Notes. The only way I can seem to fix that is to reset sync setting and reload the calendar to the BB all over again, and then this occurs again .... this happens with both V5 and V6 of the BB Desktop Software. Has anyone seen this and is there a fix ?

  • How do I add an entry to the auto correct spell check dictionary?

    How do I add an entry to the auto-correct dictionary for spell check?

    The suggestion from Encrypted11 is for adding a keyboard shortcut, if that is what you want to do. If you want to add a custom word to the keyboard dictionary ....
    The iPad Dictionary
    The iPad has a dictionary built in. As you type, it compares what you've typed against the words in that dictionary. If it finds a partial match, it displays a suggestion just beneath what you have typed.
    If you accept the suggestion by tapping the Space or full stop, great.
    If you allow the 'mistake' to stand, the second time you type the same word and reject the correction, iPad adds the new word to its custom, dynamic dictionary. From now on, it will accept the new word and will even suggest it the next time you type something like it.
    That is copied from here.
    http://www.my-iguru.com/ipad/ipad-hints-tips/ipad-keyboard-tips-tricks.php

  • Ways to add photos to a collection?

    When editing images (meaning, performing selects/rejects) I like to use collections. Is there (or can there be) a better way to add images to a specific collection other than dragging & dropping? It might be beneficial to have a contextual menu to send selected photos to an existing collection. As it stands, there's an option to add to a Quick Collection or to find what collections a particular image currently resides in. I don't like using Quick Collections, especially if I have several collections that one image might go into, so it would just double my work to go from Quick Collection and then into the collections I really wanted in the first place.
    Is what I'm looking for possible? If not, is that something anyone else here would find useful? What's the method of requesting features from Adobe?

    You can press "B" to add to a quick collection for temporary use and then move the entire quick collection to a permanent collection later if you needed to.
    edit sorry i missed the OP.  Disregard

  • How to add root entry

    Hi folks
    I'm trying to simulate an LDIF file into JNDI attribute set but cant make it
    dn: dc=fifa,dc=com
    objectclass: dcObject
    objectclass: organization
    o: Football Org
    dc: fifa
    dn: cn=Manager,dc=fifa,dc=com
    objectclass: organizationalRole
    cn: Manager
    This LDIF works fine on the command line ldapadd. Highly appreciate your help if anyone can tell me how to simulate these LDIF entries in JNDI way. I'm using openldap on solaris. I can add other entries if this entry is already created using command line ldapadd.
    Thanks in advance

    Ok i made it... there we go...
    import javax.naming.directory.*;
    import javax.naming.*;
    import java.util.*;
    public class AddEntry {
         final static String ldapServerName = "localhost";
         final static String rootdn = "cn=Manager,dc=fifa,dc=com";
         final static String rootpass = "secret";
         final static String rootContext = "dc=fifa,dc=com";
         // obtain initial directory context using the environment
         public DirContext createContext(String name)
              Properties env = new Properties();
              DirContext ctx = null;
              env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
              env.put( Context.PROVIDER_URL, "ldap://" + ldapServerName + "/" + name);
              env.put(Context.SECURITY_AUTHENTICATION, "simple");
              env.put( Context.SECURITY_PRINCIPAL, rootdn );
              env.put( Context.SECURITY_CREDENTIALS, rootpass );
              try
                   ctx = new InitialDirContext( env );
              catch(Exception ex)
                   ex.printStackTrace();
              return ctx;
        public static void main( String[] args )
              AddEntry ae = new AddEntry();
              try
                   DirContext ctx = ae.createContext(rootContext);
                   Attributes root_Dn = null;
                   Attributes cn_Dn = null;
                   Attribute root_objclass = null;
                   Attribute oAttr = null;
                   Attribute cn_objclass = null;
                   Attribute cnAttr = null;
                   root_Dn = new BasicAttributes();
                   root_objclass = new BasicAttribute("objectclass");
                   root_objclass.add("dcObject");
                   root_objclass.add("organization");
                   root_Dn.put(root_objclass);
                   oAttr = new BasicAttribute("o");
                   oAttr.add("Fifa Company");
                   root_Dn.put(oAttr);
                   ctx.createSubcontext("", root_Dn);
                   cn_Dn = new BasicAttributes();
                   cn_objclass = new BasicAttribute("objectclass");
                   cn_objclass.add("organizationalRole");
                   cn_Dn.put(cn_objclass);
                   cnAttr = new BasicAttribute("cn");
                   cnAttr.add("Manager");
                   cn_Dn.put(cnAttr);
                   DirContext ctx1 = ae.createContext(rootdn);
                   ctx1.createSubcontext("", cn_Dn);
           catch ( NameAlreadyBoundException nabe )
                   System.err.println( rootContext + " has already been bound!" );
              } catch ( Exception e )
                   System.err.println( e );
    }

  • IOS7:  "all-day, repeating" entry from all-day to a specific time.

    Since upgrading to ios7 (iPhone 5, Verizon) when using the calendar I can't switch an "all-day, repeating" entry from all-day to a specific time. There's no "all-day" toggle switch.  Does anyone know how to correct this?  My friend has the 5s &amp; AT&amp;T and she doesn't have this problem.  Hers shows a toggle switch!

    I haven't completely discounted it but it seems like I would need to back up to files, then restore from files. I don't want to do that. I want a full file system level SAN snapshot that I can just drop into place. The does work when the production base is shut down. However, considering that I do have archive logs, shouldn't it be possible to use them to recover to a specific scene without having to do an RMAN backup at all? It seems that doing an RMAN backup/recovery would just make this whole process a lot longer since the DB is 160 gigs in size (not huge, but the dump would take more time than I would like). With a SAN snapshot, if I can get this to work, I'm looking at about a 15-20 minute period of time to move the production DB over to test.
    Since you are suggesting that RMAN may be a better approach I'll provide more details about what I'm trying to do. Essentially this is like trying to recover a DB from a server that had its power plug pulled. I was hoping that Oracle's automatic recovery would do the same thing it would do in that instance. But obviously that doesn't work. What I want to do is bring over all the datafiles, redo logs, and archive logs using the SAN snapshot. Then if possible use some aspect of Oracle (RMAN if it can do it) to mount the database, then recover to a specific time or SCN if using RMAN. However, when I tried using RMAN to do it, I got an error saying that it couldn't restore the data file because it already existed. Since I don't want to start from scratch and have RMAN rebuild files that I've already taken snapshots of (needless copying of data), I gave up on the RMAN approach. But, if you know of a way to use RMAN so that it can recover to a specific incarnation without needing to runm a backup first, I am completely open to trying it.

  • Add members to a collection

    Collection1:Test
    SELECT apex_item.checkbox(10,c001) order_id
                 , apex_item.display_and_save (12, c002) QTY
                 , apex_item.display_and_save (14, c003) UNIT_PRICE
            FROM   apex_collections
            WHERE  collection_name = 'Test'
    ....Collection2:
    SELECT * FROM (SELECT apex_item.checkbox(20,c001,'UNCHECKED') SELECT
                 , apex_item.display_and_save (22, c002) QTY
                 , apex_item.display_and_save (24, c003) UNIT_PRICE
            FROM   apex_collections
            WHERE  collection_name = 'source')
    ....The above query is used to generate a report.
    Requirement: I want to add records to the collection TEST (below javascript function and ondemand process created) from other collection (SOURCE) based on checked item (order id) value from another report which is based on another collection.
    function callprocess(){
    var arr_f20=new Array();
    var ajaxRequest=new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=test',0);
    arr_f11=document.getElementsByName('f20');
    for(i=0;i<arr_f20.length;i++){
      if(arr_f20.checked){
    ajaxRequest.addParam('f01',arr_f20[i].value)
    var ajaxResult=ajaxRequest.get(); alert(ajaxResult);
    ajaxRequest=null;
    BEGIN
      FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP
      apex_collection.add_member (p_collection_name => 'Test', p_c001=> APEX_APPLICATION.G_F01(i));
      END LOOP;
    END;I am successfully being able to add 1 member (p_c001). But I am not being able to figure out how to add other members ie, p_c002,p_c003 to the collection TEST
    Thanks for the help!
    Regards,
    Ved

    Hi Ved,
    to add members to a collection you should use this command:
    apex_collection.add_member(
    p_collection_name => 'Test',
    p_c001 => APEX_APPLICATION.G_F01(i),
    p_c002 => APEX_APPLICATION.G_F02(i),
    p_c003 => APEX_APPLICATION.G_F03(i)
    Question
    - the column APEX_APPLICATION.G_F01, does it contain rownum or an ID of the primary key of the table?
    if pk then you have to change the code like this:
    apex_collection.add_member(
    p_collection_name => 'Test',
    p_c001 => APEX_APPLICATION.G_F01(i),
    p_c002 => APEX_APPLICATION.G_F02(APEX_APPLICATION.G_F01(i)),
    p_c003 => APEX_APPLICATION.G_F03(APEX_APPLICATION.G_F01(i))
    TIPP
    - you should use upper case names for your collection then you are not running into an error (not finding collection), because when you query your collection you would enter something like:
    SELECT c001 test1, c002 test2, c003 test3
    FROM APEX_collections
    WHERE collection_name = collection_name
    the name of your collection is always changes to upper case when creating the collection.
    so in any query for selecting rows of your collection you have to use the upper case of your collection_name,
    regards,
    Denise
    www.appsassociates.de

  • Add an entry in table

    hi,
    can any one please help me how to add an entry in transp.table.
    in the table TVARV table i need to add an entry .
    please any one help me how to add and what are neccessary steps to be followed while adding an entry.
    for eg
    NAME          TYPE                   NUMB                  LOW                HIGH
    ZSAMPLE        P                       001                        /FILE/
    ZSAMPLE        P                        002                      /EXTRACT/
    NOW I NEED TO ADD AN ENTRY LIKE
    ZSAMPLE      P                          003                      /TEST/
    please help me its urgent.
    thanks in advance.

    Hi ,
    Pls fellow this Steps :
       1 ) Go to se 11 u type the table name then press the display .
      2)  in that screen u click utilities , here u click the table contents .
    3) In  that table contents u click the create entires ..
    4) now u enter the values in that screen .
    5) then press save .
    now this entires are stored in TVARV table .
    <REMOVED BY MODERATOR>
    Regards ,
    Shankar GJ
    Edited by: Alvaro Tejada Galindo on Apr 11, 2008 5:44 PM

  • How to add backdated entry to calender

    I am trying to add an entry in the past and it just disappear from the screen after a couple of seconds, i have just updated my ipad and iphone could the new update have caused this clich!!
    thank you
    Simone

    Settings>Mail, Contacts, Calendar>Calendars>Sync>All Events

  • How to add environment entry in EJB3 ejb-jar.xml

    Hi,
    Is that a build in way of add environment entries in JDev for EJB 3 beans? For EJB 2 beans you can do that using properties. But the bean properties is not available in EJB 3. Please help.
    Thanks
    Kenny

    Thank you for the reply. But I need a way to enter env-entry value in ejb-jar.xml for EJB 3 in Jdev. In EJB 2, Jdev generate ejb-jar.xml for the bean and also let you add env-entry through bean's properties menu. But in there in no properties menu for EJB 3, also generated ejb-jar.xml is only a empty file doesn't contain any EJB depolyment information. That means you have to code ejb-jar.xml all manually.
    If I am wrong, can someone show me how to do this right?

  • How to add tns entry in names server

    Hi,
    Can anyone tell us, How to add tns entry in names server
    Thanks

    In the Net Manager utility, in the left-hand pane left click Oracle Names Servers, left click on your nameserver.
    Click the "+" button in the upper left, that should be enough to get you started- sorry, all our 9i installs have gone away, can't exactly recall the nix X gui version of client program, but I think* its netmgr, should be in OH/bin.
    If you're running a java OEM console that cames with 9i clients, Net Manager is available on that little Butler tab.
    And for the command line version, running the namesctl utility- you can save a tns entry with the connect string and run it in a file, just like sqlplus, with an @filename:
    vi newtns.txt
    register newtns -d (DESCRIPTION=(ADDRESS_LIST=...(SERVICE_NAME=NEWTNS.MYCO)))
    $ namesctl
    @newtns.txt
    query newtns *
    reload -- nameserver sync
    query newtns *
    exit
    $ Edited by: clcarter on Jul 7, 2011 3:26 PM
    added cmdline version

Maybe you are looking for

  • Which Audio Interface for Me?

    Okay, I have decided to make the switch from my iMic and a mixer to an audio interface that has two inputs so I can record two channels at once. I may be using external pre's at times so it must have line-in's. Also, right now I am using a Rev. A Mac

  • Which case we go for abap interface?

    Hi  friends, As per my understand  some scenario's are running with out PI integration.........those are called abap interfaces.... then which case we go for Pi? and which case we go for ABAP interface? please help me on this... Thanks & Regards E.Ra

  • Could not create JCO in SSO although connexion test is ok

    Hi all, I have a problem with my JCOs. I defined JCOs tu use SSO and test them (test and ping). Everything is working, the sso is ok. Now when I launch my application I have the message : "Could not create JCOClientConnection for logical System:...et

  • Where is samplerate converter in logic

    where is the sample rate converter in lp 8? previously in lp 7 it was there in audio editor

  • [SIMGH] Reference a Database view

    Hi, I am using transaction SIMGH for creating a new customer node. I would like to reference a <b>database view</b> in it. I know how to reference maintenance view but the problem with DB view is that they do not have a SOBJ record. Is there a possib