Create continous sequence of numbers

Hello
I need to create numbers starting from 1 to n. I need these numbers to add as ending in the name of files that are being saved. For example File_1, File_2........etc.
I tried to create a for loop (n= 100) and wired the "i" outside. Only i need is these i values ( 0,1,2,3,.....100)
How is i possible? See attachment ffor what i have done.
Nghtcwrlr
********************Kudos are alwayzz Welcome !! ******************
Attachments:
Numbers_file name.vi ‏18 KB

Nghtcrwlr wrote:
Ok Alain... here s the problem. I have a VI that writes some values to Excel and saves. Each time the VI is run it saves an Excel file. I need the Excel file naming like " File_1, File_2...etc.Those numbers 1, 2 should come at the ending in name. That was what i needed. But as i mentioned, i already got the solution in another way.
In that case, the following vi is what you need.  You send in the basic file name, like "File_", and it returns the next numbered file name, like "File_003".  The next time you call it, it will return "File_004", and so on.  The first time you ever call it, send in a True on the Start Over? boolean input.  After than send in a False.  The vi contains a LV2 Style Functional Global.  The shift register is uninitialized.  It remembers what is in the shift register from the time it was called before.  The first time you call it, you must make Start Over as True so that it can initialize the shift register with 1.  Then the file name will be FIle_001.  Next time you call it, Start Over is False, and the shift register gets incremented, so the 1 becomes a 2, and the output is File_002.
I think this is the best way to handle your problem.  It is both quick and easy.
- tbob
Inventor of the WORM Global
Attachments:
FileName_Incrementer.vi ‏10 KB

Similar Messages

  • How to create a sequence in Answers?

    Hi everyone,
    I want to know if it's possible to create a sequence in Answers and how.
    I have a Pivot table that I want to assign row numbers, but when I use RCOUNT(1) in a Dummy column I end up with 1 in all rows.
    This is the format of my pivot table.
    -------------------------------------Measure---
    ---------------------------------Y-1-------Y----
    Order(DUMMY)---Code---Desc-- 2009 ----- 2010
    1 435 idn 1 2
    1 53 dvf 3 1
    1 123 asd 8 4
    I've tried to do RCOUNT(1 by Y) but then I end up having the double of rows.
    Can it be done???
    Thanks in Advanced

    Try doing this:
    1) Create a dummy column and call it DUMMY with this in the fx:
    CASE WHEN 1=0 THEN tablename.columname ELSE 'whatever' END
    2) You can hide this column.
    3) Then in your "sequence" column, click on the fx and type:
    RCOUNT(1 by DUMMY)
    where "DUMMY" is the column created in step 1.

  • How to create a sequence number to insert values to database

    I am working on the application for the client to insert their vendor informaton to our database. We have a refvendor table and vendorid is primary key. I was asked for the vendorid to be a sequential number. I am not sure if the DBA set up the vendor id to be a sequential number by creating sequence or is this something i can do myself. if so can you help me how i can create and make the vendor id a sequentiial number. Thank you
    Tablename is Refvendor
    vendorId, vendorname, dbestaus

    user452051 wrote:
    thank you for the reply. I am still learning about sequence. so the value from seq.netval will be inserted to the vendor id field. my first number will be 00001,00002,00003,00004,.... How can I do for the sequence to start with 00001If you create a sequence as shown, it will start with 1
    ,..... and my other question if I delete sequence 00002 will the number be re-arranged?no
    There will be gaps in the numbers.

  • Creating/Inserting sequence. V 1.6

    Hi, I have a Create Record page with a hidden ' :P2_ERROR_NUMBER ' item. I would like this number to increase sequentially every time a new record is created and added to my 'METADATACOPY' table. Right now there are around 70 records in the table with the first ten records having error numbers 1-10 in order.<br><br>Can I create a sequence that will begin at error number 11 when I view the 11th record and submit it to the table for an update, increment by 1, with last number 10?<br><br>
    Right now I have:<br>
    Name METADATACOPY_ERRNUM_SEQ <br>
    Min Value 1 <br>
    Max Value 999999999999999999999999999 <br>
    Increment By 1 <br>
    Cycle Flag N <br>
    Order Flag N <br>
    Cache Size 20 <br>
    Last Number 10 <br><br>
    Would the next step be to create a process on page 2 such as:<br>
    Name:Error_Number,
    PointOnload - before header?<br><br>
    If I create this as a process do I need to create a trigger?

    Hi Leo,
    I am not 100 % I understand what you are asking. :-) Why don’t you just assign an ERROR_NUMBER to the 70 rows you have manually. Then alter the sequence so it starts with the 71.
    To get the ERROR_NUMBER to increase automatic make a database trigger something like this:
    create or replace metadatacopy_b_ins_r
    after insert on metadatacopy
    for each row
    begin
    if :new.error_number id null then
    select metadatacopy_errnum_seq.nextval
    into :new.error_number
    from dual
    end if;
    end;
    This is what I normally do. But you can also do it in the application with an on submit after computations and validations process with source like this:
    declare
    function get_pk return varchar2
    is
    begin
    for c1 in (select metadatacopy_errnum_seq.nextval next_val
    from dual)
    loop
    return c1.next_val;
    end loop;
    end;
    begin
    :P2_ERROR_NUMBER := get_pk;
    end;
    The process should be linked to the CREATE button via the conditional processing in the process.
    Hope this helps.

  • Unable to see video & audio tracks as shown in "Create a sequence or timeline and add audio"

    hi,
    I'm on the https://helpx.adobe.com/creative-cloud/learn/start/premiere.html page trying to work through the Create a sequence or timeline and add audio tutorial
    And cannot see the Video & Audio, as shown in the bottom right sub-window
    I'm using a trial version of Premier pro CC downloaded yesterday. On my mac mini running 10.9.2
    does anyone know how to fix this problem?
    thanks
    david
    I am able to hear the audio.
    Message was edited by: spottedsilvertabby

    Hi,
    Error 7 is when a router or the connection to the router is broken in some way.
    Some devices have features such as Denial Of Service protection (DoS) that cut a particular Internet Port when it thinks too much data is coming (Presuming it is an attack.)
    iChat 5 in Leopard is not capped by the System Preferences > Quicktime Streaming speed (which we used to suggest was set at 1.5Mbps)
    It now sees your whole Connection speed and your Upload may be much faster than this.
    Your Download is likely to be much faster. However iChat will tend to operate at the lower figure of your Upload.
    DoS features are threshold based.
    You may now be bumping in to this Threshold where you were not before.
    SPI (Stateful packet Inspection) does a different job but has the same effect when it is overloaded by the speed of the data.
    If you have either of these features, turn them Off (Disable them)
    7:25 PM Friday; October 2, 2009

  • Need help in Creating a sequence

    Hi,
    I need to create a sequence which starts with the value one more than max value of one of the columns in a table. Can anyone help me in this regard?
    Eg: I have a table 'User_Details' with one of the columns as 'ID', I need to create a sequence for this table which starts with one more the 'max(ID)' if there are any records already existing.
    Thanks,
    Raghu

    Assuming that you have some way to identify which columns of which tables will be populated by sequences in the new release, the you could write PL/SQL code to automatically generate this. In this example I have assumed that you need a sequence created forthe (single) numeric PK column of each table in a particular schema, and that the sequence name will always be table_pk_seq.
    DECLARE
       l_max NUMBER;
    BEGIN
       FOR r IN (SELECT c.table_name, cc.column_name
                 FROM user_constraints c, user_cons_columns cc
                 WHERE c.constraint_name = cc.constraint_name and
                       c.constraint_type = 'P') LOOP
          EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM '||r.table_name INTO l_max;
          l_max := l_max + 100; --just to be safe
          EXECUTE IMMEDIATE 'CREATE SEQUENCE 'r.table_name||'_pk_seq '||
                            'START WITH '||l_max||' INCREMENT BY 1';
       END LOOP;
    END;John

  • How to create a sequence for an particular item in my apex form

    Hi friends,
    I created an database application, of a form with a report, and it is working fine...
    But in my form, i have a requirement....The below are the existing fields in my form
    issue no
    created by
    start date
    status
    priority
    due date
    Among these fields in my form i need to create a 'Sequence' for my field "issue no",
    So that whenever i opened the form the 'issue number' must generate automatically like 1 for the first time, 2 for the second time and so on..
    For that i created a sequence
    CREATE SEQUENCE "ORDERS_SEQ"
    MINVALUE 1
    MAXVALUE 999999999999999999999999999
    INCREMENT BY 1
    START WITH 1000
    NOCACHE
    NOCYCLE;
    But for validation where i need to write the sequence query for the particular item 'issue no'....i dont have any idea of where to write the validation query for the sequence..
    please tell where i need to write in step wise manner..please help me friends...
    As the below is my validated sequence query for item 'issue no'
    'select seq.issue_id.nextval into issue_no'
    This is my above validation query whether the query that i mentioned is right..if not let me know the validation query..
    And also i need where to apply this validation query in steps..
    Thanks in advance
    Regards,
    Harry...

    Harry,
    Rik is on the right track. Here is a sample insert trigger: Would need to substitute you sequence ORDERS_SEQ with my sequence las_log_seq, how you define or use timestamps is up to you.
    DROP TRIGGER LASDEV.BINS1_LAS_LOG_TBL;
    CREATE OR REPLACE TRIGGER LASDEV."BINS1_LAS_LOG_TBL"
       BEFORE INSERT
       ON las_log_tbl
       FOR EACH ROW
    BEGIN
       -- Description: Insert log_seq, creation_dt, creation_id,
       --              lst_updt_dt and lst_updt_id.
       -- Maintenance:
       -- Date        Actor          Action
       -- ====        =====          ======
       -- 07-Sep-2010 J. Wells       Create.
       :new.creation_id := nvl( v( 'app_user' ), user );
       :new.creation_dt := SYSDATE;
       :new.lst_updt_dt := :new.creation_dt;
       :new.lst_updt_id := :new.creation_id;
        SELECT las_log_seq.NEXTVAL
          INTO :new.las_log_seq
          FROM DUAL;
    END bins1_las_log_tbl;
    /Heff

  • How to create a sequence based on name, country, city, year, month, number

    Hello,
    I am using Application Express 4.2.1.00.08
    I am new to apex and i need some help in creating a sequence.
    I am creating an application where i profile people and i need to create an auto sequence that when the person is added to the database he will have his own sequence based on his name, country, city, year he was added, month he was added and his number.
    This is a bit tricky because each person will have a different name, country city etc.
    How can this be done ?

    Hello,
    I have to create a sequence so that when for example an employee is added using a form his ID will be saved based on his name, country, city, year he was created, month he was created and his number.
    However, each employee is diff, so when you add another employee to the form his ID will be different, different name, country, city etc..
    This has to be automatically generated.. is this possible?

  • Is there a way to create a sequence automatically from a clips settings?

    I know you can go in and look at the settings and manually input them into the sequence, but I wondered if there was a way to ideally cntrl click (or something like that) the imported clip and "create new sequence" using the clip settings rather than doing it manually?
    If there's not a way to do this, it would be a really handy feature for those of us dealing with multiple formats.
    Thanks in advance.
    Steve
    G5, G4    

    About as close as you can get is to right-click on a single clip and Make Multiclip Sequence. Hit OK to make an sequence out of the single clip. Open the sequence made and delete the multiclip and edit the clip you want back into the sequence.

  • Is there a way to create a sequence by using multiple playlists?

    Is there a way to create a sequence so that music from several playlists is played in a specific order.
    For example:
    1 song from playlist 1
    3 songs from playlist 2
    5 songs from playlist 3
    1 song from playlist 4
    After which it restarts.

    No. Create a new PL with the sequence that you want. You can tell the PL to repeat itself.
    MJ

  • Error while creating Access Sequence (output)

    Hi,
    While creating Access sequence (for an output) i.e. Access Sequence - Accesses - Fields (at this point)
    I am getting an error (I/O) in the field.  The field value is WERKS and not able to go further.
    I created a table for output billing and criteria fiels are sales area and plant.
    Please guide me in this regard.
    Thanks and regards,
    Rao

    Hi Praveen,
    I created a condition Table xxx and selected fields (Sales Area, Plant).  While creation of access sequences for an (output type) at the Fields level i am able to see all the 4 fields but with the field WERKS it is showing an error.
    Regards,
    Rao

  • Create new sequence for GoPro HD camera in CS5

    Can someone help me create a sequence in CS5 for a GoPro HD camera.  Which preset should I start with or what values should I change in the New Sequcne Window on the general tab?
    Here are the video details from a file using mediaplus.  Pixel Aspect Ratio: 1.0
    Thanks in advance.
    Format                           : MPEG-4
    Format profile                   : JVT
    Codec ID                         : avc1
    File size                        : 1.22 GiB
    Duration                         : 14mn 22s
    Overall bit rate                 : 12.1 Mbps
    Encoded date                     : UTC 2010-05-16 10:32:39
    Tagged date                      : UTC 2010-05-16 10:32:39
    AMBA                             :   
    Video
    ID                               : 1
    Format                           : AVC
    Format/Info                      : Advanced Video Codec
    Format profile                   : [email protected]
    Format settings, CABAC           : Yes
    Format settings, ReFrames        : 2 frames
    Format settings, GOP             : M=3, N=15
    Codec ID                         : avc1
    Codec ID/Info                    : Advanced Video Coding
    Duration                         : 14mn 22s
    Bit rate mode                    : Variable
    Bit rate                         : 12.0 Mbps
    Width                            : 1 280 pixels
    Height                           : 960 pixels
    Display aspect ratio             : 4:3
    Frame rate mode                  : Constant
    Frame rate                       : 29.970 fps
    Color space                      : YUV
    Chroma subsampling               : 4:2:0
    Bit depth                        : 8 bits
    Scan type                        : Progressive
    Bits/(Pixel*Frame)               : 0.326
    Stream size                      : 1.20 GiB (99%)
    Title                            :     GoPro AVC
    Language                         : English
    Encoded date                     : UTC 2010-05-16 10:32:39
    Tagged date                      : UTC 2010-05-16 10:32:39
    Audio
    ID                               : 2
    Format                           : AAC
    Format/Info                      : Advanced Audio Codec
    Format version                   : Version 4
    Format profile                   : LC
    Format settings, SBR             : No
    Codec ID                         : 40
    Duration                         : 14mn 22s
    Bit rate mode                    : Constant
    Bit rate                         : 128 Kbps
    Channel(s)                       : 2 channels
    Channel positions                : Front: L R
    Sampling rate                    : 48.0 KHz
    Stream size                      : 13.2 MiB (1%)
    Title                            :     GoPro AAC
    Language                         : English
    Encoded date                     : UTC 2010-05-16 10:32:39
    Tagged date                      : UTC 2010-05-16 10:32:39

    Hello,
    What I did for CS4 , that does not have than function.
    Create a new project, pick the  AVCHD 1080 30p present as a basis, and then go to the "general" tab and save it with a different name, like "GoPro R4 mode"
    Then close Pr, open the preset you just saved with a text editor like notepad , and search and replace "1920" for "1280", and "1080" for "960"
    That´s it, it works.
    Gonza
    edit: mmm Im not sure if its ok... when I open the preset it says 1280x960, all good. But then when I go to sequence > properties it says 1920x1080 ...

  • Can't create a sequence within a pl/sql block with execute immediate.

    Hi All. I created a user and granted it the 'create sequence' privilege though a role. In a pl/sql block I try to create a sequence using 'execute immediate' but get a 1031-insufficient privileges error. If I grant create sequence directly to the user, the pl/sql block completes successfully. Can anyone explain this behavior? We're running 11.2 Enterprise Editon.
    Thanks,
    Mark

    In a definer's rights stored procedure (the default), you only have access to privileges that have been granted directly, not via a role.
    There are two basic reasons for that. First, roles can be enabled or disabled, default and non-default, password-protected, etc. so the set of roles a particular user actually has is session-specific. Oracle needs to know at compile time what privileges the owner of the procedure has. The only way to do that (without deferring the privilege check) is to ignore privileges granted through roles.
    Second, since 99% of privilege management DBAs do involves granting and revoking roles, it's helpful that changing role privileges will never cause objects to be marked invalid and recompiled which can have side-effects on applications. DBAs only need to worry about causing problems on those rare cases where they are granting or revoking direct privileges to users.
    You can create an invoker's rights stored procedure by adding the clause (AUTHID CURRENT_USER). That defer's the security check to run-time but allows the procedure to see privileges granted through roles in the current session. But that means that the caller of the procedure would need to have the CREATE SEQUENCE privilege through the role, not the owner of the procedure.
    And just to make the point, dynamic object creation in PL/SQL is almost always a red flag that there is something problematic in your design. If you are creating sequences dynamically, that means that you'd have to refer to them dynamically throughout your code which means that your inserts would need to use dynamic SQL. That's not a particularly easy or safe way to develop code.
    Justin

  • How to create a SEQUENCE in MSSQL2005

    Hi
    I am also having a similar problem which opened the thread
    Actually i am using a Repositery which is created in MSSQL2005.
    Now i want to create a SEQUENCE similar to Oracle and populate My surrogate Key Column.
    Can u tell me how to create a SEQUENCE in MSSQL2005?
    Does anyone is having the sql syntax?
    Thanks
    Gourisankar

    Hi Gourisankar,
    There is no sequence concept in MS SQL Server rather it has IDENTITY.
    In MS SQL Server if you declare a column type as a Identity it will be auto increment when a new record inserts.
    So in you underlying table create a column as ID and type as "Identity" and in your mapping leave that field un mapped.
    Have a look and google more on "identity in ms sql server" ;)
    http://www.sqlteam.com/article/autonumbering-identity-columns
    http://www.craigsmullins.com/ssu_0599.htm
    Thanks,
    G

  • Trouble with a create button - sequence

    I have created a sequence to assign to my Staff_id
    create sequence staff_id_sequence start with 3; (i have 2 staff already created)
    I have a manually created datablock with the information from my staff table
    staff_id
    s_last name
    s_first name
    etc.
    I have made a create_button which when pressed it should post the next value in the sequence so that I can input a new staff member.
    CLEAR_FORM;
    SELECT staff_id_sequence.nextval
    INTO :staff.staff_id
    FROM dual;
    SET_ITEM_PROPERTY('SAVE_BUTTON', ENABLED, PROPERTY_TRUE);
    When run the form and press create_button nothing happens. If i put a number in the textbox for staff_id and press create_button it gives me the next number in the sequence.
    Anyone know why it doesn't run until I fill the box with a number?

    hi
    try the following..
    CLEAR_record;
    select staff_id_sequence.nextval into :staff.staff_id
    from dual;
    set_item_property('save_button',ENABLED,PROPERTY_TRUE);sarah

Maybe you are looking for

  • Importing changes the audio quality of original video

    When I import a video into a new project the audio sampling rate of the video goes down and the audio channel changes to mono though the video is stereo. I have tried creating new projects changing the sequence presets to ones that include the higher

  • Calling a c# function with a ref parameter to a struct

    public struct TestStruct public bool Value; public class Functions void Flip(ref TestStruct testStruct) testStruct.Value = !testStruct.Value; I'm trying to call the from c++ like this TestStruct ^ testStruct = gcnew TestStruct(); Functions ^ function

  • Powershell over WAN

    hello all as we know we can using powershel on local networks but i want to use it over internet ( WAN ) is there anyway to do that do i should setup a free VPN on windows or what ?? please i need help im looking for answer since 2 months but without

  • ITunes store gets buggy with Genius on, won't register mouse clicks?

    I am having a problem in the iTunes store on my MacBook Pro. If I turn on Genius, iTunes ends up not responding to my mouse clicks. I will have to click multiple times in quick succession to get it to register the click, then often those multiple cli

  • The query is correct but jdbc modify it !!

    my query is SELECT o.ID_pagamento, SUM (m.valore) FROM operazioni o, movimenti_magazzino m WHERE m.ID_operazioni = o.ID AND m.quantita < 0 GROUP BY o.ID_pagamento but jdbc automatically executes a second query: SELECT COUNT(*), O.ID_PAGAMENTO, SUM (M