Copy Paste On Tabular Form

I have a great need to produce an APEX (version 2.2.1) tabular form in
which users would be able to do Excel-like copy/paste of tabular form
fields from one part of the form to another.
For example, a user would want to somehow (ideally highlight with the mouse - not sure if this is possible) select the first 2 rows of the form and then
copy/paste these to, say, rows 7 and 8, overwriting any values in
those form fields. Or, select field 2 (this would be on row 2) under column A and then copy/paste this field to, say, fields 3 through 10 under the same column A.
I am currently trying to do this using javascript, but am not sure how to go
about it and would appreciate any help or advice.
Thank you very much.
Elie

Hello Vikas.
Thank you very much for creating your sample page. I liked the way you're
duplicating entire rows in the form.
I'm sorry for not responding sooner. I have been under the gun, sort-to-speak
at my work place. I've been playing with another tool (explained below) to see
if it could help me out with my application.
The issue before me is that users need the flexibility of an Excel like interface
in which they are able to do any sort of copy/paste/fill operations as desired
prior to submitting their changes to Oracle. This kind of functionality is what
I've been trying to, if not duplicate, at least get part way there in Apex. And
this is what spurred me on to post my question to you and to this Forum.
I went ahead and dabbled my way through all sorts of javascript (learned an awful lot, I might add) and have come up with a sample tabular form in which I'm able
to copy a single form field to any selected row / column combination in the form.
I've copied my app ( App 19379, Page 12 ) up to the Apex forum.
Here's the link:
http://apex.oracle.com/pls/otn
Workspace = play
Login username = [email protected]
Login password = playtoo
Originally, this app brought up a second page (Paste Page) as a popup in which
users could select which columns and rows they wanted to copy a form field to.
They would then click a "Go" button on this Paste popup page. This "Go" button
would then run a javascript function "do_paste()" in the calling page. This function
would copy the form field to the designated columns and rows. This worked fine.
However, I wanted a solution in which everything is entirely on a single page
rather than having a popup page appear.
And so, I modified my page 12 so that the user could designate the target
columns and rows entirely on the same page (page 12), and so, eliminate
the popup page.
This works to a point.
The user first clicks "Copy". This displays (via a javascript function) the
contents of the selected form field in a text box. This also displays the
target fields "From Column", "To Column", "From Row", "To Row".
The Copy button is replaced with a "Go" button. The user then designates
target columns and rows and clicks "Go". This causes the selected form
field to be copied to the designated targets.
Unfortunately, clicking the "Go" button also causes the page to be submitted.
This submit operation causes the form to be refreshed which then completely
erases the copy action and the form ends up with the original data. The user
does not see that anything has happened. However, under the wraps, my
javascript do_paste() function was invoked but then it's result was reversed
by the submit action.
I do not know how to get around this submit action (which refreshes the form,
thereby reversing my do_paste() function). I could, of course, bring back the
popup page. The paste does work with that. I was just hoping I could do the
copy/paste all on one page.
In any case, this represents my current state with respect to an Apex solution
to my need.
I did in the meantime find another interesting solution to my problem.
Years ago in another job I had worked with a tool called Oraxcel (now
called SQLXL - www.oraxcel.com). This tool is an add-in into Excel and provides an API between Excel and Oracle (as well as various other dbms systems: mysql, sql server, db2, etc.).
Well, I downloaded a free trial copy and have been playing with it.
In a nutshell, I can now allow users to continue using Excel to do
copy/paste/fill operations and provide [ via VBA buttons and macros
that interface with Oracle - actually it is using Oracle's product "Oracle
Objects For OLE (OO4O) ] them the ability to upload the excel data (new and
modified and deleted rows) to Oracle tables, download from Oracle tables (from a package/ref cursor or a table), create Excel LOVs that are dynamically populated from Oracle, and provide validations run from a package and display error
messages to the Excel page.
In effect, Excel becomes the "front end" to my Oracle schema.
As it turns out, in my particular application, Apex pages still play a critical role
as users need to interface with these as well. However, the SQLXL product
appears to be a neat solution allowing users Excel like flexibility to copy,
paste, fill, and other operations that Excel does so well while still interfacing
with Oracle.
Am still playing with this tool and built a small "proof of concept".
In any case, thank you again so much for your help and your sample page.
I would like to incorporate the neat way you're duplicating rows in the form
as I believe this will come in handy in naother APEX app I'm currently
working on in another project at my work place.
Elie

Similar Messages

  • Copy & Paste images to forms from the clipboard

    hello,
    Java Plug-in 1.6.0_33
    Using JRE version 1.6.0_33-b05 Java HotSpot(TM) Client VM
    Forms Applet version is 11.1.2.0
    Windows 7 64bitForms has successfully done the drag&drop,save image file images to javabeans then save & retrieve it from database.
    Laf project has an example of table-block copy/paste from/to the clipboard feature. You can populate a table-block with the content of the clipboard (Excel, Word,...) and also send to the clipboard with the content of a table-block.
    But a how about the copy & paste images to forms?
    It is posible?Any one tried this one?
    Charles
    Edited by: ck on Aug 12, 2012 3:09 AM

    bump...

  • Copy/Paste functionlity is not working in oracle forms 11g

    Hi All,
    We are using custom built big application (oracle 11g/forms 11g).
    1. And few user are not able to copy/paste from oracle forms 11g to winword.And its random sometime they can ,sometime they can't .
    2. If they have problem means they have copy/paste issue and (When we close application and run it again it is working fine)
    3.it's random we are not able to re-produce in development environment.
    What i noticed both user have problem and both are using left hand mouse ,generally we use left/right they are using right/left.
    Here the Environment Detail:
    Java runtime :1.6.0_26
    Weblogic server
    oracle forms 11g
    So just wondering is there any changes required. Seniors/Guru please advise.
    Thanks!

    It is very important to make clear which direction you are going. If you are not able to copy from Forms and paste to an external application, this could be any one or more of the following:
    1. There is a problem with the JRE. Consider uninstalling ALL currentlly installed JREs and install the latest supported version 1.6.0_33
    2. There may have been an issue with the Forms version you are using. Be sure you are using 11.1.1.6 or 11.1.2.0. If not, install the latest patch.
    3. The JRE was unable to properly identify or store the digitial signature in the Forms jar file or one which you included (custom code). If you are using any customer jar files, ensure that they have been properly signed. Also be sure that JRE cache is being stored on the local client machine and not a remote location as this is not supported. If you have not altered the default, the cache is stored in the user's home directory under Application Data (AppData for Win7)
    4. Could be a mouse driver issue. Go to the mouse vendor's web site and get the latest driver for that mouse. Do not use the MS drivers.
    Example:
    C:\Users\<USER NAME>\AppData\LocalLow\Sun\Java\Deployment\cache
    So, recommendations:
    1. Uninstall all JRE versions currently installed. Install 1.6.0_33
    2. Ensure that you are using 11.1.1.6 or 11.1.2.0
    3. Clear the JRE cache. To do this close ALL open browsers and open the Java Control Panel. Look on the General tab for Temporary Internet Files > Settings > Delete Files > Ok
    4. Install the latest mouse driver.
    5. Retest
    Edited by: Michael Ferrante (Oracle) on Jul 25, 2012 2:58 PM

  • Read Only page/region attribute - Tabular form

    APEX 4.2.1/Oracle 11.1
    The new readonly attribute at the page and region level works very nicely to make a page readonly without having to set the readonly condition individually on each page item. Great job.
    But I noticed that tabular form inputs don't honor this setting. Is there a easy way to make a tabular form readonly as well i.e. make it look like a classic report instead of showing input (even disabled) fields?
    I guess we can clone the region as a classic report region and conditionally show one or the other but that's not ideal from a maintenance perspective.
    Thanks

    Marc - Thanks for logging the enhancement request. Couple of observations
    1. The Copy Region wizard allows us to copy a tabular form region (along with its associated processes and buttons) but running the page raises errors since APEX only allows one tabular form per page. Perhaps the Copy Region wizard should check for this
    2. Most tabular form regions are customized after the wizard creates them. Column headings are changed, display types, number/date formats, column links, etc. Re-doing all this to create a copy of the tabular form region as a classic report region is a bit of a chore. Maybe you can think of a easier way to do this in 5.0. Really all that needs to happen is change the Display As for all the tabular form INPUT fields to Display as Text and preserve all other customizations.
    Thanks

  • Error when pasting 1K of text into a text area of tabular form

    This appears to be a bug to me, put please offer suggestions if you have them....
    Using apex with XE, I have created a table with two varchar2(4000) columns in them. The user will paste large blocks of text into one or both of them (e.g paste text copied from e-mail).
    I created a tabular form and set the two fileds to display as "text area". Insert and/or update works fine unless I paste more than about 1 to 1.5 kbytes of text into one of these fileds, in which case I get a page not found error with the following URL:
    http://127.0.0.1:8080/apex/wwv_flow.accept
    After the error page displays, I can hit the back button and then remove just enough text to get it to under the 1 to 1.5 kbytes and then either insert or update works fine.
    One more bit of info. If I create a single row form then it works fine, it is only the multi-row tabular form that seems to have this issue.

    I don't think the character set is the problem. I used a string of numbers 0123456789 and just copied and pasted it repeatedly to build up the text. The database character set is WE8MSWIN1252.
    Regarding the apache log. I have to admit that I don't even know if I'm running apache. I am using a newly installed Oracle XE on a laptop in order to get some experience with application express. This app is the first one I've done. If someone will direct me to the log then I'll be glad to check it and post the relevent contents.
    I signed up for an apex workspace and intend to see if I can recreate the error from there so I can see if the problem is just in the free version of apex that comes with the Oracle Express Edition for windows database.

  • Copy/Paste more than 64K from Excel to Oracle Forms

    We need to copy from Excel more than 64K of data into Oracle Forms 10g. After the copy/paste action. The data will be split and saved in the database. The data contains 6000 fields of each 14 characters.
    What we tried: Create a Long field in forms (maximum size 64K) and process the data which is in this field. But by using PLSQL the maximum size is only 32K. So currently we can only copy and process 32K at a time.
    Is there a way to process over 64K from an excelsheet via Oracle Forms 10g R2?
    Can it be done via Java and how?
    Is it possible to read the clipboard in parts of 30K blocks and paste it in the Long field block with multirecords?
    Restrictions:
    We are not allowed to do file upload and process it on the server side.
    Thanks for your help!

    Hello,
    In the form, you can use Text Items that have datatype as long, so you can strore 64K.
    I do not understand the problem with the PL/SQL, because you can pass 32Ko chunks as many as needed.
    <p>Also, see this article</p>
    Francois

  • How can I copy a number of like fields and paste to reduce form creation time?

    How can I copy a number of like fields and paste to reduce form creation time?

    Creating Form Fields by Ted Padova

  • Copy/paste of multiple fields in form to eg. Wordpad

    Does anyone know if it is possible to mark more than one screen field in a form so that ctrl-C ctrl-V can be used to copy all the information in one single operation to a text editor outside the Forms environment.

    Not with Copy Paste - however the normal way of doing this kind of thing is to write some kind of Export Function which writes the data in all the fields into a suitable file - usually something line a CSV file using Text_IO.

  • Copy & Paste data into Planning form in Workspace 11.1.2.2

    Hi there!
    I'm dealing with a weird problem with Planning 11.1.2.2 over workspace. I cannot paste copied data into data forms (whether I copy from an Excel sheet, a file, or another cell of the same form).
    However, when I access Planning directly through :8300/HyperionPlanning/LogOn.jsp (old-styled Planning), pasting data works fine.
    I tried using Ctrl + V and menu buttons, and didn't work.
    Thanks in advance!

    Hi,
    Not sure which web browser you were working on, but this is from the 11.1.2.2 Known issues for Planning
    12360405 -- With Firefox, you cannot copy and paste data from Microsoft Excel into a Planning form.
    Hope this helps..!!
    Thanks,
    hyperionEPM
    Please mark answers as helpful or correct for others to find them easily.

  • Copy&paste from a file excel to Adobe Interactive Form

    Hi all
    my project is based on WDJ and Adobe Interactive Form.
    I need to know if it is possible to do a copy&paste from a file excel to my Adobe Interactive Form.
    Can I copy an area of data from an Excel spreadsheet (set of contiguous rows and columns)
    and paste them into a text field of my form, preserving the formatting (font, size, structure of coloums/rows,...)?
    Can you help me please?
    Thanks!

    You may try posting this question in either the Designer or Forms forum.
    This forum is for the LiveCycle PDF Generator ES product - a server side document conversion module.  If you want to convert the entire Excel spreadsheet to a PDF server side, then PDF Generator is the correct tool to use.

  • Update pages in form by import then copy/paste

    I have inherited a dynamic interactive PDF. Essentially what they did was take multiple pdfs and put them in one, visually shown below.
    form1.pdf, 1 page-----
    |
    form2.pdf, 2 pages----
    |---------> formall.pdf
    form3.pdf, 4 pages----
    |
    form4.pdf, 3 pages----
    |
    etc...----------------
    Well now they have made massive changes to form2.pdf and form4.pdf and I am supposed to update formall.pdf.
    Is there any way to pull NewForm2.pdf into the existing formall.pdf, and then copy/paste the fields from the current form2 in formall.pdf onto the new one, then delete the old form2 pages?
    The changes in NewForm2 are extensive and it would take quite a while to just redo form2 inside formall.
    I do not think they thought about updates when they created formall.pdf. I would like to separate the forms and use something like Forms Server, or even add each form into a library where I could add the new version and create a new formall, but I do not have time.
    The only tools I have are LiveCycle Designer 7 and Adobe Reader 7.05. I do NOT have Acrobat.
    I have seen several posts about inserting pdfs from Designer into Acrobat to update, but not inserting pdfs into Designer to update.
    I tried importing NewForm2.pdf into Designer with formall.pdf already open, but it always creates a completely new form.
    Thanks

    I exported a PDF from Pages v5.2.2. This uses Apple's Quartz PDFContext, not Quark.
    In Windows 7, I opened this PDF with Adobe Acrobat Reader v11.0.09. I then copied/pasted a paragraph of this PDF content into LibreOffice Writer (v4.3.2.2). Since there was Baskerville in Windows 7, this comment pasted correctly including font-size. I did not have to make any adjustments to LO to accept this text.
    On Ubuntu Linux 14.04, with the latest updates, I opened the same PDF in Evince, the default PDF viewer. Adobe does not offer an Acrobat Reader download for Linux. Again, I copied and pasted a paragraph of content from the PDF viewer into LibreOffice Writer. As there was no Baskerville installed, Writer defaulted to the Liberation font, at the correct point size.
    In either of these platform scenarios, there were no anomalies with sentence/paragraph newlines .vs. carriage return issues from the PDF document during copy/paste operations. These were default control-v pastes that did not use the Paste Special menu item in LibreOffice.

  • How to do a copy/paste of a question (and the possible answers) in a form ?

    Bonjour,
    Comment peut-on réaliser un copier coller d'une question (et des possibles réponses) dans un formulaire ?
    Merci de vos réponses.
    Hello,
    How to do a copy/paste of a question (and the possible answers) in a form ?

    Hi chrisweb86,
    Can you please elaborate the complete workflow you are trying to perform?

  • MRU process on Tabular Form

    Hi,
    I have a table based form wich has has his Automated Fetch/Automatic updates processes.There is a page item P1_ID wich I set up to be returned from AutomaticRowProc with 'Return Key Into Item' P1_ID.When I create a row I see in debug that P1_ID has the proper value (returned by a 'before insert' trigger).
    On the same page I have also a Tabular Form wich has a column COLID wich has the 'defaul value' = P1_ID .
    AutomaticRowProc has sequence=10 , ApplyMRU has sequence = 20 . Both processes fires on Request=CREATE.
    How to make that ApplyMRU proces to set the value of COLID = P1_ID ?
    Thankyou.

    Hi David,
    If it's going to be anywhere, I would have thought it would be on the APEX_APPLICATION_PAGE_RPT_COLS view. Assuming that Apex outputs in the DISPLAY_SEQUENCE order, and ignoring items that won't involve an fnn item on the page (eg, those with WITHOUT_MODIFICATION in the DISPLAY_AS_CODE column), that should result in the values you need.
    However, and there's always an "however", I've had instances in the past where the order of the columns in the report definition does not match the order of the fnn values. Usually, either because the page has been copied or because I've done things with the columns after the initial creation (more them about or added new ones, for example). I have to say, though, that this was on older versions on Apex and I haven't really double-check things on Apex 4 (except that I've noticed that copying tabular forms doesn't work properly!).
    Andy

  • Tabular Form: Conditional column based on another column in table/form?

    Hi!
    I have 4 columns in table A:
    number (the question number)
    question (the question to be asked)
    type (TEXT, LOV are the 2 valid values)
    answer (the answer with text or a selection from the lov table below)
    I have 2 columns in table B:
    number (the question number)
    values (a single value for the lov's)
    In table B there can be mutiple rows for each number. Table A and table B
    join on the number.
    I want to build a tablular form on table A where for each row either a text
    box or a select list is displayed depending on the contents of the type column.
    So row 1 would display a text box when the type value is text; row 2 would
    display a select list when the type value is lov.
    Is this even possible? How do I refer to the type column in the conditional for the
    answer column? I am guessing that I will need to have 2 answer columns one
    that displays when the type column is TEXT and one that displays when the
    type column contains LOV. This is OK. Setting up the conditional is display is the issue at this point.
    Hopefully I have explained this well enough! :)
    Thanks!
    Dave Venus

    Hi Dave,
    Sorry for not responding sooner - I finish work at 3pm GMT.
    I'll take your first question first (3:28PM posting according to my display - not sure if you are on GMT time?):
    As far as I understand it, using the select_list_from_query() function generates the options that are required in the select list as HTML tags. Each instance of this function should create a SELECT tag and the results of the query should generate one or more OPTION tags within it.
    Second question (4:20PM posting):
    The HTMLDB_ITEM functions are listed in the documentation - here's a link to the online version:
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14303/api.htm#sthref2524
    Most of the examples that I have seen have been on this forum - simply search for HTMLDB_ITEM or one of its functions.
    I tend to leave the generation of tabular forms to the wizard as much as possible. The only exceptions are when I need to have access to more than the Primary Key for a row but don't want to show the field on screen. There are examples on the forum about concatenating the HTMLDB_ITEM functions into a single value - this hides ID fields from the user but makes them available to PL/SQL code.
    Third question (5:29PM posting)
    I did try using DECODE in my questionnaire but not for the feature that you needed. Originally, I wanted to use this to display one of a number of different fields (ie, my date, number or string field as appropriate to the question) but this didn't help as I couldn't get back to the right field during the update. If you have decode working for the select lists, then that's great!
    The first column should be hidden or sitting behind a checkbox as this should be the Primary Key for the row and should not be editable by the user nor would it normally be displayed.
    As long as your select statement creates the correct output (albeit that you may need to work on the layout!), you should have an updatable form. However, you will need to have the MRU processes in place and the appropriate buttons that trigger these. When I did my questionnaire, I created the form using a wizard to get all of the processes and buttons and then changed the select statement. If you haven't got the processes and/or buttons, we can go through adding these onto your page.
    Last question (9:08PM posting)
    As explained above, column 1 should normally be hidden. The INPUT tag you detail above is what I would expect to see. The value="6" attribute indicates that 6 is the Primary Key for that row - every row will have the same tag but different values for the "value" attribute. So, if it is hidden and these are the tags you see doing a View Source on the page, then everything is correct.
    OK. So now we have the data on screen and (hopefully?) we have the correct processes and buttons on the page.
    The next step would be validation and update of the data.
    Validation of the data can be handled by a normal page process - I can let you have example code if you want to validate the data (this will also explain how to loop through the rows - there are also methods that you can use to do this in javascript if you want). Updates should be handled by the processes and buttons on the page - again, if you haven't got these we can go through adding them in (although, if you haven't yet formatted your page, you may find it quicker to copy your select statement and create the page again using the same select statement).
    ORA-20001 errors are user defined errors. Do you mean the "data has changed" errors? If so, you will probably need to include the MD5 checksum functionality (it's shown in the document linked above).
    Finally, we'll keep this thread going so that you have all of your workings and my responses in one place, if that's ok with you?
    Regards
    Andy

  • Column value substitution in tabular form element attributes

    We started to discuss this at Re: Tabular form with Ajax
    I also mentioned this at Re: how to make only some rows editable in html db.
    but thought that this deserves its own thread.
    In Doug's sample Sudoku application in that thread, he uses #COLUMN# substitution in the Form Element Attributes and it works fine, but in my example page at http://htmldb.oracle.com/pls/otn/f?p=24317:219 I used the same technique and no matter what I do, the #COLUMN# substitution is not expanded by the Apex engine.
    This is driving me nuts, any ideas why it works in one application but not in another?
    Thanks

    Hm, you might be right.
    I copied your row template and modified it at http://htmldb.oracle.com/pls/otn/f?p=24317:219
    The styling looks terrible, not sure why, the template is simply
    <tr>
    <td class="t10data">#EMPNO_DISPLAY#</td>
    <td class="t10data">#ENAME#</td>
    <td class="t10data">#JOB#</td>
    <td class="t10data">#MGR#</td>
    <td class="t10data">#HIREDATE#</td>
    <td class="t10data">#SAL#</td>
    <td class="t10data">#COMM#</td>
    <td class="t10data">#DEPTNO#</td>
    </tr>I had a lot of trouble getting this to work because the wizard generated tabular form appends 2 hidden fields containing the PK and the row-checksum to the last (editable?) field on each row. If the last editable field has #COL# substitution, it expands the substitution and forgets to close the INPUT tag thus causing malformed HTML (I think this is a bug in the rendering engine).
    The readonly condition is sal>1000 which now works. The SAL>1000 fields are now readonly.
    But now the update process is broken. If I enter a number in the first blank SAL field (empno=3641) and click Submit, I get no errors but the change is not saved. Wonder why.
    Hopefully, Scott (Spadafore) will take mercy on our amateurish experiments and give us some definitive answers soon!
    Thanks.

Maybe you are looking for