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!

Need help setting field value
Last Post 08-27-2008 02:36 PM by Jim Evans. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Jim EvansUser is Offline
going with the flow
going with the flow
Posts:30
Avatar

--
08-27-2008 11:40 AM

    I need a hidden field with a unique value. The form is used to submit a credit card payment to Skip-Jack and requires a unique "order id" field.

     

    I currently use an .asp page to submit the payments but want to bring it into our DNN site. I have tried using an IFrame to display the .asp but this is not good.

     

    I currently use vbscript to create a unique number by concatenating the current hour, minute and second to the SessionId. This is adequate but I do not know how to do this using a Dynamic Form.

     

    Can someone help, please?

     

    Jim Evans

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    08-27-2008 12:03 PM

    Hi, You will need to use the 'Default SQL Value' and have the SQL generate either an auto number or a unique identifier.

    Check out these two threads and let me know if they help you out.

     

    Auto Generate Number

    Generate GUID (Unique Identifier) from default value property

     

    Thanks,

     

    Chad

    Jim EvansUser is Offline
    going with the flow
    going with the flow
    Posts:30
    Avatar

    --
    08-27-2008 12:41 PM

    Chad,

     

    The 'select Cast(NEWID() as nvarchar(36)) as DefaultValue ' works well but I am limited to a max of 20 characters. I tried changing the cast to nvarchar(20) and nvarchar(18) but I do not get a return value. I have never used a cast statement in SQL before. How can I create a shorted unique id?

     

    Jim Evans

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    08-27-2008 12:46 PM
    Its probably best to use the TRIM function calls within TSQL but this should work.


    select Cast(Cast(NEWID() as nvarchar(36)) as nvarchar(20)) as DefaultValue


    You can test anything under Host, SQL to see if it works there. You could also add other TSQL function calls to remove the - etc...


    The 'best' approach to this though is to probably use a SQL Event to insert a record into a sales or transactions table that has a 'Auto Number'. Then use a SQL Default to set the Auto Number to the total row count +1 etc... This way you could have an incrementing solution that would probably be better for you to reference later.


    -Chad

    Jim EvansUser is Offline
    going with the flow
    going with the flow
    Posts:30
    Avatar

    --
    08-27-2008 02:36 PM
    Chad,

    The 'select Replace(Cast(Cast(NEWID() as nvarchar(36)) as nvarchar(20)),'-','') as DefaultValue' is perfect. Thanks a lot for your help.

    Jim Evans
    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