Adding new javascript in LiveCycle script editor

The form has a Print button and already has this javascript xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);
How do I add the following javascript to the same button and its click event?
newDocName = "";
f1 = this.getField("topmostSubform[0].Page1[0].Last_Name[0]").valueAsString;
if (f1!="") newDocName += f1 + " ";
f2 = this.getField("topmostSubform[0].Page1[0].First_Name[0]").valueAsString;
if (f2!="") newDocName += f2 + " ";
f3 = this.getField("topmostSubform[0].Page1[0].Date[0]").valueAsString;
if (f3!="") newDocName += f3 + " ";
f4 = this.getField("topmostSubform[0].Page1[0].Email[0]").valueAsString;
if (f4!="") newDocName += f4;
newDocName = newDocName.replace(/[\\,\/,\:,\*,\?,\",\<,\>,\|,\,,\n,\r]/g,"");
docPath = this.path+"";
docPath = docPath.substring(0, docPath.lastIndexOf("/")+1);
mySaveAs(this,docPath+newDocName+".pdf");
I had this working in Acrobat on an earlier version of the same form (with an external script also in the Acrobat directory -- so it all worked perfectly), but on this form, I don't have full access. My only option is to try to add this javascript to save the file with a new filename by using LiveCycle.

Post your question in the forum for LiveCycle Designer.

Similar Messages

  • Development on SharePoint on-line using JavaScript in an Script Editor

    Hi,
    I’m doing a SharePoint development on SharePoint on-line using JavaScript in a Script Editor. I've changed the Calendar NewForm.aspx  in SharePoint designer and I should check the Start Date and End date and I should change the procedure of Save button.
    The problem is I cannot have the component ID’s. I even tried to create new components and rebuild the form but my script sometimes working and sometimes not working.
    I've also tried SharePoint Apps in Visual Studio 2013 and Napa but I have problems  accessing SP lists.
    Could you please advise me?

    Hi Sachin,
    Before I read you reply, I had a "Eureka" moment that I was about to write about.  I got my Javascipt to read my the value that was set in the Filterdropdown!  However, you somewhat burst my balloon with the revelation about how re-sizing
    window changes their size (i.e., Large to Medium, etc)?  It is true, my function does not work when I click the "restore down" icon on the upper right corner of my window, then it works again when I maximize the window.  That sucks : (
         Oh, well.  Thanks just the same!
    For what it is worth, here is the script I wrote:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
        <script language="javascript">
            //This function reads the digest using /contextinfo.
            function ShowAlert()
                alert(document.getElementById("Ribbon.ContextualTabs.MyWork.Home.Data-Large-2-1").textContent);
        </script>
    </head>
    <body>
    What filter am I set to?  Click the Button snd I will tell you... <input type="button" value="Button" onclick="ShowAlert()";/>
    </body>
    </html>
    \Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada)

  • Adding new metadata in DAM asset editor

    Hi All,
    I have a requirement wherein two projects reside on same instance, apps/ProjectA and apps/ProjectB . Now Project A has DAM customized, ie. a new metadata added and hence files,  /apps/dam/content/asseteditors/formitems and folders with files under  /apps/dam/gui/components have been modified to take care of creation of new metadata. Now my question is, Is it possible to have such DAM changes constrained to projectA alone, and Project B using default DAM?
    Is it possible to overlay DAM inside the apps/ProjectA alone?
    Kindly let me know.
    Regards,
    NZ

    Thank you jorg, so you say by applying ACL and deny read access for project B, and if Dam folder is Overlayed under  apps such as apps/dam, I can restrict modified version of DAM for project B thereby ProjectB using the foundation Dam and have modified version of dam for project A? Please correct me if I am wrong, since I have the jsp's such as child asset and metadata editor jsp modified after being overlayed.
    Regards,
    NZ

  • Length of if statement in script editor is more than two lines

    dear friends
           when i am modifying the purchase order with new purchase organisations in script editor , i found that the line continued to both left and right pages, if i want to extend the line there is no 3 rd page. how can i extend the if statement.
    regards,
    k.srinivas.

    Hi,
    After complete of line , Please Enter Shift+F8.
    Regards
    jana

  • Script to add a new page in LiveCycle

    I am new to LiveCycle so please forgive my ignorance. I have 2 things I am trying to do.
    1. In my fillable form, I want to have default text in the the form field that appears in light gray and disappears automatically when a user clicks in the field to enter text. I know how to add a default but then my user would have to erase the default to add their own information. I don't know if this is an easy thing or if it needs scripting.
    2. I created a button and I want to add JavaScript to it to have it copy the second page of my form and add it as a third page to be filled out too. I don't want to send a form with a bunch of extra pages so I want my users to create new pages as necessary. I know how to view the script editor and I added some script, but it doesn't appear to be correct as I don't get the green or red icons to attach the script to the button and when previewed, the button does nothing. I chose on Click and I understand that the script creates a path to my object with a period in between each object, but I don't understand after the instanceManager.addInstance(true) what I should put. What does the "true" part mean. I thought that I would put the name of the object that I wanted added. Am I close to doing this right or is it much more complicated? Does my button have to be in a subform with the objects or something to work? Am I trying to do something that is possible?
    I wish I could printscreen to this forum.

    For each of the fields that you like to have default value displayed and get cleaned on entry you can have following JS script in "enter" event....
    if (this.rawValue == "<default value for that particular field>") {
         this.rawValue = ""
    and for "exit" event....
    if (this.isNull) {
         this.rawValue = "<default value for that particular field>"
    Hope tha helps with the first issue....
    And with the second question you had....yes it is some thing that can be done with few tricks and little script.
    Your button does not need to be part of that subform...and noting wrong even if it is.
    instanceManager.addInstance(true)     //true is part of syntax however following example can give you better idea
    _secondPageSubForm.addInstance(true) is what you would use in "click" event of the button where "secondPageSubForm" is your subform name to repeat and designed to fit entire page so you can continue adding entire page rather than part of page. And "_" (Underscore) is part of the syntax to recognize the repeating subform.
    And to whole thing work as expected you need to save/render PDF as Dynamic template and set your "secondPageSubForm" as repeating in "Binding" tab.
    Hope that helps, Good Luck,

  • How to create new subsite while adding new item to the list by using javascript?

    hi,
    I hav a task ie, when I add item to the list then subsite will create with that list item title and description . So By using javascript, I have to create subsite while adding new item to the list.
    Help me to solve this.
    Thank you, 

    Is your item getting added through Javascript client object model ? If yes, you can write in the success delegate of your list creation method the logic to create the subsite.
    function CreateListItem()
    var clientContext = new SP.ClientContext.get_current();
    var oList = clientContext.get_web().get_lists().getByTitle('List Name');
    var itemCreateInfo = new SP.ListItemCreationInformation();
    this.oListItem = oList.addItem(itemCreateInfo);
    oListItem.set_item('Title', 'My New Item!');
    oListItem.set_item('Body', 'Hello World!');
    oListItem.update();
    clientContext.load(oListItem);
    clientContext.executeQueryAsync(Function.createDelegate(this, this.CreateListItemOnSuccess), Function.createDelegate(this, this.onQueryFailed));
    function CreateListItemOnSuccess() {
    var subsiteTitle = oListItem.get_item('Title');
    //Logic to create a subsite
    function onQueryFailed(sender, args) {
    I have added a sample flow for the above scenario. Have a look at the following lnk for how you can craete a subsite using ecmascript.
    http://ravisoftltd.wordpress.com/2013/03/06/sharepoint-2010-create-site-with-ecma-script-with/
    Geetanjali Arora | My blogs |

  • "Files" and other tabs not visible for document library after script editor webpart is added

    I created a document library and uploaded a few documents to ti.  On the ribbon, I could see both "Files" and "Library" tabs.  I then added a Script Editor webpart to this page because I needed to run some javascript on this
    page.  Now, when I go to that document library page (AllItems.aspx) then I don't see the Files and Library tab.  My guess is that this is because these tabs are context sensitive so they only appear when Sharepoint knows you're working with a document
    library and since now I have both the webpart that shows the document library and the Script editor webpart, that context is not there.  If I click somewhere on the page close to the actual list of documents, then the Files and Library tabs reappear since
    now Sharepoint knows that I'm working with a document library.  Is there any way aroudn this?  We don't want to have to ask our customer to click somewhere on the screen in order to get access to these tabs.  I'm not sure why Sharepoint would
    be confused by the Script editor webpart.  It is not visible so when the page is not in edit more, you can't even see that Script editor.  So, my question is: is there any way to:
    - either find some other way of using javascript on this page (maybe external javascript file with some link to it on the page?
    - or, some way to force the Fiels and Library tabs to be visible no matter what (i.e. despite having the Script editor webpart on the page).
    I also experienced this issue when I wanted to insert some customized text on the same page that had a document library.  For example, I created a document library and then on the AllItems.aspx page I inserted a content editor webpart so that I can
    show some text at the top.  That also caused the Files and Library tabs to disappear.
    thanks,

    Hi,
    I understand Files/Libraray tab disappear after you add web parts to a document library, once you click somewhere in library list, it will appear again.
    This is by design. As workaround, please try to use SharePoint Desginer to edit Allitems page of document library instead of using script web part.
    https://social.msdn.microsoft.com/Forums/office/en-US/fd1bb098-6425-437c-b3f8-25bf65bcaad3/ribbon-control-disappears-on-sharepoint2013-document-libraries-when-content-editor-web-part-has?forum=sharepointdevelopment
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • MDS, Script Editor WebPart does not load javascript files with script tag

    Hello everyone,
    I have MDS and I would like to use some custom Javascript inside of a script editor web part in a page of my site.
    When I add the references to the libraries I need in the Script Editor Web Part SharePoint is smart enough to disable MDS on that page.
    I would like to be able to load external libraries inside of my Script Editor Web Part (without using ScriptLink or anything that would require the edition of the masterpage) but still using the added value of MDS.
    Can I use SOD for that? What would be the best pattern? Could you provide a simple example?
    Thanks in advance for your help!

    Hi,
    Per my knowledge, including CSS and JavaScript files using HTML style and script tags is not supported in MDS(Minimal Download Strategy).
    We can refer the custom JavaScript file in the .aspx page or master page using ScriptLink control.
    <SharePoint:ScriptLink language="javascript" name="custom_javascript.js" runat="server" />
    The following articles for your reference:
    http://sharepointsnacks.blogspot.com/2014/02/sharepoint-2013-minimal-download.html
    http://tech.bool.se/make-javascript-code-work-with-minimal-download-strategy-part-2/
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Adding new node to the Clusterware fails with the root.sh script.

    Dear All,
    I had successfully added third node to the existing 2 node cluster. After adding new node I need to run the root.sh scripts, but it was faling with the below error.
    Please help me with the below issue:
    Instantiating scripts for add node (Monday, April 8, 2013 3:23:14 PM EDT)
    . 1% Done.
    Instantiation of add node scripts complete
    Copying to remote nodes (Monday, April 8, 2013 3:23:16 PM EDT)
    ............................................................................................... 96% Done.
    Home copied to new nodes
    Saving inventory on nodes (Monday, April 8, 2013 3:31:40 PM EDT)
    . 100% Done.
    Save inventory complete
    WARNING:
    The following configuration scripts need to be executed as the "root" user in each new cluster node. Each script in the list below is followed by a list of nodes.
    /u01/app/11.2.0/grid/root.sh #On nodes svphxwgdbprd06
    To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts in each cluster node
    The Cluster Node Addition of /u01/app/11.2.0/grid was successful.
    Root.SH Script Log:
    [root@svphxwgdbprd06 ~]# /u01/app/11.2.0/grid/root.sh
    Performing root user operation for Oracle 11g
    The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME= /u01/app/11.2.0/grid
    Enter the full pathname of the local bin directory: [usr/local/bin]:
    The contents of "dbhome" have not changed. No need to overwrite.
    The contents of "oraenv" have not changed. No need to overwrite.
    The contents of "coraenv" have not changed. No need to overwrite.
    Creating /etc/oratab file...
    Entries will be added to the /etc/oratab file as needed by
    Database Configuration Assistant when a database is created
    Finished running generic part of root script.
    Now product-specific root actions will be performed.
    Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
    Creating trace directory
    User ignored Prerequisites during installation
    OLR initialization - successful
    Adding Clusterware entries to inittab
    CRS-2672: Attempting to start 'ora.mdnsd' on 'svphxwgdbprd06'
    CRS-2676: Start of 'ora.mdnsd' on 'svphxwgdbprd06' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'svphxwgdbprd06'
    CRS-2676: Start of 'ora.gpnpd' on 'svphxwgdbprd06' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'svphxwgdbprd06'
    CRS-2672: Attempting to start 'ora.gipcd' on 'svphxwgdbprd06'
    CRS-2676: Start of 'ora.cssdmonitor' on 'svphxwgdbprd06' succeeded
    CRS-2676: Start of 'ora.gipcd' on 'svphxwgdbprd06' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'svphxwgdbprd06'
    CRS-2672: Attempting to start 'ora.diskmon' on 'svphxwgdbprd06'
    CRS-2676: Start of 'ora.diskmon' on 'svphxwgdbprd06' succeeded
    CRS-2676: Start of 'ora.cssd' on 'svphxwgdbprd06' succeeded
    ASM created and started successfully.
    Disk Group DATA created successfully.
    clscfg: -install mode specified
    clscfg: EXISTING configuration version 5 detected.
    clscfg: version 5 is 11g Release 2.
    Successfully accumulated necessary OCR keys.
    clscfg: Arguments check out successfully.
    NO KEYS WERE WRITTEN. Supply -force parameter to override.
    -force is destructive and will destroy any previous cluster
    configuration.
    Failed to initialize Oracle Cluster Registry for cluster, rc 105
    Oracle Grid Infrastructure Repository configuration failed at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 6818.

    The document references posted already are very good ones. However, I would say that on personal experience (on Solaris and 10gR2) that the addnode tools gave me nothing but problems. Luckily, I was able to build a parallel cluster (with three nodes) on other hardware and then move the databases across via DataGuard. It was quicker and cleaner (and easier!) that way...
    Good luck!

  • How to auto-update of script logics after adding new dimension members?

    Hi Experts,
    Just wanna ask if BPC has a functionality that would automatically update/validate and save my script logic whenever I add new dimension members. I've added new PL accounts but they are not automatically added to my calculated BS Net Income. I had to re-validate and save my logic for it to be included in my logic and for the amounts to be computed correctly.
    Thanks,
    Marvin

    Hi Marvin,
    There is no functionality as such. we need to configure the script as and when we make any changes in the dimension members.
    Regards
    Raman

  • Script Editor in Snow Leopard painfully slow after adding apps to Library

    I have four different Macs that I use from time to time, and on each of them I notice a constant: adding more items to AppleScript Editor's Library window slows performance of mundane operations (opening a dictionary, switching between Library window and editor window, scrolling in the Library window, etc).
    In Leopard, I noticed little to know latency in opening a dictionary in Script Editor, but Snow Leopard's AppleScript Editor kills my productivity by making me wait on it with most UI interactions with the Library window.

    Hello
    I read another post of yours:
    Topic : Issue with applescript and installer scripts
    http://discussions.apple.com/thread.jspa?threadID=2143147
    It seems that the installer is calling osascript which is run in 64-bit mode under OSX 10.6 whereas XSLT Tools.osax invoked in the script is in 32-bit mode only.
    Until the osax becomes 64-bit capable, you may try setting /usr/bin/osascript to run in 32-bit mode. Perhaps by setting an option in Get Info window in Finder as explained in the AppleScript Release Notes listed earlier. (?)
    I'm not sure but if Finder cannot do it for commands, you'd need to replace 'osascript' with 'arch -i386 osascript' in the installer script (if it's editable) or let /usr/bin/osascript be wrapped via arch(1) so that it is run in 32-bit mode.
    cf.
    http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/m an1/arch.1.html
    Good luck,
    H

  • Interactive Script - Adding new fields

    Hi all,
    Can some one tell me as to how to add new fields to Interactive script ? My requirement is to add a field "Registration" in the interactive script. I do not see the field in the list as of now.

    Hi all,
    Can some one tell me as to how to add new fields to Interactive script ? My requirement is to add a field "Registration" in the interactive script. I do not see the field in the list as of now.

  • Error at Script Editor - ORA-06502: PL/SQL: numeric or value error

    Hello everyone,
    This is my last call for help. I have made some research before i decided to create this thread, trying to find similar problems on the web and on this forum but it seems that this kind of error is associated with another type of situations. In addition, i am pretty new to Oracle DBMS and i do not know how to figure out some problems that happens in this DBMS. This one is very ridiculous because it happens when i load or create a script in Oracle Script Editor. This might be a bug for Oracle Developers figure out and correct for the next releases or updates (or not..).
    Working on:
    Oracle Database 10g Express Edition (Fresh installation - Yesterday)
    Application Express 2.1.0.00.39 (Might be useful information) Windows XP
    Problem:
    I have a script which allows to create a new database with some tables, relations and data filled in. I go to DB Homepage and login, go to Script Scripts menu and upload the script. I open the script to run it and when the Script Editor load it shows this: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    <table style="display:none;position:absolute;background-color:#EEEEEE;border:#000000 solid 1px;padding:0px;text-align:center;font-size:12px;color:#000000;" summary="" cellpadding="0" cellspacing="0" border="0" id="R138352509674476936">
    <tr>
    <td class="htmldbWizardHeader">Save Script</td>
    <td class="htmldbWizardHeader" align="right"><span><img src="/i/qb/vertical_close.png">
    </span></td>
    </tr>
    <tr>
    <td colspan="2" class="htmldbWizardBody">
    <div id="saveDialog">A script with this name already exists. Do you wish to overwrite it?</div>
    <table summary="" cellspacing="0" cellpadding="0" border="0" width="100%">
    <tr>
    <td align="right"><input type="button" value="Cancel" class="htmldbButton">
    <input type="button" value="Yes" class="htmldbButton">
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td colspan="2" align="right">???</td>
    </tr>
    </table>
    <table summary="">
    <tr>
    <td></td>
    <td colspan="1" rowspan="1" align="left"><input type="hidden" name="p_arg_names" value="11141129549203626">
    <input type="hidden" name="p_t09" value="" id="OB_OBJECT_NAME">
    </td>
    <td></td>
    <td colspan="1" rowspan="1" align="left"><input type="hidden" name="p_arg_names" value="11143605700225196">
    <input type="hidden" name="p_t10" value="" id="P0_PPRTIMESTAMP">
    </td>
    <td width="15">
    <div style="width:15px"><br>
    </div>
    </td>
    <td id="htmldbRegion3" class="htmldbTDRight" width="100%" valign="top"></td>
    </tr>
    </table>
    <div id="htmldbRegion4"></div>
    <div class="htmldbFlowV">Application Express 2.1.0.00.39</div>
    <div class="htmldbNewBottom">
    <div class="htmldbNewBottom1">Language: pt</div>
    <div class="htmldbNewBottom2">Copyright ? 1999, 2006, Oracle. All rights reserved.</div>
    <br style="clear:both;">
    </div>
    <form><input type="hidden" name="p_md5_checksum" value="">
    </form>
    <a name="END"><br>
    </a> <script language="JavaScript1.1" type="text/javascript">
        first_field('P60_SCRIPT_NAME');
    </script> The first line seems to be the error: boldORA-06502: PL/SQL: numeric or value error: character string buffer too small*bold*.
    However i don't understand why shows the HTML code. Seems to be the code related with the rest of the Oracle DB webpage where the script in filled in (check this two images to understand what i am trying to say: http://img146.imageshack.us/img146/3104/errororacle10g.jpg and http://img180.imageshack.us/img180/5185/scripteditornormal10g.jpg. This is what Script Editor shows on Internet Explorer.
    If i login and make the same in another browser the behavior is different. In Firefox the script editor don't show anything and with Chrome i get all the script instructions in a single line (it exceeds the Script Editor) and the Script Editor background turns red: http://img812.imageshack.us/img812/1382/oracleerrorchrome.jpg I tested some scenarios and i got other conclusions: When i try to create a script in the Script Editor, whatever i write (instructions or whatever) when i save and load the file shows the same error. I uploaded the script many times with different File Character Set and the error shows in all situations.
    Edited by: 806529 on Nov 1, 2010 3:38 AM
    Edited by: 806529 on Nov 1, 2010 3:42 AM
    Edited by: 806529 on Nov 1, 2010 3:42 AM

    The script that i am trying to run is this: (I think the script is not relevant because many class mates can upload and run it successfully on their Oracle Express 10g installed on Windows 7 or XP)
    drop table alunos cascade constraints;
    create table alunos (alu_id number(10) not null,
                   alu_nome varchar2(60) not null,
                   alu_local varchar2(30),
                   alu_dnsc date not null,
                   alu_sexo char(1) not null,
                   alu_email varchar2(30),
                   alu_cur_id number(10));
    drop table cursos cascade constraints;
    create table cursos (cur_id number(10) not null,
                   cur_nome varchar2(40) not null);
    drop table departamentos cascade constraints;
    create table departamentos (dep_id number(10) not null,
                          dep_nome varchar2(60) not null,
                          dep_sigla char(3) not null);         
    drop table disciplinas cascade constraints;
    create table disciplinas (dis_id number(10) not null,
                        dis_nome varchar2(40) not null,
                        dis_creditos number(1) not null,
                        dis_dep_id number(10));
    drop table planoestudos cascade constraints;
    create table planoestudos (pla_cur_id number(10) not null,
                          pla_dis_id number(10) not null,
                          pla_semestre number(1) not null);          
    drop table inscricoes cascade constraints;
    create table inscricoes (ins_id number(10) not null,
                    ins_alu_id number(10) not null,
                    ins_pla_cur_id number(10) not null,
                    ins_pla_dis_id number(10) not null,
                    ins_dt_inscricao date not null,
                    ins_dt_avaliacao date,
                    ins_nota number(4,2) );
    -- Chaves primárias               
    alter table alunos add constraint pk_alunos primary key (alu_id);              
    alter table cursos add constraint pk_cursos primary key (cur_id);
    alter table departamentos add constraint pk_departamentos primary key (dep_id);
    alter table disciplinas add constraint pk_disciplinas primary key (dis_id);
    alter table planoestudos add constraint pk_planosestudos primary key (pla_cur_id, pla_dis_id);
    alter table inscricoes add constraint inscricoes_pk
                primary key (ins_id);
    -- Chaves estrangeiras
    alter table alunos add constraint alunos_fk_cursos
                foreign key (alu_cur_id) references cursos(cur_id);
    alter table disciplinas add constraint disciplinas_fk_departamentos
                foreign key (dis_dep_id) references departamentos(dep_id);
    alter table planoestudos add constraint planoestudos_fk_cursos
                foreign key (pla_cur_id) references cursos(cur_id);           
    alter table planoestudos add constraint planoestudos_fk_disciplinas
                foreign key (pla_dis_id) references disciplinas(dis_id);           
    alter table inscricoes add constraint inscricoes_fk_alunos
                foreign key (ins_alu_id) references alunos(alu_id);
    alter table inscricoes add constraint inscricoes_fk_planoestudos
                foreign key (ins_pla_cur_id,ins_pla_dis_id) references planoestudos(pla_cur_id,pla_dis_id);
    -- Sequências
    drop sequence seq_alunos;
    create sequence seq_alunos increment by 1 start with 1;           
    drop sequence seq_cursos;
    create sequence seq_cursos increment by 1 start with 1;
    drop sequence seq_disciplinas;
    create sequence seq_disciplinas increment by 1 start with 1;
    drop sequence seq_departamentos;
    create sequence seq_departamentos increment by 1 start with 1;
    -- Informação
    insert into cursos values(seq_cursos.nextval,'Engenharia Biomédica');
    insert into cursos values(seq_cursos.nextval,'Engenharia Informática');
    insert into cursos values(seq_cursos.nextval,'Engenharia Electrónica e Computadores');
    insert into cursos values(seq_cursos.nextval,'Engenharia do Ambiente');
    insert into alunos values(seq_alunos.nextval,'Joaquim Pires Lopes','lisboa',to_date('85.01.01','YY.MM.DD'),'M','[email protected]',2); 
    insert into alunos values(seq_alunos.nextval,'Ana Maria Fonseca','Setúbal',to_date('87.03.03','YY.MM.DD'),'F','[email protected]',1); 
    insert into alunos values(seq_alunos.nextval,'Paula Antunes','Lisboa',to_date('86.07.06','YY.MM.DD'),'F',null,2); 
    insert into alunos values(seq_alunos.nextval,'Joana Ramalho Silva','Costa da Caparica',to_date('84.09.23','YY.MM.DD'),'F','[email protected]',3); 
    insert into alunos values(seq_alunos.nextval,'Rui Manuel Silva','Cascais',to_date('84.08.15','YY.MM.DD'),'M','[email protected]',1); 
    insert into alunos values(seq_alunos.nextval,'João Paulo Santos','Lisboa',to_date('81.11.16','YY.MM.DD'),'M','[email protected]',1); 
    insert into alunos values(seq_alunos.nextval,'Cristina Fernandes Lopes','Lisboa',to_date('86.01.07','YY.MM.DD'),'F',null,1); 
    insert into alunos values(seq_alunos.nextval,'Miguel Pinto Leite','Cascais',to_date('74.01.07','YY.MM.DD'),'M','[email protected]',3); 
    insert into alunos values(seq_alunos.nextval,'Francisco Costa Rosa',null,to_date('78.02.16','YY.MM.DD'),'M',null,4); 
    insert into alunos values(seq_alunos.nextval,'Elsa Fialho Pinto','Palmela',to_date('79.10.29','YY.MM.DD'),'F','[email protected]',1); 
    insert into departamentos values(seq_departamentos.nextval,'Departamento de Sistemas e Informática','DSI');
    insert into departamentos values(seq_departamentos.nextval,'Departamento de Engenharia Electrotécnica', 'DEE');
    insert into departamentos values(seq_departamentos.nextval,'Departamento de Matemática','DEM');   
    insert into disciplinas values(seq_disciplinas.nextval,'Introducao a Programacao',4,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Inteligência Artificial',3,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Redes de Computadores',2,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Base de Dados',6,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Complementos de Base de Dados',2,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Análise de Sistemas',1,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Sistemas Distribuídos',1,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Sistemas Digitais',3,2);
    insert into disciplinas values(seq_disciplinas.nextval,'Microprocessadores',2 ,2);
    insert into disciplinas values(seq_disciplinas.nextval,'Electrónica Geral',3,2);
    insert into disciplinas values(seq_disciplinas.nextval,'Análise Matemática I',4,3);
    insert into disciplinas values(seq_disciplinas.nextval,'Análise Matemática II',4,3);
    insert into disciplinas values(seq_disciplinas.nextval,'Aplicações Multimédia',6,1);
    insert into planoestudos values(1,1,1);
    insert into planoestudos values(1,2,4);
    insert into planoestudos values(1,3,4);
    insert into planoestudos values(1,4,3);
    insert into planoestudos values(1,5,5);
    insert into planoestudos values(1,6,2);
    insert into planoestudos values(1,7,5);
    insert into planoestudos values(1,8,6);
    insert into planoestudos values(1,11,1);
    insert into planoestudos values(2,1,1);
    insert into planoestudos values(2,4,5);
    insert into planoestudos values(2,8,3);
    insert into planoestudos values(2,9,2);
    insert into planoestudos values(2,10,1);
    insert into planoestudos values(2,11,3);
    insert into planoestudos values(3,1,3);
    insert into planoestudos values(3,11,4);
    insert into planoestudos values(3,12,5);                                                             
    insert into planoestudos values(4,1,3);
    insert into planoestudos values(4,4,4);
    insert into planoestudos values(4,11,4);
    insert into planoestudos values(4,12,5);       
    insert into inscricoes values(1,1,2,1,TO_DATE('3-SEP-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),10);
    insert into inscricoes values(2,1,2,8,TO_DATE('5-SEP-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(3,1,2,9,TO_DATE('6-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(4,2,1,1,TO_DATE('23-SEP-2000','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),11);
    insert into inscricoes values(5,2,1,11,TO_DATE('23-SEP-2000','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-MAR-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),13);
    insert into inscricoes values(6,2,1,4,TO_DATE('5-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(7,3,2,1,TO_DATE('5-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2006','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),12);
    insert into inscricoes values(8,3,2,9,TO_DATE('6-SEP-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(9,4,3,12,TO_DATE('5-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-MAR-2006','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),10);
    insert into inscricoes values(10,5,1,1,TO_DATE('7-SEP-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(11,6,1,1,TO_DATE('23-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(12,6,1,11,TO_DATE('23-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(13,7,1,1,TO_DATE('8-SEP-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('10-FEB-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),13);
    insert into inscricoes values(14,7,1,11,TO_DATE('8-SEP-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('7-MAR-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),17);
    insert into inscricoes values(15,7,1,4,TO_DATE('5-SEP-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-JUL-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),15);
    insert into inscricoes values(16,7,1,2,TO_DATE('5-SEP-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-MAR-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),13);
    insert into inscricoes values(17,8,3,12,TO_DATE('11-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-MAR-2006','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),14);
    insert into inscricoes values(18,9,4,1,TO_DATE('7-OCT-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(19,9,4,11,TO_DATE('7-OCT-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(20,9,4,12,TO_DATE('7-OCT-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(21,10,1,11,TO_DATE('11-SEP-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-FEB-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),15);
    insert into inscricoes values(22,10,1,1,TO_DATE('12-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),12);~
    commit;

  • Livecycle scripting help please!

    Hi All,
    I'm new to Adobe livecycle (but have a fair amount of scripting experience), I'm basically trying to get a word count of a text field on my form.  I thought I would be able to do something simple like I would using WSH:
    Mystr="This is a test string with eight words";
    lengthofMystr = Mystr.split(" ").length;
    WScript.echo(lengthofMystr)
    But when I put a similar (But hopefully modified correctly for livecycle) into any event on the text field (using exit event as a test) nothing happens:
    form1.#subform[0].SF2.TextField2::exit - (JavaScript, client)
    Mystr=this.rawValue;
    lengthofMystr=Mystr.split(" ").length;
    xfa.host.messageBox(lengthofMystr, "Test Message", 3);
    Is this possible?  Any ideas?
    Mike

    Mike,
    You were close. Split returns an array, not a string.
    // form1.page1.subform1.foo::exit - (JavaScript, client)
    var wordCnt = new Array();
    var str = this.rawValue;
    wordCnt = str.split(" ");
    xfa.host.messageBox("There are " + wordCnt.length + " words.");
    Steve

  • Step to step guide to adding a javascript

    Hello all
    I need to add a color picker to by apex application
    I have found the Java code ... http://www.flooble.com/scripts/colorpicker.php
    and see it working ... Re: Using color picker
    Does anyone have a step to step guide to adding a large..ish java script to an application?
    i.e. In this color picker example, adding the Javascript to the header is not a problem, I do not understand the second half of code in the context of APEX as itwould you normally copy this into a from.
    All help very welcome
    Regards
    Pete

    Hi Pete,
    I don't get it. I can't look into your workspace so I created a new page myself with only 1 item.
    http://apex.shellprompt.net/pls/apex/f?p=604:6
    1. In the HTML Header of the page I copied the javascript. (copy it from my page again)
    2. I've a textfield item with HTML Form Element Attributes: onChange="relateColor('PICK1135849624', this.value);" name="pxx" 3. And in the post element text: &lt;a href="javascript:pickColor('PICK1135849624');" id="PICK1135849624"
    style="border: 1px solid #000000; font-family:Verdana; font-size:10px;
    text-decoration: none;">   &lt;/a>
    &lt;script language="javascript">relateColor('PICK1135849624', getObj('PICK1135849624FIELD').value);&lt;/script>Can you try with the above steps?
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://www.apex-evangelists.com/
    -- http://www.apexblogs.info/

Maybe you are looking for

  • Unable to populate list items with criteria

    Hi I want to populate some values based on condition in a text field. I tried the code wihtout condition in new form instance and its working fine but when i tried with an condition on when mouse click on list item and its working for first action.If

  • XML files :  how to prevent it

    Hello, today I made a back up of my documents et I discovered an xml files related to this backup. I have also found some private files.xml. I don't know waht I have done to activate this operation. But I would like to know how to stop it. I don't ha

  • Issue in dropping an index when doing Online Index drop and Creation

    Hi All, We have done an implementation, wherein, we are creating Online indexes and dropping them when we have a new Release, and a new build. What we do is, we take the difference in existing DB indexes and the ones present in our script, and then a

  • Error when deploying an EAR

    Hi, I think this is a common error for newbes. When I deploy an EAR I get the following, [24-dic-2009 12:42:35] Inicio de Application Deployer para MyFirstOC4JApp. [24-dic-2009 12:42:35] Copiar archivado en C:\oc4j\j2ee\home\applications\MyFirstOC4JA

  • Error screen after sleep

    Hi, I am new to Macs, coming from windows. Love OS X..... but lately it seems as if Vista were a much more stable operating system! I seem to constantly have a greyed out screen after resuming from sleep mode, with a text in the middle stating an err