Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

How do I generate a sequential unique number
Last Post 01-05-2011 07:52 AM by Ryan Bakerink. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
creativeavatarUser is Offline
new to the springs
new to the springs
Posts:1
Avatar

--
01-04-2011 11:56 PM
    Background:
    -----------------------------
    I have a lead generation form that is essentially a robust contact form, that sends out emails to agents based on how a user answers questions.
    -----------------------------
    Whats needs to be acomplished:
    -----------------------------
    I have been able to everything so far that's needed, except one thing.

    Every lead that is generated needs to have a sequential unique identifier.. I need this number to start at say 20,000 and work it's way up.

    For example, the first user (A) submits a form, it will be assigned a unique number, in this case (20,000) since it's the first person to submit.

    User (B) submits a form, it will be assigned the unique number 20,001

    User (C) submits a form, it will be assigned the unique number 20,002

    and so on and so on the unique numbers will be assigned.
    ------------------------------
    In Conclusion:
    ------------------------------
    I will need this unique sequential number to be in the email that goes out to agents. I am sure what I stated above needs to be accomplished using a hidden field and SQL.. I just can't for the life of me get this working. I have gone through hundreds of forums posts and the most I have been able to find is a unique GUID number, but this is not what I want or need.

    If it helps at all, I have indoogrid as well in case a unique table needs to be created

    Anyone who can help me with this or point me in the right direction will be an absolute life saver!

    John Moura




    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    01-05-2011 07:52 AM
    Hello CreativeAvatar,

    Step 1.) Use FLAT TABLES to store your data, not the default relational tables, please see Demonstration 31 to understand how to set up flat tables.

    The way I would approach this is to have a hidden field with a SQL default value that pulls the largest number(most recently added) from a column of type int.

    If the first record, then validate for it using PLSQL in your form completion event.

    Use this as an example for a SQL Completion Event:
    -------------------------------------
    DECLARE @var INT

    set @var = (SELECT COUNT(intColumn) FROM yourTable)

    IF @var < 1
    BEGIN
    --There are not any records so perform SQL to add first record
    END

    ELSE
    BEGIN
    -- Perform SQL for what you normally do
    END
    --------------------------------------

    Basically if you already have records in your table and you can configure your hidden field to work correctly then you would be able to accomplish the functionality you seek.

    I hope this helps nudge you in the right direction.

    Unfortunately I can't program the entire functionality for you but i hope I have steered you in the right direction to achieve what you're trying to do.

    If you have any questions please let me know.

    Thanks,

    Ryan


    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi