Multiple uploads - Setting up the fields.

I would like to make a page where the members can upload up
to 4 images for
their clients design proofs. Searching through examples and
posts, I came up
with this code to upload and insert the information into the
database:
<cfif IsDefined ('Submit')>
<cfloop index = "i" from =1 to =4>
<cfif IsDefined("form.file#i#")>
<cfif evaluate("form.file#i#") NEQ "">
<cffile accept="image/gif, image/jpeg, image/jpg,
image/png, image/psd"
action="upload"
destination="E:\webs\softproofs.com\wwwroot\projects\prooffiles"
filefield="ImageName#i#" nameconflict="makeunique">
<cfquery name="uploadproofs"
datasource="#Request.MainDSN#">
INSERT INTO proof (file, size, project_id, owner, dirname
<cfif FORM.border
GT "">,border</cfif>)
VALUES ('#File.ServerFile#', '#File.FileSize#',
'#Form.project_id#',
'#Session.MM_Username#', '#Session.MM_Username#' <cfif
FORM.border#i# GT
"">, #FORM.border#i##</cfif>)
</cfquery>
</cfif>
</cfif>
</cfloop>
</cfif>
What I would like to know is:
1.) Did I write the code above correctly to loop through the
fields and
upload each
2.) Is it better to set each of the file fields manually
(file1, file2,
file3, file4) or to set 1 field and have it loop 4 times
using the i to name
the fields?
3.) Do I have to also set the 'border' form element to #i# to
make them
unique during the loop. I have them set as border1, border2,
border3,
border4 currently. They are radio buttons and have one
selected
automatically so there is no need to evaluate them.
Wally Kolcz
Developer / Support

Hi Mike, You will need to use product grouping here. You will need to make a new product for each and set up the weights etc for that.

Similar Messages

  • Newspaper style report (multiple column sets across the page)

    Hello,
    I have an Answers report that displays the "top 20" and has only 2 narrow columns (name and total). So in the dashboard it looks like a long vertical strip:
    aaa 999
    aaa 999
    aaa 999
    aaa 999
    It would look much nicer if it was a "newspaper style", where you have more than one column set across the page:
    aaa 999 | aaa 999
    aaa 999 | aaa 999
    aaa 999 | aaa 999
    Is this possible to be done using OBI EE? I searched for a "newspaper style" checkbox in the report properties (hoping that it would be that easy) but no luck... I couldnt find any posts in this forum either, maybe I am using the wrong terminology.
    Thanks
    Luis

    Hi Luis,
    yes, this is possible by using a pivot table. assuming you want 10 records per column, you need to do the following:
    1) add a column to your report with this formula:
    RCOUNT(Column) - 10 * FLOOR((RCOUNT(Column) - 1) / 10)
    2) add another column to your report with this formula:
    FLOOR((RCOUNT(Column) -1) / 10)
    3) go to pivot table
    4) add column 1) to Rows Section
    5) add column 2) to columns section
    6) add the other columns in measures box
    7) add aggregation rule to "FIRST" for all columns in measures box
    8) put measure label box in rows section under the box of column 2)
    Regards,
    Stijn

  • Reflection and the field.set method

    OK, I've made 2 classes, a ClearParent and ClearChild (which extends ClearParent). I'd like to have a "clear" method on the parent which dynamically sets all the fields to null. I'd like to be able to have any child that inherits from the parent be able to call clear and dynamically have all it's fields set to null.
    Part of the restriction that I'm facing is that the fields are Objects (Integer) but the getter and setter methods take and return types (int). So I can't just loop through the Methods and call the setters with null.
    I'd like to be able to loop through the fields and call set for all the fields with the parent class.
    I'm inserting the code that I have for the parent and child classes at the end. Basically, the problem that I'm seeing is that if I do a
    this.getClass().getName()
    from the parent (when clear is called from the child) it shows me the child name ("ClearChild"). But when I try to do the
    field.set(this, null)
    it tells me this:
    Class ClearParent can not access a member of class
    ClearChild with modifiers "private"
    How come when I get the name it tells me that it's the child but when I pass "this" to the set method, it says that it's the parent?
    Any one know what's going on here? Is there anyway that I can have the parent set all the fields to null?
    Thanks in advance.
    Here's the code:
    ClearParent
    import java.lang.reflect.*;
    public class ClearParent {
        public boolean clear() {
            try {
                System.out.println(this.getClass().getName());
                Field[] fields = this.getClass().getDeclaredFields();
                Field   field;
                for (int i = 0; i < fields.length; i++) {
                    field = fields;
    field.set(this, null);
    } catch (Exception e) {
    e.printStackTrace();
    return true;
    ClearChild
    public class ClearChild extends ClearParent {
    private Float f;
    public ClearChild() {
    super();
    public float getF() {
    if (f == null) {
    return 0;
    return f.floatValue();
    public void setF(float f) {
    this.f = new Float(f);
    public static void main (String[] args) throws Exception {
    ClearChild cc = new ClearChild();
    cc.setF(23);
    cc.clear();
    System.out.println("cc.getF: " + cc.getF());

    It is an instance of ClearChild that is being used so
    that class name is ClearChild. However, the method
    exists in the parent class and thus cannot act upon a
    private field of another class (even if it happens to
    be a subclass).Ahh...makes sense.
    Why don't you just override clear in the child?We were trying to avoid this because we run into problems in the past of people adding fields to the class, but not adding to the clear, and things not being cleared properly.
    I talked it over with the guys here and they have no problem making the fields protected instead of private. If it's protected, then the parent has access to it and my sample code works.
    Thanks for your help KPSeal!
    Jes

  • How can i get value when the field name is user's defined

    Hi,
    I have a one java method:
    public ResultSet countUserDb(String id) {
    ResultSet rs = null;
    con = dbcon.connect();
    String queryString = ("select count as count from
    db_allocation where user_id='"+id+"'");
    Statement stmt = con.createStatement();
    rs = stmt.executeQuery(queryString);
    When i call it in a jsp file.
    ResultSet counter =db.countUserDb(request.getParameter("id"));
    if(counter.next())
    int x=rs.getInt("count");
    Tomcat said incorrect column name.How can i get the result set when the field name is user's defined.
    Best regards
    Ricky

    You should give the user defined name in the ResultSet.getXXX method to retrieve the column value.
    Example
    SQL:
    Select ename as employeename from emp;
    You should say :
    ResultSet.getString("employeename"); to get the value.
    Alternatively you can retrieve it using column number:
    ResultSet.getString(1);
    Chandar

  • How can i get the value when the field name is user defined

    Hi,
    I have a one java method:
    public ResultSet countUserDb(String id) {
    ResultSet rs = null;
    con = dbcon.connect();
    String queryString = ("select count(*) as count from
    db_allocation where user_id='"+id+"'");
    Statement stmt = con.createStatement();
    rs = stmt.executeQuery(queryString);
    When i call it in a jsp file.
    ResultSet counter =db.countUserDb(request.getParameter("id"));
    if(counter.next())
    int x=rs.getInt("count");
    Tomcat said incorrect column name.How can i get the result set when the field name is user's defined.
    Best regards
    Ricky

    Hi Ricky
    To access pseudo columns you can specify an alias or use the index on the column (e.g. getInt(1)).
    Chris
    NB: you should use bind variables instead of concatenating the id to the SQL statement.

  • Reading multiple result sets using executeQuery

    Hi - We have a database Proc that returns multiple result sets as the out params.
    Following is the line that does the DB call.
    rows = DynamicSQL.executeQuery(sentence : query, implname : "Sql Server");
    The 'rows' param above is able to get only the first result set after. It ignores the rest of the Out params.
    Do we have any way other than changing the proc to send one out param to handle this?
    Thanks!
    VVP

    This worked:
    rows = myDynamic.executeQuery(sentence : SaveQueryForMAPS, implname : "MAPS");
    foreach (row in rows) {
    //status = 0;
    status = row[1];
    display("status" +status);
    Thank you so much for your idea Andrea!

  • Remove  Formatted Search on the field or Delete Formatted Search

    How to Delete or Remove the Formatted Search set on the Field ?
    Appreciate your help.

    Alt-Shift-F2
    Without search
    Update

  • When I upload a single file into a production in FCS I can access all the fields in the metadata set, when I upload a batch of files, I can only access a partial number of fields in the metadata set.  Does anyone know why this happens?

    When I upload a single file into a production in FCS, I can access all the fields in a metadata set.  When I upload a batch of files into the same production in FCS, I can all access part of the fields in the metadata set.  Does anyone know why this happens?

    dredcomm,
    Great answer, and it led me to where to solve the problem.  In the field definition screen there is a category drop down list.  If you choose something other than none from the category drop down list then that field won't appear in the list of fields when you attempt to batch import a group of files.
    Thanks,
    Dave

  • How to set a payload field value only once for multiple instances selected?

    The user needs to set a payload field value and then he can approve the task so the task can continue through the process, that's fine when the user selects one instance and sets the value in the task details section and then clicks the approve button, but how do we achieve the same behavior in a multiple way?, I mean the user can select multiple tasks in the workspace (in this case the details task page is not available and instead the following label appear "Multiple tasks selected") then if the user clicks the Actions drop down -> APPROVE he only gets the message "your request was processed successfully", so how can the user modify the payload field value only once for all the selected tasks so when he clicks APPROVE the value is populated in all the instances selected.
    Thanks,
    Carlos.

    In the action which displays the edit page just set the form idx value before displaying the jsp.

  • How to multiple/ parellal sets of books to generate more than one financial statement based on different (or the same) accounting principles.

    How to multiple/ parallel sets of books to generate more than one financial statement based on different (or the same) accounting principles.
    My Client needs Parallel Ledger in SAP B1 similar like SAP ECC. Is this functionality available ?

    Dear Mr. Nagrajan,
    Thank you for your response. I have already gone through documents but not able to understand. Is there any setup for this ? or its just work around i.e. using template and special field in JV i.e. Ref. 1 /2
    My doubts :
    I understand that Chart of Account structure is one and common for IFRS and other accounting method. We need to create only those account separately ( 2 times with prefix like IFRS revenue account, GAAP Revenue account).
    Now at time of entry, Assume some entries / adjustment are specifically for IFRS and not for other ledger. In this case, What need to do ?
    You have mentioned about DTW approach but do we need to insert all JV's again with other ledger ?
    Someone suggested that if any entry which are specific to IFRS Ledger, We need to user Ref.1 /2 column or Transcation code column and in which we can put IFRS
    Based on this, Need to create 2 seperate template for IFRS and other ledger for all report.
    This is my understanding of Solution in SAP B1. Please help me to clarify my though process
    Please do needful.If you have done implemenation and if you can share doucment, it would be great help.
    Email :[email protected]

  • ? using multiple approval signatures, each locking the fields with collections

    Having fun with LiveCycle to make a "signoff" sheet that will allow a customer to request a "new product" with a PDF form. Once that information is added to our EDR (Eng Design Request) form, I want the form to be forwarded to multiple departments, where each department manager adds their name, date, comments, and then signs the document and forwards it to the next manager. I have it set up with "locking" a "collection fields" with each signature, and that is cool to lock their comments to thier signature, such that someone else can't change their comments without first "clearing" their signature field... just what I wanted, cool,, taking it a step further, I wanted to have the original product data protected such that once signed by one, or more managers (Eng, Sales, President), that the data was locked unless all signatures were cleared. I tried this first by including the product definition fields in every signature's "collection of fields" (set to lock after signing). Thought that would be the ticket, pretty pumped to try it, but once I clear one signature, example the "Eng manager signature" I can go in and mess with the specs and then re-sign the document, and the other signatures are still there, thought I have to clear them, not good,,, 2nd try, I then tried to lock the preceeding "signature field" itself with the next signature (added "sig0" to "sig1" collection) and that worked once, but fell apart on the third approval, as clear one signature openned things right up, when it shouldn't have. Anyway, has anyone found a way to have an approval signoff sheet where once signed the data fields are locked unless all the signature(s) are cleared. I think the programming is not handing multiple locks on the sme field properly, ie all locks on that field must be removed for that field to become editable,, There may be a better way to tackle this..
    PS, I have really learned to be cautious when saving the form out of LiveCyle, then renaming it and save out or "Pro" with read permisions enabled, then see if "Reader" can open it,,, if U R not carefull you get and error that the "document has changed and reader can't save, contact the author,,," that was scary as I had to surf through lots of old revs to find one that would work again, something salvagable without going back to MSWord,,,
    Thanks for your help...

    I think I found a way to get it to do what I want,,,
    1) Use the first signature collection lock to lock only the fields that that person is signing-off on.
    2) The next manager then signs off and locks only his comments and text boxes, as well as the signature of the preceeding manager. This way text fields are only locked by one signature collection and thus to edit anything you have to clear that manager's signature to edit the related text boxes, then to re-sign that section you must clear the other (higher level) signatures to open up the signature field for resigning,,, I think this is providing the protection I want,,, Yea,,, let's get this form back into our stupid ISO system ;)

  • Multiple selection" in the field property in ACROBAT XI

    When the "multiple selection" in the field property is available in FormsCentral, I can't find it  in ACROBAT XI (Just bought it).
    If this field is not available in ACROBAT XI, how can I modifiy the form uploaded (already built) in FormsCentral to be able to use this fonction ?
    What I want to do is to have a mandatory field with several possible answers.
    Comment accéder au champ "sélection multiple" dans Acrobat XI que je viens juste d'acheter ?
    Dans le cas où ce serait impossible (???)
    Comment modifier dans Forms Central un formulaire déjà construit sur Acrobat XI de façon à utiliser cette fonction ?

    Thank you for helping me.
    Unfortunately I'm not sure this is what I'm looking for.
    If I use the Radio Button, every selection are mutually exclusive.
    What I need is to be able to select several responses, but to have to select at least one of them.
    People may have the choice of responding by checking one, two or more items but they must answer the question.

  • When combining multiple PDF's, the field properties change

    When combining multiple PDF's, the field properties for the Font and/or the "Scroll long text" checkbox change settings. What is causing this to happen?

    Thank you for the prompt reply. I do indeed have the same field name across multiple files, but they are all set the same in their individual files.

  • My Bionic will only show the first of a multiple upload of pictures on Facebook?

    My Bionic will only show the first of a multiple upload of pictures on Facebook. A friend that has a Razor on Verizon is able to swipe through all the pictures of a multiple picture upload and see them all one at a time. I also find no way to Share on Facebook from the Bionic.
    Thanks
    jek

    Hi Jek!
    I usually have a bunch of pics I want to upload at once too! Are you going to the Gallery>Select Multiple>Choose Pictures>Menu>Photo Share Facebook? Do you have your Facebook account set up through the application on the device? Are you using Facebook for Android? This needs to be setup in order to share. Let us know!
    Katie H
    VZW Support
    Follow us on Twitter @VZWSupport

  • _layouts/Upload.aspx bypass the dialog to set properties

    I am displaying the _layouts/Upload.aspx page from a custom form, which enables the user to upload a document to a document library.  The problem is that once the user uploads the document a second dialog comes asking the user to set the title of the
    document and the following message "The document was uploaded successfully and is checked out to you. Check that the fields below are correct and that all required fields are filled out. The file will not be accessible to other users until
    you check in."
    I want to bypass this dialog, is this possible?

    Try below:
    http://ratikantas.blogspot.in/2012/07/skip-edititem.html
    http://hristopavlov.wordpress.com/2008/04/30/editformaspx-not-shown-when-uploading-a-document/

Maybe you are looking for