Apply Script to multiple fields

I have a form with multiple fields that will contribute to a total. Is there a way to have script apply to multiple fields that will auto update the totals, instead of scripting a separate exit event for each field.
Thank you

Create a Script Object. In that object, you can have a function like this:
function addMyFields() // add values in the fields
var number1 = field1.rawValue;
var number2 = field2.rawValue; // and so on
var sumOp = number1 + number2; // + number3 + .... and so on
totalField.rawValue = sumOp; // display sum in total field
Paste the following code in the exit event of each field:
ScriptObjectName.addMyFields();
Let me know if it works for you.

Similar Messages

  • Import Format script required to update multiple fields

    Further to my previous post yesterday (Import Format script required to work across multiple fields I now need my import script to update multiple (two) fields at the same time, based on criteria set across multiple fields. So far, I can use DW.Utilities.fParseString to assess the values across multiple fields, but I now need to update not only the field in question, but also an additional field at the same time. For example:
    Function TBService(strField, strRecord)
    ' How do I update a second field at the same time?
    Dim strField2 As String
    If Left(strField, 1) = "S" Then
    If DW.Utilities.fParseString (strRecord, 3, 8, ",") = "B1110" Then
    strField2 = "N101"
    Else
    strField2 = "Network N/A"
    End If
    TBService = strField
    Else
    TBService = "Service N/A"
    End If
    End Function
    Is this even possible? Should I be looking at creating an event script which would work post-import? Or can this be done right here in the import script?

    All the logic you require can be encapsulated in the import script for the second field. You don't need to reference the second field in the first import script.
    Edited by: SH on May 2, 2012 5:39 PM

  • Combo box with multiple variables pre populating multiple fields and max value validation script help

    I am creating a pdf form that will be used as a calculator, and my javascript knowledge is pretty rudimentary. I can do the simple things, some of what I need to do is over my head.
    1. I believe I need to use a combo box to pre populate certain fields. I have 13 variables in the dropdown to choose from, and whatever the client chooses will pre populate three other fields (and each of the 13 variables will populate those three fields differently). I'm not exactly sure how to go about doing this. Is it custom keystroke script or does it require a document script? Also, I'm guessing that whatever script will be a series of if/then statements, correct?
    2. Once all the fields have been populated (be it pre population or filled in by the customer), I need to calculate the answer which is not my main problem—I already have the proper calculations in place and they work. The problem is that the answer has a maximum value even if the actual value goes over that max number. So, the actual answer is 14 but the max value can only be 12. How do I get the calculation to replace that actual number (14) with the max number (12)? Is that in the validation tab or should that go elsewhere?
    I feel like I know just enough to be dangerous but not terribly effective. Any help is appreciated.  
    Thanks!

    1. There is a tutorial on this here:
    http://acrobatusers.com/tutorials/change_another_field
    2. To set the maximum value to 12, try this as the custom calculation script for the field:
    //Custom calculation script
    //Get value of text field
    var a = this.getField("Text1").value;
    //If it is > 12, then make it 12
    if (a > 12){
    a=12
    event.value = a
    You need to replace "Text1" with the name of the field in your form.

  • New to the product - question about validating multiple fields as a group

    I have a static form that I'm building from a word document.  Part of that form requires a person to fill any 3 out 5 text fields.
    Since it looks like scripts are applied on a field by field basis, is it possible to have a script that encompasses multiple fields? 
    Would any script need to be applied to each field in turn?
    Assuming the answer to question 1 is a yes, how would you script it to require x number of fields out of a total of y to have some sort of content in order to validate?
    I'm pretty familiar with JavaScript and am looking at the Scripting reference guides but was hoping for a helping hand to get me there quicker as I'm in a bit of a time crunch - doing 18 forms with validation and database connectivity by January 15 certainly qualifies in my book.
    I would assume you'd do something like this but am unsure of the syntax...
    Get values of each field
    Set a valid counter variable for the number of fields with content
    If field 1 is not empty, increment the valid counter
    (rinse and repeat)
    if the valid counter is less than 3 throw an error message
    Many thanks in advance for any help offiered

    1). Yes, scripting within Livecycle can be for a single field or even static text, images and other artifacts within the PDF. Really anything, within Adobe's reason, when it comes to scripting.
    2). It depends on what you want to do. Things like field validations, calculations and other instances where fields are tied togther really dictate how the script runs.
    3). Fields that have calculations or validations with them work in the same, I believe. So for example I have a PDF that I made that is an Excel-type sheet that contains a few hundred cells and every single one has some type of validation or calculation associated with it. I generally run the calculations/validations from the user inputting the data and then after that the script runs, but again, it really dpeneds on what you are doing and with what, so answering some of your questions are a bit difficult.
    Javascrip/Formcalc are wonderful tools within PDF, but don't forget the Action Builder (Tools -Action Builder). It is a set of preloaded actions that are turn-key. Just select the cells that will have the action and select the result you want from the preloaded list of actions, using those actions can get you very far, and most of all; they are quick to implement without researching code. So for example, you could use the Action Builder to create an action that checks certain fields and if they are null to return a 1 value to a specific numericField (these could be hidden). Then have a "total" numericField (this would be your counter) that adds all of those fields with the 1 in it. Then create another Action Builder for that "total" numericField and if it is less than 3, display a message box that is a warning.

  • I have a list a and want to use (CSR) Jslink to change the view but multiple fields

    I have a list but want to use CSR - jslink to change the view of multiple fields. Can a jslink have multiple fields to change. Looking at the samples
    here
    Would like to merge 2 or 3 script in one to do multiple things. Is this a best practice?
    Thanks in Advance
    Code snippet here below(tried this but not working for me.Sure im missing something): Trying to combine the prioritycolor and percentagecomplete together but not working
    // Create object that have the context information about the field that we want to change it's output render
    var fieldsContext= {};
    fieldsContext.Templates = {};
    fieldsContext.Templates.Fields = {
    // Apply the new rendering for Priority field on List View
    "Priority": { "View": priorityFiledTemplate },
    "PercentComplete": {
    "View": percentCompleteViewFiledTemplate,
    "DisplayForm": percentCompleteViewFiledTemplate,
    "NewForm": percentCompleteEditFiledTemplate,
    "EditForm": percentCompleteEditFiledTemplate
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(fieldsContext);
    // This function provides the rendering logic for list view
    function priorityFiledTemplate(ctx) {
    var priority = ctx.CurrentItem[ctx.CurrentFieldSchema.Name];
    // Return html element with appropriate color based on priority value
    switch (priority) {
    case "(1) High":
    return "<span style='color :#f00'>" + priority + "</span>";
    break;
    case "(2) Normal":
    return "<span style='color :#ff6a00'>" + priority + "</span>";
    break;
    case "(3) Low":
    return "<span style='color :#cab023'>" + priority + "</span>";
    // This function provides the rendering logic for View and Display form
    function percentCompleteViewFiledTemplate(ctx) {
    var percentComplete = ctx.CurrentItem[ctx.CurrentFieldSchema.Name];
    return "<div style='background-color: #e5e5e5; width: 100px; display:inline-block;'> \
    <div style='width: " + percentComplete.replace(/\s+/g, '') + "; background-color: #0094ff;'> \
    &nbsp;</div></div>&nbsp;" + percentComplete;
    // This function provides the rendering logic for New and Edit forms
    function percentCompleteEditFiledTemplate(ctx) {
    var formCtx = SPClientTemplates.Utility.GetFormContextForCurrentField(ctx);
    // Register a callback just before submit.
    formCtx.registerGetValueCallback(formCtx.fieldName, function () {
    return document.getElementById('inpPercentComplete').value;
    return "<input type='range' id='inpPercentComplete' name='inpPercentComplete' min='0' max='100' \
    oninput='outPercentComplete.value=inpPercentComplete.value' value='" + formCtx.fieldValue + "' /> \
    <output name='outPercentComplete' for='inpPercentComplete' >" + formCtx.fieldValue + "</output>%";

    Hi Patrick,
    It works in my test environment using your code.
    I suggest follow the steps as below:
    1. Save the following code as a js file (TaskListView.js) and upload it into the SiteAssets Document Library.
    2. Edit the list view page.
    3. Edit the list web part. Go to Miscellaneous -> JS Link.
    4. Add the following URL into the JS Link textbox.
    ~site/SiteAssets/TaskListView.js
    5. Click "OK" and save the page.
    If it still not works, please check whether active the Minimal Download Strategy feature in site feature or not.
    Best Regards
    Dennis Guo
    TechNet Community Support

  • [Forum FAQ] How to use multiple field terminators in BULK INSERT or BCP command line

    Introduction
    Some people want to know if we can have multiple field terminators in BULK INSERT or BCP commands, and how to implement multiple field terminators in BULK INSERT or BCP commands.
    Solution
    For character data fields, optional terminating characters allow you to mark the end of each field in a data file with a field terminator, as well as the end of each row with a row terminator. If a terminator character occurs within the data, it is interpreted
    as a terminator, not as data, and the data after that character is interpreted and belongs to the next field or record. I have done a test, if you use BULK INSERT or BCP commands and set the multiple field terminators, you can refer to the following command.
    In Windows command line,
    bcp <Databasename.schema.tablename> out “<path>” –c –t –r –T
    For example, you can export data from the Department table with bcp command and use the comma and colon (,:) as one field terminator.
    bcp AdventureWorks.HumanResources.Department out C:\myDepartment.txt -c -t ,: -r \n –T
    The txt file as follows:
    However, if you want to bcp by using multiple field terminators the same as the following command, which will still use the last terminator defined by default.
    bcp AdventureWorks.HumanResources.Department in C:\myDepartment.txt -c -t , -r \n -t: –T
    The txt file as follows:
    When multiple field terminators means multiple fields, you use the below comma separated format,
    column1,,column2,,,column3
    In this occasion, you only separate 3 fields (column1, column2 and column3). In fact, after testing, there will be 6 fields here. That is the significance of a field terminator (comma in this case).
    Meanwhile, using BULK INSERT to import the data of the data file into the SQL table, if you specify terminator for BULK import, you can only set multiple characters as one terminator in the BULK INSERT statement.
    USE <testdatabase>;
    GO
    BULK INSERT <your table> FROM ‘<Path>’
     WITH (
    DATAFILETYPE = ' char/native/ widechar /widenative',
     FIELDTERMINATOR = ' field_terminator',
    For example, using BULK INSERT to import the data of C:\myDepartment.txt data file into the DepartmentTest table, the field terminator (,:) must be declared in the statement.
    In SQL Server Management Studio Query Editor:
    BULK INSERT AdventureWorks.HumanResources.DepartmentTest FROM ‘C:\myDepartment.txt’
     WITH (
    DATAFILETYPE = ‘char',
    FIELDTERMINATOR = ‘,:’,
    The new table contains like as follows:  
    We could not declare multiple field terminators (, and :) in the Query statement,  as the following format, a duplicate error will occur.
    In SQL Server Management Studio Query Editor:
    BULK INSERT AdventureWorks.HumanResources.DepartmentTest FROM ‘C:\myDepartment.txt’
     WITH (
    DATAFILETYPE = ‘char',
    FIELDTERMINATOR = ‘,’,
    FIELDTERMINATOR = ‘:’
    However, if you want to use a data file with fewer or more fields, we can implement via setting extra field length to 0 for fewer fields or omitting or skipping more fields during the bulk copy procedure.  
    More Information
    For more information about filed terminators, you can review the following article.
    http://technet.microsoft.com/en-us/library/aa196735(v=sql.80).aspx
    http://social.technet.microsoft.com/Forums/en-US/d2fa4b1e-3bd4-4379-bc30-389202a99ae2/multiple-field-terminators-in-bulk-insert-or-bcp?forum=sqlgetsta
    http://technet.microsoft.com/en-us/library/ms191485.aspx
    http://technet.microsoft.com/en-us/library/aa173858(v=sql.80).aspx
    http://technet.microsoft.com/en-us/library/aa173842(v=sql.80).aspx
    Applies to
    SQL Server 2012
    SQL Server 2008R2
    SQL Server 2005
    SQL Server 2000
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • I have a PDF form that I want to pre-fill multiple fields with example text that disappears onFocus. Is there a way to do this?

    Pretty much what my subject line says. My client wants example text in the fields of a PDF form that will disappear when the cursor enters the field. When I try this with show/hide layers, the layer becomes visible as soon as I enter form editing mode, and the action doesn't work properly. Any help? I was able to get it to work with a single field, but multiple fields with example text on multiple layers doesn't work for some reason.
    Thanks for any help.

    Hi Jeffrey ,
    You need to use a custom Format script for the field.
    Regards
    Sukrit Dhingra

  • What is the best way to set property to multiple fields?

    Dear Experts
    My requirement is, I want to allow user to fill only some specific fields in the form. When user A opens the form, he may be able to fill Field1~Field10. And when user B opens the form, he may be able to fill Field11~Field20.
    I have implemented one solution as below to do this but the performance is poor.
    - Recursively poppulate all fields into array
    - Iterate all fields to make it read only (Field.access = 'readOnly')
    - Iterate all fields and compare with enabled fields list, if any field matchs then enable it (Field.access = 'open')
    (I have list of enabled fields for each user like this : form1[0].page1[0].ProjectNumber[0],form1[0].page1[0].CustomerName[0],form1[0].page1[0].Fi nishedGoodsNo[0],......)
    Is there a better way to reference multiple fields to set their property?
    I know, we can reference multiple fields using FormCal like Field[*] but is it possible to complete my case?
    Any suggestion?
    Thanks

    We make web application which accept the form designed by end user. So we try to make them most comfortable to use LyfeCycle Form Designer by creating tds template for them and it contains the script which enable/disable fields. So the user don't have to set all fields to read only. Our script will do it.
    Anyway I will adjust when enabling them.
    One more doubt.
    When I type in the script editor, it lists member :
    - all, the hint says "Returns the collection of like-named, in-scope nodes. If the node has no name, a like-classnamed collection is returned."
    - classAll, the hint says "Returns the collection of like-class, in-scope nodes."
    Can I get all fields by these member? get fields from class?
    It would be good if it can do.
    I try to check XFA reference and use them but cannot get how it work.
    Could you please suggest?
    Thanks

  • Copy Field Formats into multiple fields

    I have a form that has a spreadsheet layout. Multiple fields need to be formatted as currency or date. Outside of using Java scripts is there a way to copy the formatting of one filed to multipe others? I want to avoid Java script because I'm lousy with it.

    Is it possible to have each field separated by a comma? Space
    delimiters won't work since not all cities & states are one
    word (ie. New York, New York) however a comma delimiter would allow
    you to use simple list functions to extract the data.
    If this isn't possible but the data is always in the format:
    city<comma>state<space>zip, then you could extract the
    city using comma as the delimiter and then extract the zip code
    using the ListLast() function with space as the delimiter which
    would leave you with the state as the remaining text. This would
    only work however if your data is consistently in the format
    described above.
    Failing this you could build two tables with states and
    cities and then use them to identify valid states and cities and
    extract the data that way.
    cheers

  • Copy text from multiple fields to one field

    I would like to copy text from multiple fields into one field. Each of these smaller fields will only be allowed to have one character. The larger field will not be able to be edited.
    So far, I have thought of creating a naming heirarchy for these fields. I was going to then call upon the array of the parent and set the value of the parent to equal this array.
    var parent = this.getField("everything");
    var array = everything.getArray();
    var v;
    for(parent=0; parent<array.length; parent++)
    v = a + " " + v;               //Im guessing this line is incorrect
    parent.value = a;
    Any suggestions? or a better way of doing this.
    Thanks

    The code sample you provided is using AcroForm scripting and will not work in this form. There is another post similar to this one...have a look at this one it might help you out. It is doing the opposite of what you want but the concept of the loop and how each field is addressed inside ofthe loop is what you wil need.
    http://forums.adobe.com/message/2954517#2954517
    Paul

  • LOVs again!  How to return multiple fields to calling form

    Hi
    Newbie question, any help GREATLY appreciated :)
    Is there a simple and easy way to return more than one field from a LOV.
    I need this as I have a composite fk comprised of 2 fields, and as such need to return 2 fields from the LOV to the calling form.
    (My environment: JDeveloper 9.0.5.2 build 1618)
    CM

    Thanks, you put me on the right track here. Further investigations show the following sample provided by OTN shows how to use both the session request/response values or a JavaBean to do this:
    http://www.oracle.com/technology/sample_code/products/jdev/10g/ADF_UIX_UserInput.zip
    As such I post my solution to my original post. Hopefully it's useful to someone beside myself. I have to write up my notes anyhow so it's no fuss to submit them to the forum. I must admit I'm a newbie and slightly demented Forms programmer so such solutions aren't so obvious to me. With this in mind please include the "standard disclaimer" here, with the addition "mileage may vary" warranty.
    For these notes I've used the "HR" demo Oracle schema. In particular the tables departments and employees. As you know there is a master-detail relationship between these 2 tables, where each department may have one or more employees.
    We have the requirement on a webpage to:
    1) Provide an input-form-with-navigation to edit the employees.
    2) Display the relating department_name field, rather than just showing the department_id which is meaningless to the user. For example if the employees.department_id = 40, we wish to show the department name "Human Resources" on the employees record.
    3) Provide a LOV for the department ID field to allow the user to change the underlying department_id to a different master departments record.
    4) Update 2) given a change via 3).
    To do this do the following:
    Entity Objects
    1) Create default EO/VOs on both tables.
    2) In the employees EO, create a new field "DepartmentName" to represent the derived department name field.
    3) Set the new EO attribute's selected-in-query field.
    4) In the query-column-expression field, enter a query to derive the department name field for each record in the detail-employees-EO.
    eg. (SELECT dpt.department_name FROM departments dpt WHERE dpt.department_id = employees.department_id)
    Ensure to include the brackets.
    5) Apply the changes and accept the warning to create default data-type settings for the new attribute.
    View Object
    6) In the employees VO, include the new field DepartmentName as a selected attribute from the EO.
    7) Apply the changes and accept the warning to create default data-type settings for the new attribute.
    8) Test the model by running the ADF BC tester. Once running select the employees VO and step through the records, making sure the DepartmentName field has a value and changes appropriately according to the relating parent department_id.
    UIX input-only-form
    9) Create a new UIX web page employeesEdit.
    10) From the data-control pallete, drag in the employees VO as an input-form-with-navigation.
    11) For testing purposes it is also useful to have a create, delete, commit and rollback button, so includes these too.
    12) Within the employees VO data-control, also drag across a messageLovInput for the DepartmentId. Position it under the existing DepartmentId messageTextInput within the UIX page. We'll remove the existing messageTextInput later, but it's useful to leave it in for testing purposes initially when the LOV returns values.
    UIX LOV
    13) Navigate to the default LOV page that has just been created for you.
    14) Within the data-control pallete, expand the departments VO, select department ID then LOV-table from the drop-down, and drag this item onto the LOV page.
    15) Save your changes.
    16) Run your application. For an existing employee, invoke the department LOV and select an alternative department. Note on returning to the employees page the DepartmentID (both the messageTextInput and messageLovInput fields) are updated, but the DepartmentName is not. To do this we need to create a JavaBean to return multiple fields from the LOV to the original form.
    JavaBean
    17) Within your ViewController project, expand the ApplicationSources-View node.
    18) Select the new button, and create a standard JavaBean.
    19) Name the bean DepartmentsLov.
    20) Via the class editor, add 2 private scope fields DepartmentId and DepartmentName with String data-types, ensuring the create get/set method checkboxes are checked.
    21) Make and save your changes.
    22) From the navigator drag the newly created java file into the data-control palette.
    UIX LOV
    23) Return to the LOV webpage.
    24) Your LOV page will have a lovSelect event handler something like the following:
    <event name="lovSelect">
    <set property="inputValue"
    value="${bindings.DepartmentId.inputValue}"
    target="${data.employeesEdit.DepartmentId}"/>
    25) Change the lovSelect as follows:
    <event name="lovSelect">
    <compound>
    <set property="inputValue"
    value="${bindings.DepartmentId.inputValue}"
    target="${data.employeesEdit.DepartmentId}"/>
    <set value="${bindings.DepartmentId.inputValue}"
    property="inputValue"
    target="${bindings.JavaBeanDepartmentId}"/>
    <set value="${bindings.DepartmentName.inputValue}"
    property="inputValue"
    target="${bindings.JavaBeanDepartmentName}"/>
    </compound>
    26) Within the UI model navigator, right-click on the top node, then create-binding, input, text field.
    27) Select the AppModuleDataControl, then DepartmentView, then the DepartmentName field, and then the ok button.
    28) In the UI model select the new field, then in the structure pane rename the field to DepartmentName.
    29) Within the UI model navigator, right-click on the top node, then create-binding, data, iterator.
    30) Select the DepartmentsLovDataControl and name the new iterator DepartmentsJavaBeanIterator.
    31) Again in the UI model navigator, right-click on the top node, then create-binding, input, text field.
    32) Select the DepartmentsLovDataControl then departmentId field, then the ok button.
    33) In the UI model select the new field, then in the structure pane rename the field to JavaBeanDepartmentId.
    34) Again in the UI model navigator, right-click on the top node, then create-binding, input, text field.
    35) Select the DepartmentsLovDataControl then departmentName field, then the ok button.
    36) In the UI model select the new field, then in the structure pane rename the field to JavaBeanDepartmentName.
    UIX input-only-form
    37) Return to the main employeesEdit UIX form.
    38) Your UIX page will have a lovUpdate event handler something like the following:
    <event name="lovUpdate">
    <null/>
    39) Change the lovUpdate as follows:
    <event name="lovUpdate">
    <compound>
    <set value="${bindings.JavaBeanDepartmentId.inputValue}"
    property="inputValue"
    target="${bindings.DepartmentId}"/>
    <set value="${bindings.JavaBeanDepartmentName.inputValue}"
    property="inputValue"
    target="${bindings.DepartmentName}"/>
    </compound>
    </event>
    40) Repeat steps 29 through 36 for this page.
    41) Within the UIX page find the entries for the departmentId LOV, and the DepartmentName. They should look something like the following:
    <messageLovInput id="${bindings.DepartmentId.path}"
    model="${bindings.DepartmentId}"
    destination="lovWindow1.uix"/>
    <messageTextInput model="${bindings.DepartmentName}"
    columns="10"/>
    42) Modify these 2 entries as follows:
    <messageLovInput id="DepartmentId"
    model="${bindings.DepartmentId}"
    destination="lovWindow1.uix"
    partialRenderMode="multiple"
    partialTargets="DepartmentId DepartmentName"/>
    <messageTextInput id="DepartmentName"
    model="${bindings.DepartmentName}"
    columns="10"/>
    43) Finally delete the original DepartmentId messageTextInput field, leaving the DepartmentId messageLovInput.
    Testing
    44) Open your UIX input-only-form.
    45) Call the LOV and change the department for an existing employee record.
    46) Return to the employees page and note that the department ID and name have changed.
    47) Commit your changes.
    48) With your favourite data inspection tool (a'la Toad), check that the employee record's department ID has been appropriately saved to the database.
    <The End>
    Phew!

  • Multiple field population bound to xml

    Does anyone know how to populate multiple fields from data binding, most of all of these forms and how to only populate one field of data i am losing the connection when it comes to connecting the second, third, etc fields to the data of the xml? 

    Well that is just it, i have only one Data Connection it loaded a 6 column xml, basically when you choose the EMPLOYEEID on change event i need it to populate the 5 other fields
    EMPLOYEENAME
    JOBTITLE
    DEPARTMENTNAME
    DEPARTMENTNUMBER
    DATEOFEMPLOYMENT
    with the script i have i can only make it populate the EMPLOYEENAME and i am guessing because my script on carries to one bound item, i need help knowing how to tell it to change the other 5 too.!!! i have googled and tried a 100+ scripts all only work for the first field.
    This is what i have for the one field.
    in EMPLOYEEID field on change i have
    EMPLOYEENAME.rawValue = this.boundItem(xfa.event.newText);   which of course i only binding one field how can i bind all the fields, or i have tried this one which is all manual data fill in, how do i tell the things in ""'s to look at the data connection???? my xml, what am i missing as far as connecting the fields to change on employeeid. 
    var EMPLOYEEID = xfa.event.newText;
    if (EMPLOYEEID == "0029904");
    EMPLOYEENAME.rawValue = "ADDILIA ROBBINS";
    DEPARTMENTNAME.rawValue = "Department Of Public Safety";
    DEPARTMENTNUMBER.rawValue = "130";
    JOBTITLE.rawValue = "POLICE RECORDS TECH I";
    DATEOFEMPLOYMENT.rawValue = "2013-04-29";
    The fields are bound to the right columns in the xml but i cant get them to change when i select the primary employeeid.???
    HELP PLEASE.

  • Sending an Email with a cursor that returns multiple fields.

    I was investigating about sending emails from apex, and I'd like to know if you can help me, I need to send an Email report with multiple fields, I m using this code :
    DECLARE
    CURSOR c1 is
    select id,gk,creation_date,sr_count,issue_notes,sr_impacted,oldest_creation_date
    from gk_report where id = (select max(id) from gk_report);
    reg c1%ROWTYPE;
    begin
    IF (c1%ISOPEN = TRUE) THEN
    CLOSE c1;
    END IF;
    OPEN c1;
    FETCH c1 INTO reg;
    CLOSE c1;
    APEX_MAIL.send(
    p_to => '[email protected]',
    p_from => '[email protected]',
    p_body => 'Hourly GK Log',
    p_body_html =>
    'GK: '||to_char(reg.gk)||'<br>
    CREATION DATE: '||to_char(reg.CREATION_DATE,'DD-MON-YYYY HH24:MI:SS')||'<br>
    SR COUNT: '||to_char(reg.SR_COUNT)||'<br>
    ISSUE NOTES: '||to_char(reg.ISSUE_NOTES)||'<br>
    SRs IMPACTED: '||to_char(reg.SR_IMPACTED)||'<br>
    OLDEST CREATION DATE: '||to_char(reg.OLDEST_CREATION_DATE,'DD-MON-YYYY HH24:MI:SS'),
    p_SUBJ => 'Hourly GK Log: ' || to_char(reg.CREATION_DATE,'DD-MON-YYYY HH24:MI:SS'),
    p_cc => NULL,
    p_bcc => NULL ,
    p_replyto => NULL
    end;
    In this code there is a cursor that returns just one field, But what about if the cursor returns multiple fields, How can I insert a Loop into this code.?
    Thanks,
    Pablo.

    Hi,
    DECLARE
    p_collection_name VARCHAR2(9000) := 'Report_collection';
    begin
      IF (apex_collection.collection_exists(p_collection_name => p_collection_name)) THEN
         apex_collection.delete_collection(p_collection_name => p_collection_name);
      END IF;
    apex_collection.create_collection_from_query(
            p_collection_name => 'Report_collection',
            p_query => 'SELECT DISTINCT AUD_SR AS SR,  C.USER_NAME   AS AUDITOR, F.ERROR_NAM  ,  A.AUD_OBSERV AS AUDIT_OBS,D.FEEDBK_OBSERV AS FEEDBACK_OBS , E.ANALYSIS_OBS ,A.AUD_STATUS
    FROM   AUDIT_PROCESS A, MICC_AT_DATA B, MICC_AT_USER C, FEEDBACK_PROCESS D, MICC_AT_ANALISYS E, MICC_AT_ERROR F
    WHERE   B.DATA_MONTH = :P27_MONTH AND B.DATA_SR  = A.AUD_SR AND C.ID = B.DATA_AUDITOR  AND F.ERROR_ID = A.AUD_ERROR AND A.FEEDBACK_COD = D.FEEDBACK_COD AND  D.FEEDBK_AGREE = 'N' AND E.COD_ANALYSIS =  A.COD_ANALYSIS  ORDER BY AUDITOR');
      APEX_MAIL.send(
      p_to => '[email protected]',
    p_from => '[email protected]',
    p_body => p_collection_name ,
    p_body_html => '',
    p_SUBJ => 'hi',
    p_cc => NULL,
    p_bcc => NULL ,
    p_replyto => NULL
    END;
    Error
    ORA-06550: line 18, column 176:
    PLS-00103: Encountered the symbol " AND E.COD_ANALYSIS = A.COD_ANALYSIS ORDER BY AUDITOR" when expecting one of the following:
    ) , * & = - + < / > at in is mod remainder not rem
    <> or != or ~= >= <= <> and or like like2
    like4 likec between || multiset member submultiset
    The symbol "," was substituted for " AND E.COD_ANALYSIS = A.COD_ANALYSIS ORDER BY AUDITOR" to continue.
    1. DECLARE
    2. p_collection_name VARCHAR2(9000) := 'Report_collection';
    3. begin
    I got out the 'N' quotes of the N :
    DECLARE
    p_collection_name VARCHAR2(9000) := 'Report_collection';
    begin
      IF (apex_collection.collection_exists(p_collection_name => p_collection_name)) THEN
         apex_collection.delete_collection(p_collection_name => p_collection_name);
      END IF;
    apex_collection.create_collection_from_query(
            p_collection_name => 'Report_collection',
            p_query => 'SELECT DISTINCT AUD_SR AS SR,  C.USER_NAME   AS AUDITOR, F.ERROR_NAM  ,  A.AUD_OBSERV AS AUDIT_OBS,D.FEEDBK_OBSERV AS FEEDBACK_OBS , E.ANALYSIS_OBS ,A.AUD_STATUS
    FROM   AUDIT_PROCESS A, MICC_AT_DATA B, MICC_AT_USER C, FEEDBACK_PROCESS D, MICC_AT_ANALISYS E, MICC_AT_ERROR F
    WHERE   B.DATA_MONTH = :P27_MONTH AND B.DATA_SR  = A.AUD_SR AND C.ID = B.DATA_AUDITOR  AND F.ERROR_ID = A.AUD_ERROR AND A.FEEDBACK_COD = D.FEEDBACK_COD AND  D.FEEDBK_AGREE = N AND E.COD_ANALYSIS =  A.COD_ANALYSIS  ORDER BY AUDITOR');
      APEX_MAIL.send(
      p_to => '[email protected]',
    p_from => '[email protected]',
    p_body => p_collection_name ,
    p_body_html => '',
    p_SUBJ => 'hi',
    p_cc => NULL,
    p_bcc => NULL ,
    p_replyto => NULL
    END;
    Error : ORA-20104: create_collection_from_query Error:ORA-20104: create_collection_from_query ParseErr:ORA-00904: "N": invalid identifier
    If you can help me would be great, and if you see another mistake please let me know i have not may reach out the solution about it.
    Thanks,
    Pablo.

  • How do you get a line with MULTIPLE fields to WRAP ?

    How do you get a line with MULTIPLE fields to WRAP ?
    Good afternoon everyone...
    THE PROBLEM: Why doesn’t a line with multiple fields WRAP?
    HYPOTHETICAL EXAMPLE/WHAT I”D LIKE TO SEE
    If I have 2 fields on a line (this is now a hypothetical example and nothing to do with my actual report)….let’s call them field A and field B. And if field A has values of all ‘X’ and field B has values of all ‘Y’…then….the normal case would be (ignore dots – only for spacing):
    A……………………… B
    XXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYY
    But what if A is too long? I would want to see B wrap onto the next line like this:
    A……………………………………………………B
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX YYYYYY
    YYYYYYYYYYYYY
    And similarly….if B is extra long, can the line print as:
    A………………………. B
    XXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYY
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    I don’t want the case where B is long and I get:
    A………………… …B…
    XXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYY
    ………………………..YYYYYYYYYYYYYYYYYYYYY
    I can see how you can wrap an individual field like that…but how can you WRAP a line of[b] fields within the frame so it wraps to the BEGINNING of the frame on next line?
    My SPECIFIC CASE
    I have a report that I have stripped down to a simple structure for the purposes of this explanation.
    My DATA MODEL has the main QUERY (for plant family and species data). The columns of the query are divided into 2 groups. The 1st GROUP contains the family data. Below that is the rest of the species data in a 2nd GROUP.
    Linking from the 2nd species group (above) is a new QUERY to extract REGION data based on the common key field. Under this 2nd query is another group with all the REGION columns.
    The LAYOUT MODEL has a group frame (the main , base one)
    On top of this is a repeating frame based on the 1st group (family data).
    On top of this is another repeating frame for the 2nd group (species data).
    On top of this is 2 Frames on the same line line. The 1st frame contains columns from the species group .
    The 2nd frame on this line is a repeating frame. The PRINT DIRECTION for this frame is ACROSS/DOWN. It repeats details of the REGION where the species is found. These columns come from this group come from the REGION QUERY and GROUP.
    All fields on the report line have variable horizontal elasticity.
    The problem is that when there is too much data on the line, it does NOT WRAP to the 2nd line.. It TRUNCATES.
    Can the line be made to WRAP????..
    In my current report, 1 of 2 things is happening:
    1) All fields print on the line until it hits the page boundary and then it just stops. Truncated!
    2) All fields print on the current line, then Oracle Reports throws a new page to print the REMAINDER of the long, input line
    But I would like a LONG line to continue printing onto the following line of the same page.
    I have tried all combinations of the elasticity fields and the ‘ADVANCED LAYOUT’ properties.
    I have been focussing my attention with this problem on the frames .
    We are using REPORT BUILDER V 6.0.8.26.0
    Thankyou to anyone who may offer assistance.
    Tony Calabrese.

    Steve,
    you gain 1 thing, but you lose something else!
    This thing is SO frustrating!
    Hey Steve! Good afternoon.
    I've done as you suggested....I have a long text boilerplate item - the only 1 on the line...and it has all the column in it.
    So it looks like:
    &col1 &col2 &col3 &col4 &col5 etc etc etc
    And the line expands nicely to each field's requirements.
    And when it gets to the right page boundary...it WRAPS to the next line! Beautiful!!!
    The only thing is that...when I had individual fields across the line I was able to create format triggers for those fields. And in doing so I was able to reduce the font and change the justification. I had to do that because some of the fields had to appear superscripted.
    So I wanted something like (ignore the dots):
    ...................................ppppp
    AAAA BBBB CCCCC DDDD EEEE FFFFFF
    So the field of 'ppppp' appeared slightly higher on the line than the other fields...
    I can't see how I can do this with a single TEXT field containing all the &COL values.
    Have you ever come across anything like this?
    Thankyou again,
    Tony Calabrese 12/4/2007

  • How do I move multiple fields from the end of the document to another section?

    For some reason when I click Cntrl+V, it pastes the multiple fields at the end of my form rather than at the point of paste within the document.

    Select all of the fields that you wish to copy then use Ctrl-C.  Scroll to the part of the form where you want to paste the copied fields.  Select the field that you want the paste to occur after (ie, the pasted fields will appear after/below the selected field) and use Ctrl-V.
    Jeff Canepa
    Software Quality Engineer
    Adobe Systems, Inc.
    [email protected]

Maybe you are looking for

  • How can I turn off word wrap in the View Source output?

    I'm trying to extract HTML from Word and one way to do that is to save the Word file as a .htm file and then View Source in a browser and copy that. But the words are wrapped in the View Source file. I want each paragraph to be all on one line. Is th

  • Window Update 8.0 to 8.1

    Sir, There are window 8 is installed in my G6 Notebook now i want to update my window 8 to window 8.1. i have completed download the updatioin of window 8.1 but after completed download system required to restart to b configure the laptop. but after

  • Problem with Revision level for a Material

    Hi All, I have a problem with Revision Levels for a Material. I want to know the Revision Level for a particular Material for BOM Creation. Can anyone please let me know from which Table or Funtion Module can I get the Rev Level, once I pass MATNR (M

  • Printer hooked up to Airport

    I've had this problem ever since I loaded Leopard, but not sure it's related. I have a Canon MP800 printer hooked up to Airport and never have had a problem, but all of a sudden, I can't print to the printer unless I unhook it from the base station a

  • What is the canonical name of icloud applet for windows?

    Hi, I am trying to determing the canonical name of the icloud applet for windows.  Does anyone know it?