2 Form Fields into one DB Entry

I apologize in advance if this question has been asked and answered multiple times. I am new to this and extremely frustrated because I keep getting stuck.
I am using Dreamweaver to create a website with Coldfusion as the server. I am using Quickbooks and QODBC to use the DB to integrate with CF.
I have created a form with multiple fields all text entries. I have been able to get all the information to post into my database correctly. However my question is I want to create a multiple entry that would combine two form fields into one column in the database table. For instance I have First Name and Last Name as form fields when the user submits I want these to both enter into their respective columns in the table but also combine into one entry with format Last Name, First Name into a FULL NAME Column in the table. Is this possible if so how????? Thanks in advance.

This is my current code::
<cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
<cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "customer">
  <cfquery datasource="QBs">  
    INSERT INTO Customer (Name, FirstName, LastName, BillAddressAddr1, BillAddressAddr2, BillAddressCity, BillAddressState, BillAddressPostalCode)
VALUES (<cfif IsDefined("FORM.lastname") AND #FORM.lastname# NEQ "">
<cfqueryparam value="#FORM.lastname#" cfsqltype="cf_sql_clob" maxlength="41">
<cfelse>
</cfif>
, <cfif IsDefined("FORM.firstname") AND #FORM.firstname# NEQ "">
<cfqueryparam value="#FORM.firstname#" cfsqltype="cf_sql_clob" maxlength="25">
<cfelse>
</cfif>
, <cfif IsDefined("FORM.lastname") AND #FORM.lastname# NEQ "">
<cfqueryparam value="#FORM.lastname#" cfsqltype="cf_sql_clob" maxlength="25">
<cfelse>
</cfif>
, <cfif IsDefined("FORM.firstname") AND #FORM.firstname# NEQ "">
<cfqueryparam value="#FORM.firstname#" cfsqltype="cf_sql_clob" maxlength="41">
<cfelse>
</cfif>
, <cfif IsDefined("FORM.streetaddress") AND #FORM.streetaddress# NEQ "">
<cfqueryparam value="#FORM.streetaddress#" cfsqltype="cf_sql_clob" maxlength="41">
<cfelse>
</cfif>
, <cfif IsDefined("FORM.city") AND #FORM.city# NEQ "">
<cfqueryparam value="#FORM.city#" cfsqltype="cf_sql_clob" maxlength="31">
<cfelse>
</cfif>
, <cfif IsDefined("FORM.state") AND #FORM.state# NEQ "">
<cfqueryparam value="#FORM.state#" cfsqltype="cf_sql_clob" maxlength="21">
<cfelse>
</cfif>
, <cfif IsDefined("FORM.zipcode") AND #FORM.zipcode# NEQ "">
<cfqueryparam value="#FORM.zipcode#" cfsqltype="cf_sql_clob" maxlength="13">
<cfelse>
</cfif>
  </cfquery>
<cfquery datasource="Access">
INSERT INTO Logininfo (FirstName, LastName, Username, Password)
VALUES (<cfif IsDefined("FORM.firstname") AND #FORM.firstname# NEQ "">
<cfqueryparam value="#FORM.firstname#" cfsqltype="cf_sql_clob" maxlength="25">
<cfelse>
</cfif>
, <cfif IsDefined("FORM.lastname") AND #FORM.lastname# NEQ "">
<cfqueryparam value="#FORM.lastname#" cfsqltype="cf_sql_clob" maxlength="25">
<cfelse>
</cfif>
, <cfif IsDefined("FORM.username") AND #FORM.username# NEQ "">
<cfqueryparam value="#FORM.username#" cfsqltype="cf_sql_clob" maxlength="25">
<cfelse>
</cfif>
, <cfif IsDefined("FORM.password") AND #FORM.password# NEQ "">
<cfqueryparam value="#FORM.password#" cfsqltype="cf_sql_clob" maxlength="25">
<cfelse>
</cfif>
</cfquery>
  <cflocation url="thankyou.cfm">
</cfif>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationPassword.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationPassword.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Welcome to our sign up Page!</h1>
<p>Please fill out the form below to register with out site and gain access to our members account page.</p>
<form name="customer" action="<cfoutput>#CurrentPage#</cfoutput>" method="POST" id="customer"><table width="auto" border="1">
  <tr>
    <td><label for="firstname">
      <div align="right">First Name:</div>
      </label></td>
    <td><span id="sprytextfield1">
      <input type="text" name="firstname" id="firstname" accesskey="n" tabindex="05" />
      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
  </tr>
  <tr>
    <td><label for="lastname">
      <div align="right">Last Name:</div>
      </label></td>
    <td><span id="sprytextfield2">
      <input type="text" name="lastname" id="lastname" accesskey="n" tabindex="10" />
      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
  </tr>
  <tr>
    <td><label for="streetaddress">
      <div align="right">Street Address</div>
      </label></td>
    <td><span id="sprytextfield3">
      <input type="text" name="streetaddress" id="streetaddress" accesskey="n" tabindex="15" />
      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
  </tr>
  <tr>
    <td><label for="city">
      <div align="right">City:</div>
      </label></td>
    <td><span id="sprytextfield4">
      <input type="text" name="city" id="city" accesskey="n" tabindex="20" />
      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
  </tr>
  <tr>
    <td><label for="state">
      <div align="right">State:</div>
      </label></td>
    <td><span id="sprytextfield5">
      <input type="text" name="state" id="state" accesskey="n" tabindex="25" />
      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
  </tr>
  <tr>
    <td><label for="zipcode">
      <div align="right">Zipcode:</div>
      </label></td>
    <td><span id="sprytextfield6">
      <input type="text" name="zipcode" id="zipcode" accesskey="n" tabindex="30" />
      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
  </tr>
  <tr>
    <td><label for="username">
      <div align="right">Username:</div>
    </label></td>
    <td><span id="sprytextfield7">
      <input type="text" name="username" id="username" accesskey="n" tabindex="40" />
      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
  </tr>
  <tr>
    <td><label for="password">
      <div align="right">Password:</div>
    </label></td>
    <td><span id="sprypassword1">
      <input type="password" name="password" id="password" accesskey="n" tabindex="45" />
      <span class="passwordRequiredMsg">A value is required.</span></span></td>
  </tr>
  <tr>
    <td colspan="2"><div align="center">
      <input type="submit" name="submit" id="submit" value="Register" accesskey="n" tabindex="50" />
    </div></td>
    </tr>
</table>
  <input type="hidden" name="MM_InsertRecord" value="customer" />
</form>
<script type="text/javascript">
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4");
var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");
var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6");
var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7");
var sprypassword1 = new Spry.Widget.ValidationPassword("sprypassword1");
</script>
</body>
</html>

Similar Messages

  • Import Text From Form Field into Subject Line of Email

    Hello,
    Is there a way to import text from a form field into the subject line of the email when sending back (attaching) the PDF form?  In other words, there is an "applicant name" and I would like that name to be the subject line of the email.
    I am using Adobe Acrobat X (10.1.7)
    If any one has aby guidance or resources online where I can locate this information I would greatly appreciate it!  I have been searching all day but have not found a solution yet. 
    Thanks!

    Thank you so much for the help.  For some reason I cannot get it to work though.   Now, when I hit the submit button it does not do anything.
    Previously, I had the following code under
    ACTIONS>Mouse Up>Submit a Form
    mailto:[email protected]?subject=Employee Application
    I removed the above mailto URL and put in your code as a Javascript function. I made sure that my field name matched the name in quotes within the code.
    I used the following:
    var subject = getField("lastname").value 
    this.mailDoc({
    bUI: false,
    cTo: "[email protected]",
    cSubject: subject,
    cMsg: "Type message here"
    Do you see anything obvious that I am doing wrong?
    Many thanks!

  • Duplicating form fields from one PDF document to another

    Hi,
    Does anyone know of a way to select and duplicate all acrobat form fields from one PDF document into a new PDF document. I know I can do so one field at a time but would like to know if there is a way to do so in a wholesale fashion.
    Our PDF documents are created in-house each year and are nearly the same as the previous year's document containing 99% of the same form fields in the same locations. These forms contain a lot of form fields, anywhere from 50 to 100 fields.
    Rather than start from scratch each year defining the same fields that were present in the previous year's document, I am looking for a way to copy the form fields from an existing PDF document (last year's PDF in our case) and copy the form fields into a new PDF document (that does not yet have any form fields defined) and hopefully maintain all the field attributes and positions from the previous years document.
    Thanks for any suggestions,
    Steve

    The PDF template we need to copy the form fields "to" doesn't start out having any form fields. It is the fields that we need copied from a previous year's PDF template.
    Here's an except from my original post: "I am looking for a way to copy the form fields from an existing PDF document (last year's PDF in our case) and copy the form fields into a new PDF document (that does not yet have any form fields defined)"
    The "new" PDF template is a complete "paper" form with updated legal text and calendar year referrences but NO form fields. In our IS group, we then take these forms, add form fields to them and are then able to populate them with database-resident user data. We serve them up to the user in their browser pre-populated with their application data.
    So again, our need is to find a way to copy form fields from "last year's" PDF template and copy just the form fields to an fresh "new year's" PDF template that contains no form fields to begin with. What we begin with is just a PDF representation of a paper student loan application.
    Thanks for the suggestion!

  • Formatting Address Fields into one

    Using Acrobat X PRO:
    I have a multi-page document in which a user is prompted for the address in two different formats:
    1) With the address split into 4 different values/fields:
    Street Field, City Field, State Field, Zip Field
    Example: "1234 Count Rd" (Next Line) "St Louis", "MO"  "55555"
    2) With the address all together:
    Complete Address on one line with a maximum length of 40 Characters.
    Example: 1234 Count Rd, St. Louis, MO 55555
    I would like users to be able to Fill in the Street, City, State, and Zip fields, and no matter what the format of the following fields, have the data autopopulated.
    This isn't a problem for example #1.  However, with #2 if i place all fields close together, I have to guess on how far apart to space each field and still have it fit and format properly.
    Is there any way to combine the values of 4 fields into one value (separated by commas)?
    Making the address field 'auto-fit' may be necessary but it's ugly if there is extra space in the remaining fields. 
    PLEASE SEE THIS EXAMPLE document i have created for the purpose of this post

    And if the combined fields are longer than 40 characters?
    With Acrobat 4 there was a sample form that one entered the data in fields like tile, first name, mi, last name, abd degrees  and then created a full name from those individual fields and adjusted for missing data.
    The doucment level script:
    / Concatenate 3 strings with separators where needed
    function fillin(s1, s2, s3, sep) {
    Purpose: concatenate up to 3 strings with an optional separator
    inputs:
    s1: required input string text or empty string
    s2: required input string text or empty string
    s3: required input string text or empty string
    sep: optional separator sting
    returns:
    sResult concatenated string
    // variable to determine how to concatenate the strings
      var test = 0; // all strings null
      var sResult; // re slut string to return
    // force any number string to a character string for input variables
      s1 = s1.toString();
      s2 = s2.toString();
      s3 = s3.toString();
      if(sep.toString() == undefined) sep = ''; // if sep is undefined force to null
    assign a binary value for each string present 
    so the computed value of the strings will indicate which strings are present
    when converted to a binary value
      if (s1 != "") test += 1; // string 1 present add binary value: 001
      if (s2 != "") test += 2; // string 2 present add binary value: 010
      if (s3 != "") test += 4; // string 3 present add binary value: 100
      /* return appropriate string combination based on
      calculated test value as a binary value
      switch (test.toString(2)) {
      case "0": // no non-empty strings passed - binary 0
         sResult = "";
      break;
      case "1": // only string 1 present - binary 1
         sResult = s1;  
      break;
      case "10": // only string 2 present - binary 10
         sResult = s2;  
      break;
      case "11": // string 1 and 2 present - binary 10 + 1
         sResult = s1 + sep + s2; 
      break;
      case "100": // only string 3 present - binary 100
         sResult = s3;
      break;
      case "101": // string 1 and 3 - binary 100 + 001
         sResult = s1 + sep + s3; 
      break;
      case "110": // string 2 and 3 - binary 100 + 010
         sResult = s2 + sep + s3; 
      break;
      case "111": // all 3 strings  - binary 100 + 010 + 001
         sResult = s1 + sep + s2 + sep + s3; 
      break;
      default: // any missed combinations
         sResult = "";
      break;
    return sResult;
    And then one could use a custom calculation script for a full address field:
    // Full business address including country
    function doFullBusinessAddress() {
      var ba = this.getField("business.address.full");
      var bc = this.getField("business.address.citystatezip");
      var bu = this.getField("business.address.country");
      event.value = fillin(ba.value, bc.value, bu.value, ", ");
    doFullBusinessAddress();

  • To Join two SAP fields into one info object

    Hi All,
    Can you please suggest the best method to concatenate values from two R/3 fields into one info object master data table?
    The requirement is to create a Sales report where I need to report on sales against  sales type.
    Sales type is a list of joint values of item category ( 0ITEM_CATEG) and bill type (0BILL_TYPE).
    So, I need a list of all item categories and billing types in a single object and report sales value against it.
    Please suggest.
    Thanks,
    Sharmishtha

    Hi Venkat,
    In DSO any case you will not be having more than 16 Keys. I am surprised seeing requirement of more than 16 keys, but anyways you need to go with some workaround.
    You can concatenate multiple Fields and map to one Dummy InfoObject which will be Key in DSO so in actual you have more than 16 Keys but have 16 Keys in system.
    But analyze requirement in detail because this will increase data redundancy and time for load will get increased.
    Also for new issues start new discussion otherwise people will not able to help you in this forum.
    Regards,
    Ganesh

  • How to store forms fields into the session ?

    Hi All,
    I have to store forms fields into the session.
    I have four forms (htm forms) in four jsps and there are total 25 fields.
    I am inserting all the fields into the database at once while user submit the last form.
    I want to use session to store forms fields.
    So please anybody tell me how to do that.
    Is the following code correct to store the forms fields into
    the sesstion........
    // creating a session
    HttpSession session=request.getSession(true);
    // retrieving form fields
    String name=request.getParameter("customer_name");
    String business=request.getParameter("business");
    String address=request.getParameter("address");
    and so on....
    // store form fields into the session
    session.setAttribute("name",name);
    session.setAttribute("business",business);
    session.setAttribute("address",address);
    and so on....
    and later on get the value as:
    session.getAttribute("name");
    session.getAttribute("business");
    session.getAttribute("address");
    and so on....
    OR
    is there another way to store form fields into the session.
    Please guide and reply with coding.....
    Please answer and help.
    Thanks
    Amitindia

    I don't mean to be an *** but I have no desire to help someone so unwilling to think >>and do. Go through some of these tutorial, do the examples in each and you will be far >>better equipped to ask questions:
    http://www.google.co.za/search?hl=en&q=%2Bjsp+%2Bjavabean+%2Btutorial&b >>tnG=Google+Search&meta=
    I was just asking that if I use the following
    <jsp:useBean id="cart" scope="session" class="session.Carts" />
    <jsp:setProperty name="cart" property="address" value="myaddress" />
    </jsp:useBean>then will I be able to acheive my aim as I have to store form fields into the session and later retreive while user submit the last form.
    Please read my question that I have posted.
    Am I using the right way................or which is the best way to store form fields into the session and later retrieve them.
    please reply
    Thanks
    Amitindia

  • HOW to copy Form field from one RTF to another RTF

    Hi Expert
    I have developed 20 reports in BI Publisher which is using xml as data source. So to access the data i have done the xml coding for each form field.
    Now i want to copy the form field from one rtf to another, while doing the copy paste of the form field from one rtf to another it is not copying the xml coding. It is appearing in the new rtf as below
    <?ref:xdo0391?>
    Can you guys suggest me how to achieve the same. Is there any setting need to be changed so that while do the copy paste the form field it will copy the backend code also.
    Thanks in advance.
    Thanks
    Srikant

    make your template set as backward compatabile before you do anything on template. load the xml and then copy the form field. it should work. dont try to open the field without loading xml.

  • Combine two date field into one timestamp field

    Hello all,
    I need help combining two date fields into one timestamp field.
    I have separate Date and Milliseconds fields and want to
    combine to one Timestamp field can some suggest sql???

    This is my data
    01 JAN 1989 12:01:00.001 AM
    this is my insert drag_time is a timestamp field in another schema
    INSERT
    INTO DRAG (drag_time)
    SELECT to_char(drag_time, 'DD MON YYYY HH12:MI:SS')||(drag_second)||to_char(drag_time, ' AM')
    FROM sa.drag;
    This is the error
    ERROR at line 3:
    ORA-01855: AM/A.M. or PM/P.M. required

  • Join 2 fields into one to map to destination field

    Hi! Is it possible to join data in 2 fields into one to map to the destination field? I have image file name kept in one field and want to prefix with a URL which I hope to maintain in a manually added field. Alternatively, it will be great to be able to prefix the image filename with the URL to be mapped to the image destination field.
    Any help is very much appreciated.
    Thanks!
    SF

    Hi,
    Yes it is possible to combine values from two fields to map a single field of MDM repository using Import Manager. This feature of Import manager is called as Field Partitioning.
    You can do it by following below mentioned steps:
    1. Open import manager and connect to source file.
    2. Specify source and destination tables. expand Source Table under source Hierarchy in Import Manager. And click on first field to select it.
    3. Now Go to "Partition Field/Value" tab. In the Source Partition sub Pane  you will see your First Field under "partition by" (* because you select first field from source hierarchy).
    4. From source Partition sub pane under "Available Fields" select the second field and click on "Add". This will bring second field also under "partitioned By".
    5. Now select both Fields under "partition by" and right click and select "Combine" (*Combine option will be enabled only when more than 1 field is selected by "partition By"
    6. Once you select Combine, it will combine values from both Fields. Again right click and select "Set combine delimiter" and specify the required value delimiter.
    7. Now Go to "Map Field /Values" tab. You will see one more field (*starting with the name of your first field and ending with partition word. Map this field to the required destination field.
    8. Follow other normal steps for data import and import data. after data import check data in data manager. you will get combined values from 2 source field in the MDM field.
    Check Page no 203 of [import manager reference guide |http://help.sap.com/saphelp_nwmdm71/helpdata/en/4b/72b8e7a42301bae10000000a42189b/MDMImportManager71.pdf]for more details.
    Please revert if you face any issue.
    Regards,
    Shiv
    Edited by: Shiv Prashant Dixit on Mar 11, 2010 9:53 AM

  • Get value of two fields into one field

    Hellou,
    i need little help with javascript again
    Currently i'm using code below to get value from one field to other:
    getField("Text35").value = getField("Text1").valueAsString;
    Now i'm wondering how to change this code, so i could get values from two fields into one. For example i have field "firstname" and field "lastname", now i want to show this in field "name".
    Example, if field firstname have value John and field lastname value is Doe, i want to show it in field name like "John Doe".
    I hope that u understood what i want
    Thanks for helping me!

    getField("Text35").value = getField("Text1").valueAsString + " " +
    getField("Text2").valueAsString;

  • Upload multiple files WITH correct pairs of form fields into Database

    In my form page, I would like to allow 3 files upload and 3 corresponding text fields, so that the filename and text description can be saved in database table in correct pair. Like this:
    INSERT INTO table1 (filename,desc) VALUES('photo1.jpg','happy day');
    INSERT INTO table1 (filename,desc) VALUES('photo2.jpg','fire camp');
    INSERT INTO table1 (filename,desc) VALUES('photo3.jpg','christmas night');
    However, using the commons fileupload, http://commons.apache.org/fileupload/, I don't know how to reconstruct my codes so that I can acheieve this result.
    if(item.isFormField()){
    }else{
    }I seems to be restricted from this structure.
    The jsp form page
    <input type="text" name="description1" value="" />
    <input type="file" name="sourcefile" value="" />
    <input type="text" name="description2" value="" />
    <input type="file" name="sourcefile" value="" />The Servlet file
    package Upload;
    import sql.*;
    import user.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Date;
    import java.util.List;
    import java.util.Iterator;
    import java.io.File;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.text.SimpleDateFormat;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.*;
    public class UploadFile extends HttpServlet {
    private String fs;
    private String category = null;
    private String realpath = null;
    public String imagepath = null;
    public PrintWriter out;
    private Map<String, String> formfield = new HashMap<String, String>();
      //Initialize global variables
      public void init(ServletConfig config, ServletContext context) throws ServletException {
        super.init(config);
      //Process the HTTP Post request
      public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("utf-8");
        response.setCharacterEncoding("utf-8");
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        Thumbnail thumb = new Thumbnail();
        fs = System.getProperty("file.separator");
        this.SetImagePath();
         boolean isMultipart = ServletFileUpload.isMultipartContent(request);
         if(!isMultipart){
          out.print("not multiple part.");
         }else{
             FileItemFactory factory = new DiskFileItemFactory();
             ServletFileUpload upload = new ServletFileUpload(factory);
             List items = null;
             try{
                items = upload.parseRequest(request);
             } catch (FileUploadException e) {
                e.printStackTrace();
             Iterator itr = items.iterator();
             while (itr.hasNext()) {
               FileItem item = (FileItem) itr.next();
               if(item.isFormField()){
                  String formvalue = new String(item.getString().getBytes("ISO-8859-1"), "utf-8");
                  formfield.put(item.getFieldName(),formvalue);
                  out.println("Normal Form Field, ParaName:" + item.getFieldName() + ", ParaValue: " + formvalue + "<br/>");
               }else{
                 String itemName = item.getName();
                 String filename = GetTodayDate() + "-" + itemName;
                 try{
                   new File(this.imagepath + formfield.get("category")).mkdirs();
                   new File(this.imagepath + formfield.get("category")+fs+"thumbnails").mkdirs();
                   //Save the file to the destination path
                   File savedFile = new File(this.imagepath + formfield.get("category") + fs + filename);
                   item.write(savedFile);
                   thumb.Process(this.imagepath + formfield.get("category") +fs+ filename,this.imagepath + formfield.get("category") +fs+ "thumbnails" +fs+ filename, 25, 100);
                   DBConnection db = new DBConnection();
                   String sql = "SELECT id from category where name = '"+formfield.get("category")+"'";
                   db.SelectQuery(sql);
                    while(db.rs.next()){
                      int cat_id = db.rs.getInt("id");
                      sql = "INSERT INTO file (cat_id,filename,description) VALUES ("+cat_id+",'"+filename+"','"+formfield.get("description")+"')";
                      out.println(sql);
                      db.RunQuery(sql);
                 } catch (Exception e){
                    e.printStackTrace();
            HttpSession session = request.getSession();
            UserData k = (UserData)session.getAttribute("userdata");
            k.setMessage("File Upload successfully");
            response.sendRedirect("./Upload.jsp");
      //Get today date, it is a test, actually the current date can be retrieved from SQL
      public String GetTodayDate(){
        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
        String today = format.format(new Date());
        return today;
      //Set the current RealPath which the file calls for this file
      public void SetRealPath(){
        this.realpath = getServletConfig().getServletContext().getRealPath("/");
      public void SetImagePath(){
        this.SetRealPath();
        this.imagepath = this.realpath + "images" +fs;
    }Can anyone give me some code suggestion? Thx.

    When one hits the submit button - I then get a 404 page error.What is the apaches(?) error log saying? Mostly you get very useful information when looking into the error log!
    In any case you may look at how you are Uploading Multiple Files with mod_plsql.

  • 2 fields into one

    Hey guys,
    was hoping you could help me out here. is there a way for information from two different fields to copy over into one. I do mass amounts of rebate applications and the application form has the first and last name seperate so i enter then in two different fields. I have a 2nd page that i use as a cover page that has the customers name and address so i want to have the first and last name from the previous page transfer to one field on the cover page. is this possible?
    Thanks

    That code will combine 2 fields with a space separater but it will add a leading or trailing space if there is only one non-empty field and fill the field with a space if both fields are empty.
    The following function will combine upto 3 fields and use an optional separater but will not add any leading or trailing blanks if any or all of the fields are empty or null.
    // Concatenate 3 strings with separators where needed
    function fillin(s1, s2, s3, sep) {
    Purpose: concatenate up to 3 strings with an optional separator
    inputs:
    s1: required input string text or empty string
    s2: required input string text or empty string
    s3: required input string text or empty string
    sep: optional separator sting
    returns:
    sResult concatenated string
    // variable to determine how to concatenate the strings
      var test = 0; // all strings null
      var sResult; // re slut string to return
    // force any number string to a character string for input variables
      s1 = s1.toString();
      s2 = s2.toString();
      s3 = s3.toString();
      if(sep.toString() == undefined) sep = ''; // if sep is undefined force to null
    assign a binary value for each string present 
    so the computed value of the strings will indicate which strings are present
    when converted to a binary value
      if (s1 != "") test += 1; // string 1 present add binary value: 001
      if (s2 != "") test += 2; // string 2 present add binary value: 010
      if (s3 != "") test += 4; // string 3 present add binary value: 100
      /* return appropriate string combination based on
      calculated test value as a binary value
      switch (test.toString(2)) {
      case "0": // no non-empty strings passed - binary 0
         sResult = "";
      break;
      case "1": // only string 1 present - binary 1
         sResult = s1;  
      break;
      case "10": // only string 2 present - binary 10
         sResult = s2;  
      break;
      case "11": // string 1 and 2 present - binary 10 + 1
         sResult = s1 + sep + s2; 
      break;
      case "100": // only string 3 present - binary 100
         sResult = s3;
      break;
      case "101": // string 1 and 3 - binary 100 + 001
         sResult = s1 + sep + s3; 
      break;
      case "110": // string 2 and 3 - binary 100 + 010
         sResult = s2 + sep + s3; 
      break;
      case "111": // all 3 strings  - binary 100 + 010 + 001
         sResult = s1 + sep + s2 + sep + s3; 
      break;
      default: // any missed combinations
         sResult = "";
      break;
    return sResult;
    // combine two fields seperated by a space; optional 3rd field is a null string;
    event.vlaue = fillin(this.getField("First Name').value, this.getField("Last Name").value, "", " ")

  • How to create a multiple PDF-form outputs into one PDF?

    Hi,
    I`d like to create a PDF document with a few pages in it, build from different PDF-forms using many form-function calls. Where each PDF-form can use its own interface.
    I`ve made a simple programme, but as the result I have a few separated documents with scrolling tab instead of one document with all pages in it.
    What am I doing wrong?
    *& Report  ZZ_TEST_PDF_MULTY
    REPORT  zz_test_pdf_multy.
    PARAMETERS:
      p_page TYPE i DEFAULT 2,
      p_row TYPE i DEFAULT 4.
    END-OF-SELECTION.
      DATA:
        tb_itf TYPE tsftext,
        s_itf TYPE tline.
      DATA:
        c_fmname TYPE rs38l_fnam,
        s_outputparams TYPE sfpoutputparams,
        s_docparams TYPE sfpdocparams,
        s_formoutput TYPE fpformoutput,
        s_sfpjoboutput TYPE sfpjoboutput,
        c_page TYPE string,
        c_row TYPE string.
      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name     = 'FP_TEST_00'
        IMPORTING
          e_funcname = c_fmname.
      s_outputparams-nodialog = 'X'.
      s_outputparams-device   = 'PRINTER'.
      s_outputparams-preview  = 'X'.
      s_outputparams-dest     = 'PDF'.
      s_outputparams-getpdf   = ' '.
      s_outputparams-title    = sy-title.
    *  s_outputparams-bumode   = 'M'.
      CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
          ie_outputparams = s_outputparams
        EXCEPTIONS
          cancel          = 1
          usage_error     = 2
          system_error    = 3
          internal_error  = 4
          OTHERS          = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      s_docparams-langu   = 'R'.
      s_docparams-country = 'RU'.
      DO p_page TIMES.
        MOVE sy-index TO c_page.
        REFRESH tb_itf.
        DO p_row TIMES.
          MOVE sy-index TO c_row.
          c_row = sy-index.
          CONCATENATE
              'page' c_page 'row' c_row
            INTO s_itf-tdline SEPARATED BY space.
          APPEND s_itf TO tb_itf.
        ENDDO.
        CALL FUNCTION c_fmname
          EXPORTING
            /1bcdwb/docparams  = s_docparams
            textlines          = tb_itf
          IMPORTING
            /1bcdwb/formoutput = s_formoutput
          EXCEPTIONS
            usage_error        = 1
            system_error       = 2
            internal_error     = 3.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDDO.
      CALL FUNCTION 'FP_JOB_CLOSE'
        IMPORTING
          e_result       = s_sfpjoboutput
        EXCEPTIONS
          usage_error    = 1
          system_error   = 2
          internal_error = 3
          OTHERS         = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

    Sorry, but making single PDF from many smartforms is not what I want to achieve. I wold like to know how to get one PDF document made by ALC-forms.
    In my example I have many PDF documents. So, how to get (or put) them all in one PDF?
    ps: the way to get one PDF from smartforms is also here:
    "Combining Multiple Smartform Outputs Into One PDF file"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450

  • SQL Loader combine fields into one.

    Hi i am using sql loader to convert a db from sql server to oracle.
    my SQL Server DB has a field for the date and another for the time, i want to convert this into on filed called date. I cannot seem to figure out how to do this.
    my ctl file looks like this.
    load data
    infile '[Cell_Phones].[dbo].[Account_Details].dat' "str '<EORD>'"
    into table MD_CELLPHONE.Account_Details
    fields terminated by '<EOFD>'
    trailing nullcols
    Account_Number ,
    Phone_Number ,
    Call_temp FILLER,
    Call_Date "TO_DATE(:Call_temp ||' ' ||':Call_Date', 'mm/dd/yyyy HH:miam')"
    BEGINDATA
    3817913.0<EOFD>1234567890.0<EOFD>2007-03-31 00:00:00<EOFD>4:25 PM<EOFD>3817913.0<EOFD>1234567890.0<EOFD>2007-03-24 00:00:00<EOFD>8:19 PM<EOFD>3817913.0<EOFD>1234567890.0<EOFD>2007-03-31 00:00:00<EOFD>4:25 PM<EOFD>
    But if i run this i get the following error
    SQL*Loader-291: Invalid bind variable CALL_TEMP in SQL string for column CALL_DATE.
    basically i cant find a way to do this to combine 2 columns into one and discard the one i am not using.
    Any help would be appreciated.
    Jeff

    Hello,
    You can load the data as in a stg table and the move from stg table to regular table concatenating both call_temp and call_date column together.
    load data
    infile 'Cell_Phones.dbo.Account_Details.dat' "str '<EORD>'"
    into table MD_CELLPHONE.Account_Details_stg
    fields terminated by '<EOFD>'
    trailing nullcols
    Account_Number ,
    Phone_Number ,
    Call_temp,
    Call_Date
    Convert  to right date format
    Insert into account_details (col1 , col2, col3, ...)  select  val1 , val2 , to_date ( val3 || ' ' || val4) ...
    from account_details_stg;
    Regards
    Edited by: OrionNet on Feb 2, 2009 5:11 PM

  • Delete all form fields in one go

    Hi
    I am using Acrobat X Pro.
    While running the accessibility check on my PDF, I got an error that there are many form fields that are not tagged to the structure. When I highlighted the fields, I noticed that all these form fields are redundant and can be safely removed. Is there a way I can remove them in one go for the entire PDF document? I saw that there is page-level deletion option where I need to do a Select All and Delete. But how about entire document level?
    Few of my colleagues have Acrobat XI Pro. If this is not possible in X Pro, please let me know we can do it in XI Pro. I can check that out as well.
    Sreekanth

    Go to Form Edit mode, enter the Fields list, press Ctrl+A, then Delete.

Maybe you are looking for

  • LE_SHP_TAB_CUST_OVER

    Is there anyone ever implemented BAdI LE_SHP_TAB_CUST_OVER to enhance inbound delivery transaction..? I have implemented the BAdI and got some problem. I have created a TAB in VL02n, and I am also able to show the values in the table control in the n

  • Clean up Oracle Home (11.1.0.6)

    Hi, One of my Oracle Home (11.1.0.6) on HPUnix IA64, is 10GB. As far as I understand, an Oracle Home should not be more than 5-6GB isnt it? Correct me if I am wrong. And also please let me know how to free up the space in the Oracle Home. Which direc

  • Uninstall iphoto

    iPhoto crashes after a whole day of consuming the system resources on our iMac.  Cannot seem to uninstall it.  Also, I cannot find the setting to prevent it from launching when I attempt to sync our iPhones.

  • Individual Script for Keys of Remote Control

    Hello together, within my actual project, i need any script which can set an action on the number-keys of the remote control. The user press for example the "0" or the "4", then another Title-Set or anything starts. Unfortunately it have to be the nu

  • Is it possible to use the built-in Ethernet port in the RE1000 to Minimize Decreasing throughput

    Kindly  Is it possible to use the built-in Fast Ethernet (10/100 Mbps) port to extend the network with an Ethernet cable without placing the extender in an area where you still have at signal ? because i dont want to decrease the wireless through-put