Alpha Video Training
Results 1 to 2 of 2

Thread: User Defined File Upload Feature - multiple files into grid.

  1. #1
    Member
    Real Name
    Steve Matranga
    Join Date
    Oct 2006
    Posts
    130

    Default User Defined File Upload Feature - multiple files into grid.

    The file upload feature pack presents a video on uploading multiple files and having them appear in a linked grid. The example is based on a sql backened, although the author says that uploading to adb tables is similar. Can someone explain how to accomplish this using alpha tables and not sql.

    Thanks. It would have been great if the author explained this procedure both ways. Thanks.

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,666

    Default Re: User Defined File Upload Feature - multiple files into grid.

    This should get you started. In this case I'm adding the filename to my product details dbf table - it has a two part key - ProdId and ProdDetailsId. Not doing anything fancy with the ProdDetailsId, but normally I'd have to go after the latest number and start incrementing that - most likely just use auto increment in the table itself. Needs more error checking as well. Hope it helps.

    Code:
    dim count as n
    dim i as n
    dim tbl as p
    dim fntostore as c
    
    count = e.filecount
    
    tbl = table.open("[PathAlias.ADB_Path]\tblproductdetails")
    
    for i = 1 to count
    	tbl.enter_begin()
    		tbl.productid = convert_type(e.primaryKeyArray[2],"N")
    		tbl.proddetailsid = i
    		fntostore = e.fileArray[i].filename
    		tbl.proddetails = fntostore
    	tbl.enter_end()
    next i		
    
    e.javascript = "window.parent.{grid.object}.refreshLinkedContent();"

Similar Threads

  1. select multiple files/images for upload w/upload feature pack or not
    By Ezslim in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 10-22-2012, 06:33 AM
  2. Can’t seem to insert uploaded files into SQL table using feature pack file upload UD
    By Maroine81 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 5
    Last Post: 08-31-2011, 03:57 AM
  3. file upload - user defined >refreshing grid in popup window
    By dickerman7239 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 03-11-2011, 08:23 PM
  4. File Upload - User Defined - Unique
    By qcorporation in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 10-18-2010, 11:07 PM
  5. File Upload - User Defined Action
    By omagarc in forum Application Server Version 10 - Web/Browser Applications
    Replies: 1
    Last Post: 10-07-2010, 02:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •