Help with populating fields

Hi all,
I'm having a little trouble with an if statement and I wondering if you can help. I'm creating a form where I would like text box field A to populate with information from fields B & C, only if fields D & E match. Below is my current statement. The form keeps getting stuck on the first if statement when all cases are true. Is there a way to have the statement continue even after one case is true (i.e. to make a list in text box A)? Any help is appreciated. Thanks!
//form1.DCF.Subform3.NSUFACULTY1::click:
if (form1.DCF.Subform3.PIACADEMICUNIT1==form1.FacePage.Subform1.PIACADEMICUNIT1) then
form1.DCF.Subform3.NSUFACULTY1=forms1.FacePage.Subform1.PINAME1
elseif (form1.DCF.Subform3.PIACADEMICUNIT1==form1.FacePage.Subform1.PIACADEMICUNIT1) then
form1.DCP.Subform3.NSUFACULTY1=form1.FacePage.Subform.NAME2
endif

I think you still don't have the full path. Try adding .rawValue to the end of your fieldnames, i.e.:
//form1.DCF.Subform3.NSUFACULTY1::click:
if (form1.DCF.Subform3.PIACADEMICUNIT1.rawValue==form1.FacePage.Subform1.PIACADEMICUNIT1.rawValue) then
form1.DCF.Subform3.NSUFACULTY1.rawValue=form1.FacePage.Subform1.PINAME1.rawValue
elseif (form1.DCF.Subform3.PIACADEMICUNIT1.rawValue==form1.FacePage.Subform1.PIACADEMICUNIT1.rawValue) then
form1.DCP.Subform3.NSUFACULTY1.rawValue=form1.FacePage.Subform.NAME2.rawValue
endif
Also, please double check that the scripting language is set to javascript.

Similar Messages

  • Help with Required fields-PLEASE

    I have been attempting to get help with a required field and one of the forum helpers said he got it to work for me but I cannot and I have not been able to get any more responses from him to help me further.
    I am attempting to have a radio box when the YES is selected to require another field to be completed.  The script I was provided with is:
    getField("Location").required = (getField("Group1").value == "Yes");
    Location being the field that I require to be filled in if Group 1 is Yes.  The previous forum helper indicated that I had to have this script in both fields in Group 1 and when I do that, nothing different happens. 
    What am I doing wrong? 
    Please, I need to fix this right away and I will be using this java script on many other forms that I have so I need to get this done soon.
    Thank you in advance.

    Wht you want can get somewhat complicated. One way to prevent subsequent fields from being used is to set them to read-only and/or hidden. You could then use the Validate event of the text field to validate the entry and enable the subsequent fields if it is filled-in adequately. In general, you should also reset the fields whenever you hide them, so they don't contain potentially invalid data from previously being filled-in. So you could initially have the fields set to be hidden, and only unhide them if No is selected, or if Yes is selected and the required text field is filled-in.
    I realize this may not be as helpful as you had hoped for, but I can't suggest specific code without knowing more about the form.

  • Need help with disabling fields or hiding rows based on previous field

    Hi,
    I have a report in a region.
    The report has five columns:
    Animal type_ Health Issues* Angel Grant Requested?* Granted?* Grant Response Date*
    Dog Fleas Yes Yes 02/04/2009
    Cat Fleas No
    The first time the screen is displayed only the Animal type_ Health Issues* Angel Grant Requested?* columns will appear.
    The user will make a selection for 'Angel Grant Requested' from the LOV ('YES', 'NO') and then click on the 'Submit' button.
    When the screen returns 'Angel Grant Requested?' will be grayed out so the user cannot change the selection. The user will make a selection for 'Granted?' using LOV ('YES, 'NO') and for 'Grant Response Date' using the calendar.
    {color:#ff0000}{color:#0000ff}Here is what I want to do...
    If the user selects 'NO' for 'Angel Grant Requested?' then I would like to do one of the following (which ever one is easiest to do) when the screen returns:
    1. Disable (gray out) the 'Granted?' and 'Grant Response Date' fields on the screen for the rows that have 'NO' for 'Angel Grant Requested?'
    so that the user cannot make any selection, AND update the HEALTH_ISSUES table to
    set grant_granted = 'N/A'
    grant_response_date = sysdate
    WHERE animal_issue_type_id = AI_ID;
    2. Do not display the rows that have 'NO' for 'Angel Grant Requested?'
    {color}
    Can you please provide code samples to do this?
    {color:#ff0000}*I tried to use javascript to gray out the columns, the problem I have is with the hidden f02 column (Angel Grant Requested) that I created on the report so that javascript could read the value. columns are being disabled as desired but the database table is not updating properly...*
    {color:#ff0000}*For the rows where the user selected 'YES' for 'Angel Grant Requested?' we need to update the table with the 'Granted?' and 'Grant Response Date' values. These values are somehow being put on the row where the user selected 'NO' for 'Angel Grant Requested?'.*
    This happens in the UPDATE_ISSUES PL/SQL after When :P6_DSP_REQUESTED = 'DSPGRANTED'{color}
    Below is the Javascript function that is in HTML HEADER:_
    </script>
    <script language="JavaScript1.1" type="text/javascript">
    function checkAngelGrant()
    var col2=document.forms[0].f02; /* angel grant requested */
    var col3=document.forms[0].f03; /* angel grant granted */
    var col4=document.forms[0].f04; /* grant response date */
    for (i=0;i<col2.length;i++)
    var col2Check = col2+.value; /* read the hidden angel grant requested field */+
    +/* checks the hidden angel grant requested field+
    if no then we need to disable the angel grant granted field and the angel response date field.
    if (col2Check == 'NO')
    +{+
    col3.disabled=true; /* angel grant granted (Yes No) */
    col4.disabled=true; /* angel response date
    Below is the UPDATEISSUES PL/SQL process that is run on After Submit:_*
    DECLARE
    ai_id NUMBER;
    vgrant_requested VARCHAR2(3);
    vgrant_grnted VARCHAR2(3);
    vgrant_respdate DATE;
    f01 = Animal Issue Type ID
    f02 = grant requested ('YES','NO')
    F03 = grant granted ('YES','NO')
    F04 = grant response date
    P6_DSP_REQUESTED = DSPGRANTED display region with grant_granted and grant_respdate
    P6_DSP_REQUESTED = DSPREQUESTED display region with grant_requested only
    P6_DSP_REQUESTED = BIFNOCHG cannot change any of the fields that have already been set
    BEGIN
    IF :P6_DSP_BEQUESTED = 'DSPREQUESTED' then -- Allow setting of grant_requested value only
    FOR i IN 1..HTMLDB_APPLICATION.G_F01.COUNT LOOP
    ai_id := HTMLDB_APPLICATION.G_F01(i); -- animal_issue_type_id This is hidden
    vgrant_requested := HTMLDB_APPLICATION.G_F02(i); -- grant_requested (YES or NO)
    UPDATE HEALTH_ISSUE_TYPES
    SET grant_requested = vgrant_requested
    WHERE animal_issue_type_id = AI_ID;
    COMMIT;
    END LOOP;
    elsif :P6_DSP_REQUESTED = 'DSPGRANTED' then -- grant_granted and grant_response_date
    FOR i IN 1..HTMLDB_APPLICATION.G_F01.COUNT LOOP
    ai_id := HTMLDB_APPLICATION.G_F01(i); -- animal_issue_type_id This is hidden
    vgrant_grnted := HTMLDB_APPLICATION.G_F02(i); -- grant_granted (YES or NO)
    vgrant_respdate := to_date(HTMLDB_APPLICATION.G_F03(i),'MM/DD/YYYY');
    UPDATE HEALTH_ISSUE_TYPES
    SET grant_granted = vgrant_grnted,
    grant_response_date = vgrant_respdate
    WHERE animal_issue_type_id = AI_ID;
    COMMIT;
    END LOOP;
    end if;
    END;

    It's actually three reports that get run during different stages of the screen.
    When the user first enters the screen the data is populated from the REQUESTED REPORT sql:
    SELECT hit.animal_issue_type_id, at.animal_type_desc, it.issue_type_desc, hit.grant_requested
    FROM health_issue_types hit, animal_types at,issue_types it
    WHERE hit.animal_type_id = at.animal_type_id
    AND hit.issue_type_id = it.issue_type_id
    AND hit.file_no = :P6_FILE_NO;
    The user will make a selection from the LOV select list (Yes, No) for the grant_requested field and then click on the Submit button.
    {color:#ff0000}*If the user selects 'NO' for this field then I want to disable the grant_granted and grant_response_date fields when the screen is populated from the ISSUES REPORT sql. If this cannot be easily done then I would like to hide the entire row when 'NO' has been selected for the grant_requested field.*{color}
    When the screen returns the data is populated from the ISSUES REPORT sql:
    ISSUES REPORT
    SELECT hit.animal_issue_type_id, at.animal_type_desc, it.issue_type_desc, hit.grant_requested,
    hit.grant_granted, hit.grant_response_date
    FROM health_issue_types hit, animal_types at,issue_types it
    WHERE hit.animal_type_id = at.animal_type_id
    AND hit.issue_type_id = it.issue_type_id
    AND hit.file_no = :P6_FILE_NO;
    At this point the grant_requested field will no longer be available for user modification. The user will make a selection from the LOV select list (Yes, No) for the grant_granted, and the grant_response_date fields and then click on the Submit button again.
    When the screen returns the data is populated from the ANIMAL DISPLAY ONLY REPORT sql:
    ANIMAL DISPLAY ONLY REPORT
    SELECT hit.animal_issue_type_id, at.animal_type_desc, it.issue_type_desc, hit.grant_requested,
    hit.grant_granted, hit.grant_response_date
    FROM health_issue_types hit, animal_types at, issue_types it
    WHERE hit.animal_type_id = at.animal_type_id
    AND hit.issue_type_id = it.issue_type_id
    AND hit.file_no = :P6_FILE_NO;
    At this point the grant_requested, grant_granted, and grant_response_date fields will no longer be available for user modification.
    {color:#0000ff}Thank you for taking the time to look at my problem.{color}

  • Help with formatting fields in PDF...

    Hi -
    I´m working on a form that should be filled in from the internet...
    The design I did i InDesign - and the formfields I did i Acrobat Pro -
    and finally I´m finetuning everything in LiveCycle...
    I've runned into two problems...
    I need the date field to correct itself - 
    if the user choice to use the wrong format...
    for example -
    we want to have YYYY-MM-DD
    and if the user writes DD MM YY -
    it should be accepted and corrected....
    is this possible - maybe with JAVA-script?
    Also - In Sweden anyway we always write the Social Security number in this way
    YYMMDD-NNNN ( N = Numbers between 0-9 )
    How can I get the field to recognize and to crave - "demand" this format...
    I´ll hope my Swinglish can be understandable?
    IdéSpiran

    I suggest that you make use of the Validation patterns for this. On the Object palette there is a Value tab and on that tab is a button for Validation Pattern. You can create a pattern in 4 areas - Display - what the user sees on teh screen, Edit - what the user enters in the field, Validation - what the value entered will be validated against and Data - what is stored in the data file. You will be interested in the Display pattern. Depending on the type of field you will see different data patterns ( i.e. Date fields show date patterns and TextFields have phone numbers, zip codes etc..). You can also create a custom pattern. Have a look in the docs about patterns and you will see what each of the chars represents and how to create one. For your SSN you will probably need javascript because of the combination of Date and number formats.
    Hope that helps
    Paul

  • Need help with parameter fields and report selection.

    Hi all:
    I hope some one can help me with the problem I am having with my parameter field and record selection.
    First, can anyone explain to me why my parameter field CustStart, which is dynamic and is based on the field Customer in the table CustMaster.  There are over 1800 records in the CustMaster table but the drop down list only shows maybe about half of them and there is no way to scroll down to the last customer record.  What am I doing wrong?
    Second, is there any way to base a parameter field on a formula field on my report?  On my report I have created a field Cust that is the customer name and number joined together in one field.  I would very much llike to use this formula in my record selection and in my parameter field.  Can it be done?
    All help is greatly appreciated
    Thanks,
    FatMan

    Hi,
    You can use the following for changin increasing the LOV.
    Crystal Reports XI BusinessObjects Enterprise XI
    For performance reasons, in Crystal Reports XI Release 1 and Release 2 the maximum number of values that are returned for a list of values is set to 1000. If you have a cascading List of Values (for example Country > Region > City), the lowest level (in this case City) will only display a maximum of 1000 values. This means that the higher-level prompts may display far fewer values than you expect. The list of values provides the data for the dynamic parameter list.
    How can you modify the maximum number of values available in a dynamic parameter list?
    Resolution
    To increase the maximum number of values available in a dynamic parameter list, you must add a registry key.
    CAUTION     The following resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems that may require you to reinstall the Microsoft Windows operating system. Use the Registry Editor at your own risk. For information on how to edit the registry key, view the 'Changing Keys and Values' online Help topic in the Registry Editor (Regedit.exe).
    It is strongly recommended that you make a backup copy of the registry files (System.dat and User.dat on Win9x computers) before you edit the registry.
    Crystal Reports XI Release 1
    1.     Create a registry key HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV.
    NOTE     Alternatively, you can create the registry key HKEY_CURRENT_USER\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV and that key will override the settings of the HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV key.
    2.     Add a string value "MaxRowsetRecords" and set the value to the maximum number of values that you desire for your report. For example, a value of 2000 will return up to 2000 values in the lowest level of a cascading parameter. NOTE: The value 0 (Unlimited) will not work with BusinessObjects Enterprise XI or Crystal Reports Server XI, you must specify another value.
    NOTE     The higher the number of values is, the longer it will take the Enter Values dialog box to populate with values.
    3.      After making changes to the registry, restart the affected service or application as required.
    Crystal Reports XI Release 2
    1.     Create a registry key HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV.
    NOTE     Alternatively, you can create the registry key HKEY_CURRENT_USER\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV and that key will override the settings of the HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.5\Crystal Reports\DatabaseOptions\LOV key.
    2.     Add a string value "MaxRowsetRecords" and set the value to the maximum number of values that you desire for your report. For example, a value of 2000 will return up to 2000 values in the lowest level of a cascading parameter. 
    NOTE     The value 0 (Unlimited) will not work with BusinessObjects Enterprise XI or Crystal Reports Server XI, you must specify another value.
    3.     After making changes to the registry, restart the affected service or application as required.
    I hope this helps you.
    Regards,
    Prashant

  • Beginner needs help with CMR field problem

    Hello,
    I have two ejbs, one called EstablishmentEJB and another called VisitorCommentsEJB. The relationship is of one EstablishmentEJB instance to many VisitorCommentsEJB instances.
    Here are the definitions for the tables:
    CREATE TABLE establishments (
      DB_ESTABLISHMENT_ID int(11) NOT NULL default '0',
      DB_POSTCODE varchar(100) NOT NULL default '',
      DB_ESTABLISHMENT_NAME varchar(255) NOT NULL default '',
      PRIMARY KEY  (DB_ESTABLISHMENT_ID)
    ) TYPE=InnoDB;
    CREATE TABLE visitors_comments (
      DB_VISITOR_COMMENT_ID int(11) NOT NULL auto_increment,
      DB_ESTABLISHMENT_ID int(11) NOT NULL default '0',
      DB_COMMENT varchar(255) NOT NULL default '',
      PRIMARY KEY  (DB_VISITOR_COMMENT_ID)
    ) TYPE=InnoDB;Here are the xml DDs:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    -->
    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
               http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
               version="2.1">
         <description>test guide</description>
         <display-name>test guide</display-name>
         <enterprise-beans>
              <!--===========Establishment================ -->
              <entity>
                   <ejb-name>EstablishmentEJB</ejb-name>
                   <home>com.softwareag.test_guide.establishmentEJB.PGEstablishmentHome</home>
                   <remote>com.softwareag.test_guide.establishmentEJB.PGEstablishment</remote>
                   <local-home>com.softwareag.test_guide.establishmentEJB.PGEstablishmentLocalHome</local-home>
                   <local>com.softwareag.test_guide.establishmentEJB.PGEstablishmentLocal</local>
                   <ejb-class>com.softwareag.test_guide.establishmentEJB.PGEstablishmentBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Establishment</abstract-schema-name>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>name</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
              </entity>
              <!--===========Grade================ -->
              <entity>
                   <ejb-name>GradeEJB</ejb-name>
                   <home>com.softwareag.test_guide.gradeEJB.PGGradeHome</home>
                   <remote>com.softwareag.test_guide.gradeEJB.PGGrade</remote>
                   <local-home>com.softwareag.test_guide.gradeEJB.PGGradeLocalHome</local-home>
                   <local>com.softwareag.test_guide.gradeEJB.PGGradeLocal</local>
                   <ejb-class>com.softwareag.test_guide.gradeEJB.PGGradeBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Grade</abstract-schema-name>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>grade</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
              </entity>
              <!--===========VisitorsComment================ -->
              <entity>
                   <ejb-name>VisitorCommentEJB</ejb-name>
                   <home>com.softwareag.test_guide.visitorCommentEJB.PGVisitorCommentHome</home>
                   <remote>com.softwareag.test_guide.visitorCommentEJB.PGVisitorComment</remote>
                   <local-home>com.softwareag.test_guide.visitorCommentEJB.PGVisitorCommentLocalHome</local-home>
                   <local>com.softwareag.test_guide.visitorCommentEJB.PGVisitorCommentLocal</local>
                   <ejb-class>com.softwareag.test_guide.visitorCommentEJB.PGVisitorCommentBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>VisitorsComment</abstract-schema-name>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>comment</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
              </entity>
              <!--===========Country================ -->
              <entity>
                   <ejb-name>CountryEJB</ejb-name>
                   <home>com.softwareag.test_guide.countryEJB.PGCountryHome</home>
                   <remote>com.softwareag.test_guide.countryEJB.PGCountry</remote>
                   <local-home>com.softwareag.test_guide.countryEJB.PGCountryLocalHome</local-home>
                   <local>com.softwareag.test_guide.countryEJB.PGCountryLocal</local>
                   <ejb-class>com.softwareag.test_guide.countryEJB.PGCountryBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Country</abstract-schema-name>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>countryName</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
              </entity>
              <!--===========Category================ -->
              <entity>
                   <ejb-name>CategoryEJB</ejb-name>
                   <home>com.softwareag.test_guide.categoryEJB.PGCategoryHome</home>
                   <remote>com.softwareag.test_guide.categoryEJB.PGCategory</remote>
                   <local-home>com.softwareag.test_guide.categoryEJB.PGCategoryLocalHome</local-home>
                   <local>com.softwareag.test_guide.categoryEJB.PGCategoryLocal</local>
                   <ejb-class>com.softwareag.test_guide.categoryEJB.PGCategoryBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Category</abstract-schema-name>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>category</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
              </entity>
              <!--===========SearchEngineValueListHandler================ -->
              <session>
                   <ejb-name>PGSearchEngineValueListHandlerEJB</ejb-name>
                   <home>com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandlerHome</home>
                   <remote>com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandler</remote>
                   <local-home>com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandlerLocalHome</local-home>
                   <local>com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandlerLocal</local>
                   <ejb-class>com.softwareag.test_guide.searchEngineEJB.PGSearchEngineValueListHandlerBean</ejb-class>
                   <session-type>Stateful</session-type>
                   <transaction-type>Container</transaction-type>
                    <resource-ref>
                   <res-ref-name>jdbc/test_guia</res-ref-name>
                   <res-type>javax.sql.DataSource</res-type>
                   <res-auth>Application</res-auth>
                   </resource-ref>
              </session>
              <!--===========SessionFacade================ -->
              <session>
                   <ejb-name>PGSessionFacadeEJB</ejb-name>
                   <home>com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeHome</home>
                   <remote>com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacade</remote>
                   <local-home>com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeLocalHome</local-home>
                   <local>com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeLocal</local>
                   <ejb-class>com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <resource-ref>
                   <res-ref-name>jdbc/test_guia</res-ref-name>
                   <res-type>javax.sql.DataSource</res-type>
                   <res-auth>Application</res-auth>
                   </resource-ref>
              </session>
         </enterprise-beans>
         <relationships>
              <!--===========Establishments-VisitorComments================-->
              <ejb-relation>
                   <ejb-relation-name>Establishment-VisitorComment</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Establishment-has-many-comments</ejb-relationship-role-name>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>EstablishmentEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>visitorComments</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Comment-belongs-to-Establishment</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>VisitorCommentEJB</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
              </ejb-relation>
              <!--===========Establishments-Grades================-->
              <ejb-relation>
                   <ejb-relation-name>Establishment-Grade</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Establishment-has-many-grades</ejb-relationship-role-name>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>EstablishmentEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>grades</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Grade-belongs-to-Establishment</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>GradeEJB</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
              </ejb-relation>
              <!--===========Establishments-Countries================-->
              <ejb-relation>
                   <ejb-relation-name>Country-Establishment</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Country-has-many-establishments</ejb-relationship-role-name>
                        <!--========== One or Many here?? ==========-->
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>CountryEJB</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Establishment-has-many-countries</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>EstablishmentEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>countries</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
              </ejb-relation>
              <!--===========Establishments-Categories ================-->
              <ejb-relation>
                   <ejb-relation-name>Establishment-Category</ejb-relation-name>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Establishment-has-many-categories</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>EstablishmentEJB</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>categories</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <ejb-relationship-role-name>Category-has-many-establishments</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>CategoryEJB</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
              </ejb-relation>
         </relationships>
    </ejb-jar>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <jonas-ejb-jar xmlns="http://www.objectweb.org/jonas/ns"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://www.objectweb.org/jonas/ns
                http://www.objectweb.org/jonas/ns/jonas-ejb-jar_4_0.xsd" >
    <!--
    <!DOCTYPE jonas-ejb-jar PUBLIC "-//ObjectWeb//DTD JOnAS 3.2//EN" "http://www.objectweb.org/jonas/dtds/jonas-ejb-jar_3_2.dtd">
    <jonas-ejb-jar>
    -->
    <!-- ===============SearchEngineValueListHandler=======================-->
      <jonas-session>
        <ejb-name>PGSearchEngineValueListHandlerEJB</ejb-name>
        <jndi-name>PGSearchEngineValueListHandlerEJBHome</jndi-name>
        <jonas-resource>
          <res-ref-name>jdbc/test_guia</res-ref-name>
          <jndi-name>test_guia</jndi-name>
        </jonas-resource>
      </jonas-session>
      <!-- ===============SessionFacade=======================-->
      <jonas-session>
        <ejb-name>PGSessionFacadeEJB</ejb-name>
        <jndi-name>PGSessionFacadeEJBHome</jndi-name>
         <jonas-resource>
          <res-ref-name>jdbc/test_guia</res-ref-name>
          <jndi-name>test_guia</jndi-name>
        </jonas-resource>
      </jonas-session>
    <!-- ===============Establishment=======================-->
      <jonas-entity>
        <ejb-name>EstablishmentEJB</ejb-name>
        <jndi-name>PGEstablishmentHome</jndi-name>
             <cleanup>none</cleanup>
         <jdbc-mapping>
          <jndi-name>test_guia</jndi-name>
          <jdbc-table-name>ESTABLISHMENTS</jdbc-table-name>
          <cmp-field-jdbc-mapping>
         <field-name>id</field-name>
         <jdbc-field-name>DB_ESTABLISHMENT_ID</jdbc-field-name>
          </cmp-field-jdbc-mapping>
          <cmp-field-jdbc-mapping>
         <field-name>name</field-name>
    <jdbc-field-name>DB_ESTABLISHMENT_NAME</jdbc-field-name>
          </cmp-field-jdbc-mapping>
        </jdbc-mapping>
    </jonas-entity>
      <!-- ===============Grade=======================-->
        <jonas-entity>
        <ejb-name>GradeEJB</ejb-name>
        <jndi-name>PGgradeHome</jndi-name>
         <cleanup>none</cleanup>
         <jdbc-mapping>
          <jndi-name>test_guia</jndi-name>
          <jdbc-table-name>GRADES</jdbc-table-name>
          <cmp-field-jdbc-mapping>
         <field-name>id</field-name>
         <jdbc-field-name>DB_GRADE_ID</jdbc-field-name>
          </cmp-field-jdbc-mapping>
          <cmp-field-jdbc-mapping>
         <field-name>grade</field-name>
         <jdbc-field-name>DB_GRADE</jdbc-field-name>
          </cmp-field-jdbc-mapping>
        <!--
         <cmp-field-jdbc-mapping>
         <field-name>establishment_id</field-name>
         <jdbc-field-name>DB_ESTABLISHMENT_ID</jdbc-field-name>
        </cmp-field-jdbc-mapping>
         -->
        </jdbc-mapping>
      </jonas-entity>
      <!-- ===============Visitor�s comments=======================-->
        <jonas-entity>
        <ejb-name>VisitorCommentEJB</ejb-name>
        <jndi-name>PGVisitorCommentHome</jndi-name>
         <cleanup>none</cleanup>
         <jdbc-mapping>
          <jndi-name>test_guia</jndi-name>
          <jdbc-table-name>VISITORS_COMMENTS</jdbc-table-name>
          <cmp-field-jdbc-mapping>
         <field-name>id</field-name>
         <jdbc-field-name>DB_VISITOR_COMMENT_ID</jdbc-field-name>
          </cmp-field-jdbc-mapping>
          <cmp-field-jdbc-mapping>
         <field-name>comment</field-name>
         <jdbc-field-name>DB_COMMENT</jdbc-field-name>
          </cmp-field-jdbc-mapping>
            <!--
           <cmp-field-jdbc-mapping>
         <field-name>establishment_id</field-name>
         <jdbc-field-name>DB_ESTABLISHMENT_ID</jdbc-field-name>
          </cmp-field-jdbc-mapping>
         -->
        </jdbc-mapping>
      </jonas-entity>
        <!-- ===============Countries=======================-->
        <jonas-entity>
        <ejb-name>CountryEJB</ejb-name>
        <jndi-name>PGcountryHome</jndi-name>
              <cleanup>none</cleanup>
        <jdbc-mapping>
          <jndi-name>test_guia</jndi-name>
          <jdbc-table-name>COUNTRIES</jdbc-table-name>
          <cmp-field-jdbc-mapping>
         <field-name>id</field-name>
         <jdbc-field-name>DB_COUNTRY_ID</jdbc-field-name>
          </cmp-field-jdbc-mapping>
          <cmp-field-jdbc-mapping>
         <field-name>countryName</field-name>
         <jdbc-field-name>DB_COUNTRY_NAME_FR</jdbc-field-name>
          </cmp-field-jdbc-mapping>
        </jdbc-mapping>
      </jonas-entity>
      <!-- ===============Categories=======================-->
        <jonas-entity>
        <ejb-name>CategoryEJB</ejb-name>
        <jndi-name>PGcategoryHome</jndi-name>
        <cleanup>none</cleanup>
         <jdbc-mapping>
          <jndi-name>test_guia</jndi-name>
          <jdbc-table-name>CATEGORIES</jdbc-table-name>
          <cmp-field-jdbc-mapping>
         <field-name>id</field-name>
         <jdbc-field-name>DB_CATEGORY_ID</jdbc-field-name>
          </cmp-field-jdbc-mapping>
          <cmp-field-jdbc-mapping>
         <field-name>category</field-name>
         <jdbc-field-name>DB_CATEGORY_NAME_FR</jdbc-field-name>
          </cmp-field-jdbc-mapping>
        </jdbc-mapping>
      </jonas-entity>
      <!--===========Establishments-VisitorComments================-->
      <jonas-ejb-relation>
          <ejb-relation-name>Establishment-VisitorComment</ejb-relation-name>
          <jonas-ejb-relationship-role>
            <ejb-relationship-role-name>Comment-belongs-to-Establishment</ejb-relationship-role-name>
            <foreign-key-jdbc-mapping>
              <foreign-key-jdbc-name>DB_ESTABLISHMENT_ID</foreign-key-jdbc-name>
            </foreign-key-jdbc-mapping>
          </jonas-ejb-relationship-role>
        </jonas-ejb-relation>
         <!--===========Establishments-Grades================-->
           <jonas-ejb-relation>
          <ejb-relation-name>Establishment-Grade</ejb-relation-name>
          <jonas-ejb-relationship-role>
            <ejb-relationship-role-name>Grade-belongs-to-Establishment</ejb-relationship-role-name>
            <foreign-key-jdbc-mapping>
              <foreign-key-jdbc-name>DB_ESTABLISHMENT_ID</foreign-key-jdbc-name>
            </foreign-key-jdbc-mapping>
          </jonas-ejb-relationship-role>
        </jonas-ejb-relation>
         <!--===========Establishments-Countries================-->
          <jonas-ejb-relation>
          <ejb-relation-name>Country-Establishment</ejb-relation-name>
          <jdbc-table-name>COUNTRIES_ESTABLISHMENTS</jdbc-table-name>
          <jonas-ejb-relationship-role>
            <ejb-relationship-role-name>Country-has-many-establishments</ejb-relationship-role-name>
            <foreign-key-jdbc-mapping>
              <foreign-key-jdbc-name>DB_ESTABLISHMENT_ID</foreign-key-jdbc-name>
            </foreign-key-jdbc-mapping>
          </jonas-ejb-relationship-role>
          <jonas-ejb-relationship-role>
            <ejb-relationship-role-name>Establishment-has-many-countries</ejb-relationship-role-name>
            <foreign-key-jdbc-mapping>
              <foreign-key-jdbc-name>DB_COUNTRY_ID</foreign-key-jdbc-name>
            </foreign-key-jdbc-mapping>
          </jonas-ejb-relationship-role>
        </jonas-ejb-relation>
         <!--===========Establishments-Categories ================-->
          <jonas-ejb-relation>
          <ejb-relation-name>Establishment-Category</ejb-relation-name>
          <jdbc-table-name>ESTABLISHMENTS_CATEGORIES</jdbc-table-name>
          <jonas-ejb-relationship-role>
            <ejb-relationship-role-name>Establishment-has-many-categories</ejb-relationship-role-name>
            <foreign-key-jdbc-mapping>
              <foreign-key-jdbc-name>DB_CATEGORY_ID</foreign-key-jdbc-name>
            </foreign-key-jdbc-mapping>
          </jonas-ejb-relationship-role>
          <jonas-ejb-relationship-role>
            <ejb-relationship-role-name>Category-has-many-establishments</ejb-relationship-role-name>
            <foreign-key-jdbc-mapping>
              <foreign-key-jdbc-name>DB_ESTABLISHMENT_ID</foreign-key-jdbc-name>
            </foreign-key-jdbc-mapping>
          </jonas-ejb-relationship-role>
        </jonas-ejb-relation>
    </jonas-ejb-jar>Here are the two classes for the beans
    package com.softwareag.test_guide.establishmentEJB;
    import java.util.Collection;
    import java.util.Iterator;
    import javax.ejb.CreateException;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.RemoveException;
    import com.softwareag.test_guide.ejb.util.PGServiceLocator;
    import com.softwareag.test_guide.ejb.util.PGServiceLocatorException;
    import com.softwareag.test_guide.gradeEJB.PGGradeLocal;
    import com.softwareag.test_guide.visitorCommentEJB.PGVisitorCommentLocal;
    import com.softwareag.test_guide.visitorCommentEJB.PGVisitorCommentLocalHome;
    * @author Julien Martin
    public abstract class PGEstablishmentBean implements EntityBean {
         public Integer ejbCreate(
              Integer id,
              String name,
              Collection visitorComments,
              Collection grades,
              Collection countries,
              Collection categories)
              throws CreateException {
              setId(id);
              setName(name);
              setVisitorComments(visitorComments);
              setGrades(grades);
              return null;
         public void ejbPostCreate(
              Integer id,
              String name,
              Collection visitorComments,
              Collection grades,
              Collection countries,
              Collection categories) {
              setCountries(countries);
              setCategories(categories);
         //Business methods
         public int getAverageGrade() {
              Collection grades = this.getGrades();
              if (grades.size() == 0) {
                   return 0;
              } else {
                   Iterator iterator = grades.iterator();
                   int total = 0;
                   while (iterator.hasNext()) {
                        PGGradeLocal pGGradeLocal = (PGGradeLocal) iterator.next();
                        Integer amount = pGGradeLocal.getGrade();
                        total = total + amount.intValue();
                   float average = total / grades.size();
                   int roundedAverage = Math.round(average);
                   return roundedAverage;
         public void addComment(Integer id, String comment) {
              try {
                   PGVisitorCommentLocalHome pGcommentHome =
                        (PGVisitorCommentLocalHome) PGServiceLocator.getInstance().getLocalHome("PGVisitorCommentHome_L");
                   PGVisitorCommentLocal pGcomment = pGcommentHome.create(id, comment);
                   Collection pGcomments = this.getVisitorComments();
                   pGcomments.add(pGcomment);
              } catch (PGServiceLocatorException e) {
                   e.printStackTrace();
              } catch (CreateException e) {
                   e.printStackTrace();
         //Persistence fields
         public abstract Integer getId();
         public abstract void setId(Integer id);
         public abstract String getName();
         public abstract void setName(String name);
         //Relation fields
         public abstract Collection getVisitorComments();
         public abstract void setVisitorComments(Collection visitorComments);
         public abstract Collection getGrades();
         public abstract void setGrades(Collection grades);
         public abstract Collection getCountries();
         public abstract void setCountries(Collection countries);
         public abstract Collection getCategories();
         public abstract void setCategories(Collection categories);
         //Callback methods
         public void setEntityContext(EntityContext ec) {
         public void unsetEntityContext() {
         public void ejbLoad() {
         public void ejbStore() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void ejbRemove() throws RemoveException {
    package com.softwareag.test_guide.visitorCommentEJB;
    import javax.ejb.CreateException;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.RemoveException;
    * @author Julien Martin
    public abstract class PGVisitorCommentBean implements EntityBean {
         public Integer ejbCreate(Integer id, String comment)throws CreateException {
              setId(id);
              setComment(comment);
              return null;
         public void ejbPostCreate(Integer id, String comment) {}
         //Persistence fields
         public abstract Integer getId();
         public abstract void setId(Integer id);
         public abstract String getComment();
         public abstract void setComment(String comment);
    //     public abstract Integer getEstablishment_id();
    //     public abstract void setEstablishment_id(Integer establishment_id);
         //Callback methods
         public void setEntityContext(EntityContext ec) {}
         public void unsetEntityContext() {}
         public void ejbLoad() {}
         public void ejbStore() {}
         public void ejbActivate() {}
         public void ejbPassivate() {}
         public void ejbRemove() throws RemoveException  {}
    }I get the following error from MYSQL:
    22:57:10,203 : JOnASVisitorCommentEJBBean.ejbPostCreate : Failed to create bean:
    java.sql.SQLException: General error,  message from server: "Column 'DB_ESTABLISHMENT_ID' cannot be null"
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1626)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:886)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:945)
            at com.mysql.jdbc.Connection.execSQL(Connection.java:1844)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1602)
            at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1488)
            at jorm.rdb.mysql.VisitorsCommentBinding.insertVISITORS_COMMENTSTable(VisitorsCommentBinding.java:558)
            at jorm.rdb.mysql.VisitorsCommentBinding.write(VisitorsCommentBinding.java:147)
            at com.softwareag.test_guide.visitorCommentEJB.JOnASVisitorCommentEJBBean.ejbPostCreate(JOnASVisitorCommentEJBBean.java:283)
            at com.softwareag.test_guide.visitorCommentEJB.JOnASVisitorCommentEJBLocalHome.create(JOnASVisitorCommentEJBLocalHome.java:76)
            at com.softwareag.test_guide.establishmentEJB.PGEstablishmentBean.addComment(PGEstablishmentBean.java:71)
            at com.softwareag.test_guide.establishmentEJB.JOnASEstablishmentEJBLocal.addComment(JOnASEstablishmentEJBLocal.java:170)
            at com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeBean.addComment(PGSessionFacadeBean.java:80)
            at com.softwareag.test_guide.sessionFacadeEJB.JOnASPGSessionFacadeEJBLocal.addComment(JOnASPGSessionFacadeEJBLocal.java:168)
            at com.softwareag.test_guide.web.temp.PGBusinessDelegate.addComment(PGBusinessDelegate.java:93)
            at com.softwareag.test_guide.web.temp.PGCommentsManagedBean.addCommentAction(PGCommentsManagedBean.java:13)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
            at javax.faces.component.UICommand.broadcast(UICommand.java:312)
            at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
            at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:241)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:499)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:263)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:140)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
            at java.lang.Thread.run(Thread.java:536)
    22:57:10,203 : JFactory.postInvoke : system exception in business method:
    javax.ejb.EJBException: Failed to create bean: General error,  message from server: "Column 'DB_ESTABLISHMENT_ID' cannot be null"
            at com.softwareag.test_guide.visitorCommentEJB.JOnASVisitorCommentEJBBean.ejbPostCreate(JOnASVisitorCommentEJBBean.java:288)
            at com.softwareag.test_guide.visitorCommentEJB.JOnASVisitorCommentEJBLocalHome.create(JOnASVisitorCommentEJBLocalHome.java:76)
            at com.softwareag.test_guide.establishmentEJB.PGEstablishmentBean.addComment(PGEstablishmentBean.java:71)
            at com.softwareag.test_guide.establishmentEJB.JOnASEstablishmentEJBLocal.addComment(JOnASEstablishmentEJBLocal.java:170)
            at com.softwareag.test_guide.sessionFacadeEJB.PGSessionFacadeBean.addComment(PGSessionFacadeBean.java:80)
            at com.softwareag.test_guide.sessionFacadeEJB.JOnASPGSessionFacadeEJBLocal.addComment(JOnASPGSessionFacadeEJBLocal.java:168)
            at com.softwareag.test_guide.web.temp.PGBusinessDelegate.addComment(PGBusinessDelegate.java:93)
            at com.softwareag.test_guide.web.temp.PGCommentsManagedBean.addCommentAction(PGComments                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

    Thanks all for replying,
    The error occurs when I run the client and not at deploy time. Here is the client code:
         public void addComment(Integer primaryKey, String comment) {
              System.out.println("primaryKey------>" + primaryKey);
              try {
                   PGEstablishmentLocalHome establishmentHome = (PGEstablishmentLocalHome) PGServiceLocator.getInstance().getLocalHome("PGEstablishmentHome_L");
                   PGEstablishmentLocal establishmentLocal = establishmentHome.findByPrimaryKey(primaryKey);
                   establishmentLocal.addComment(primaryKey,comment);
              } catch (PGServiceLocatorException e) {
                   e.printStackTrace();
              } catch (FinderException e) {
                   e.printStackTrace();
    u haven't defined the PK entry in the Establishment EJB Bean in DDYes look in the standard DD.
    What's more I need both DD as I would with most ejb containers.
    The field DB_ESTABLISHMENT_ID is required and I cannot set it to NULL.
    Any other help greatly appreciated.
    Julien Martin.

  • Need help with a field to increment points

    There is a business need to add points for some of our accounts. Example is that if an account is a training account, we need to add 5 points. If the same account has a special program tied to it, it gets another 3 points, so on and so forth..
    I need to know what kind of a field I can set up for this to capture the points. It seems the field will need to be a calculated field. However, how can I store the matrix?
    Then, we need to run a report to show points by account.
    I'm really in need of help here .. not sure how to address this business need.
    Thanks,
    Anita

    Hi !
    If you only need a report showing your accounts ordered by points, you'll have to build your report and use the CASE WHEN ... THEN ... ELSE ... END function. If you have for example 3 checkboxes when :
    the 1st brings 3 points
    the 2nd brings 7 points
    the 3rd brings 12 points
    You'll have in your report something like :
    Column 1 : Account Name
    Column 2 : Checkbox1 (CASE WHEN checkbox1 = 'Y' THEN 3 ELSE 0 END)
    Column 3 : Checkbox2 (CASE WHEN checkbox2 = 'Y' THEN 7 ELSE 0 END)
    Column 4 : Checkbox3 (CASE WHEN checkbox3 = 'Y' THEN 12 ELSE 0 END)
    Column 5 : Total (Column 2 + Column 3 + Column 4)
    You can easily do the same with picklist values :
    CASE WHEN pick1 = 'val1' THEN 3
    WHEN pick1 ='val2' THEN 8
    ELSE 0 END
    And if you need to display a score on the account detail page, I'll suggest to create a web applet displaying a report calculating the score the same way than above, but with the AccountId as parameter.
    Hope this will help, feel free to ask more !
    Max

  • Need help with string field formula

    Post Author: dshallah
    CA Forum: Formula
    What I am trying to accomplish:
    The report has item numbers and each item number has the
    potential to be associated with up to three u2018binsu2019. So the fields are u2018item
    numberu2019, u2018bin1, u2018bin2u2019 and u2018bin3u2019.
    I tried to write a u2018if thenu2019 statement that would only show
    records that had a value of less than 1 in each u2018binu2019 field. When I try to
    write the statement I get a message that says u2018A string is required hereu2019 and
    it highlights the number 1 in my statement. I have a feeling itu2019s because the u2018binu2019
    fields are string fields and not number fieldsu2026? So I am not sure the proper
    procedure to correct this. Thus help is needed and appreciated.
    Here is what I wrote:
    if {IC_LOC_HIST.BIN_NAME_1} < 1 then
    {IC_LOC_HIST.BIN_NAME_1}
    What is correct way to write a statement that will show me
    the zero values in each column of bin fields?
    Thanks!

    Post Author: bettername
    CA Forum: Formula
    You must have a non-numeric value in there somewhere - up in the top left of the formula editor window, it'll show you the variables you've passed to the formula, which should help track down what's going on.
    You could try and check that the value is a number first by using something like:
    if isnull({IC_LOC_HIST.BIN_NAME_1}) = false and isnumeric({IC_LOC_HIST.BIN_NAME_1}) = false and then "Error - Should be a Number!"
    else
    if isnumeric({IC_LOC_HIST.BIN_NAME_1}) = true and tonumber({IC_LOC_HIST.BIN_NAME_1})<1 then {IC_LOC_HIST.BIN_NAME_1})

  • How to retrieve online form with populated fields?

    Greetings, SDN members!
    I have a WD Java application which embeds an Adobe Interactive Form inside.
    There are a couple of fields in this form, which are binded to context, as the PDF form itself (througjh binary pdfSource attribute).
    My scenario requires saving the form in KM after user fills out several fields.
    I am trying to save the form through an WD action, button to which is placed outside the form itself (regular WD button).
    My problem is once I try to save the binary content of the form, it doesn't include the information filled by end users, it only gives me those fields that were populated automatically.
    My intuition tells me I should add some script that "updates" the binary content before I save it to KM.
    Any ideas?

    Hi Ivan,
    Hope you have inserted WebDynpro Script from Utilities.
    When you do this step some built in javascript gets inserted into the form which enables the communication between WebDynpro and Form through script file "ContainerFoundation_JS".
    Please check the following threads as well
    [Problem with submit button]
    [Submit Button - Onclick event ?]
    [Problem when using submit to sap button in adobe form based on web dynpro j;
    Thanks & Regards,
    Sanoosh

  • Help with Dynamic field replacement

    Hi,
    This is my problem. I have a table with two columns - PRINT , NAME.
    The data in the two columns are : ("My name is <?NAME?>", "Micheal")
    In BI Pub, I wrothe the dataset as " select PRINT, NAME from TABLE "
    In templete builder, what should I do to get the final output as *" My name is Micheal"*
    But I am getting "My name is <?NAME?>" I need to replace "<?NAME?>" with "Micheal". i.e dynamic Merge field replacement with in a field.
    Hope I made it clear.....Help would be appreciated. I am a newbie here !!
    Edited by: user2899051 on May 12, 2009 7:49 AM

    You cannot parse the string as element :)
    so , its not possible, you are trying to build the template from DB Table.
    <?NAME?> , this syntax will be parsed by tempalte.
    If you put it in String in XML. like [ MY Name is "<?NAME?>"] , it will considered as String. and not as a data element to be parsed.
    Its not possible.
    Instead of doing this,
    <ROW>
    <PRINT>Letter from</PRINT>
    <TOBEPRINTED>1</TOBEPRINTED>
    <NAME>Canaopy</NAME>
    <ADDRESS> NY</ADDRESS>
    </ROW>
    - <ROW>
    <PRINT>Send letter to </PRINT>
    <TOBEPRINTED>2</TOBEPRINTED>
    <NAME>Mann</NAME>
    <ADDRESS> CA</ADDRESS>
    </ROW>
    </ROWSET>
    If you can get the TOBEPRINTED column,
    which indicates
    what to be printed.
    1- name
    2- Address
    we can write a if statement in template to display based on the value.
    But again the position will be a problem, multiple replacement will be a problem
    its like, creating the logic of display template in XML.

  • Help with Date field

    Hi,  I am having two problems with the date field in a form I developed.  1.  One of my date fields is for Date of Birth.  When a user enters any year 1929 or earlier, it automatically converts it to 2029.  So I cannot enter in anyone 80 years old or older.  How do I fix this?  2.  When I open the form in my Adobe reader to test it as my users would I am able to use the feature in the date drop down where you click on the white area in-between the arrows at the top and it allows you to quickly get to dates in the early 1900s.  For some reason my users who I sent my form to cannot use this feature.  The top of their date drop down box is blue.  How do I fix this?
    Thanks in advance!

    For your 1st issue it looks like it might be a bug. If I overtype the year after it has been populated it will hold the right year so to me it is an interpretation of what is being passed by the calendar control.
    For the 2nd issue, th edifferent calendar is showing up because they are using older versions of Acrobat/Reader. If you click on the year in the blue header then scrolling controls will appear to the right of the year. You can click the up/down controls to cycle to the correct year.
    Paul

  • Help with Date Field properties

    I have a problem setting properties for date field. I want date in mm/dd/yy format, that i am able to but I want something like this. When someone enters date as just numbers like 080708, it should automatically make it as 08/07/08.
    I tried doing some setting but couldn't find any help appreciated.
    thanks

    You will need to adjust the validation patterns in the Value tab on the object palette. There are four patterns that you can play with (Display, Edit, Validation and Data). Each pattern will affect the field data at different times. To get access to the patterns click on the Validation Pattern...button. A new dialog will open up with the 4 patterns available to you. The display pattern is how the data will be shown on screen. The edit pattern is how the user will enter the data, the Validation pattern is how the field will be validated and the Data pattern is how the data will appear in the saved XML.
    In your case you will want to set a disply pattern of DD/MM/YY and an edit pattern of DDMMYY. This will allow the user to enter 080708 or 08/07/08 and it will display 08/07/08 all of the time.
    Hope that helps

  • Help with a field exit

    Hi experts, I'm new on SAP, and I have to deactivate a field exit on the Standard Transaction MIRA, how can i do thath?

    Transaction Code - MIRA                     Fast Invoice Entry
    Exit Name           Description
    LMR1M001            User exits in Logistics Invoice Verification
    LMR1M002            Account grouping for GR/IR account maintenance
    LMR1M003            Number assignment in Logistics Invoice Verification
    LMR1M004            Logistics Invoice Verification: item text for follow-on docs
    LMR1M005            Logistics Inv. Verification: Release Parked Doc. for Posting
    LMR1M006            Logistics Invoice Verification: Process XML Invoice
    MRMH0001            Logistics Invoice Verification: ERS procedure
    MRMH0002            Logistics Invoice Verification: EDI inbound
    MRMH0003            Logistics Invoice Verification: Revaluation/RAP
    MRMN0001            Message output and creation: Logistics Invoice Verification
    No of Exits:         10
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
    Exits are basically the hooks whcih SAP has provided to add your own code. There are two types of Exits:
    1. Customer exits: Implemented as Function Modules within z includes. Anybody can change it and no access key is required.
    2. User Exit: Implemented as subroutines within includes (any include except y or z includes). You need access for the specific include and then you can any subroutine (user exit) within that Include.
    BADIs are the enhanced version of user exits where the same logic is implemented via classes and object (OOP)
    Enchancement point is the latest once introduces with ECC6.0 . Not very sure about that but you can change it without any access key.
    Please go through the following link which will help you understand the exits in a much better way:
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec07a25db911d295ae0000e82de14a/content.htm
    http://www.sap-img.com/abap/what-is-the-difference-between-smod-and-cmod.htm
    http://sap.niraj.tripod.com/id21.html
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
    http://www.sap-img.com/ab038.htm
    User Exits.
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    customer exits
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
    Menu Exit.
    http://www.sappoint.com/abap/spmp.pdf
    http://www.sappoint.com/abap/userexit.pdf
    http://www.sapdevelopment.co.uk/enhance/mod_sapmenu.htm
    http://www.sapdevelopment.co.uk/enhance/enhancehome.htm
    Rewards if useful.........
    Minal

  • Need help with calculated fields in Adobe Interactive Forms

    Hi Gurus,
    I have an Adobe Interactive form in which i have radio buttons. Upon selecting any of the radio buttons, value in text box should be changed( Calculqated filedS). How i can achieve this?
    Regards,
    Srini
    Moderator message: wrong forum, please post again in Adobe Interactive Forms, but always try yourself before asking.
    Edited by: Thomas Zloch on Jul 13, 2010 11:58 AM

    Hi Tapan
    No, it's working ,with  one remark.
    I've done a mistake, in the final formula. The logic remain the same! ;)
     The calculation values for second column ( COL2 ) are 1,2,3 and not 0,1,2 as I wrote  before and as for COL1 are so the formula is
    =3*if(COL1="ABC",0,IF(COL1="DEF",1,2)+if(COL2="RST",1,IF(COL2="YYZ",2,3)
    and not
    =3*if(COL1="ABC",0,IF(COL1="DEF",1,2)+if(COL2="RST",0,IF(COL2="YYZ",1,2)
    I created also a real example  for you, with 2 dif calculation ways . First I created 2 calc_columns for COL1 and COL2 ( CALC_COL1+CALC_COL and after I added both these 2 column , and second way is to calculate directly) .
    Check this image
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • MS Project 2007 - Help with custom field calculation for grouped by dates view

    Hello 
    I am trying to creat a view that counts number of students in courses (while # Students is a custom field that is filled manually and courses are tasks).
    The view should be grouped by Quarters, Months, and weeks (Calculated custom Text fields)
    The weeks groups are displayed by the start day of each week.
    For example:
    The view counts how many students are in courses in a specific week/month/quarter.
    This is the group by definition:
    Those are the fields calculations:
    “WW_Start” field calculation:
    (Year([Start]) & "  W " & Format([Start],"WW") & " " & "   [" & Datevalue(ProjDateSub([Start],CStr(Weekday([Start])-1),"Standard")) & "]")
    “MM” field calculation:
    Year([Start]) & "  M " & Format([Start],"MM")
    Basically it works but it doesn't cover a situation where a course is more then a week.  
    Lets say that the duration of the task is 12 days, the task should appear on 3 different weeks groups.
    But what i did puts the tasks only in the group that shows the first week of the task.
    How can i change my calculations or my view so that in the second, and third week of the task it will also show the task and it's attributes.
    For example:
     - "UV5 ACM" task should also be in W 45 not just W 44.
    Anyone has an idea how to do that?
    Ofir Marco , MCTS P.Z. Projects

    Hi
    First, thanks for the comment "nice neat groups" :)
    I think you understood correctly what is my issue.
    Second, about your question:  the class have the same number of students during the course period.
    It will have 10 students even if the duration is 1 day or 10 days.
    if you look at the basic gantt chart you will see a row like this:
    Task name        Duration        Num_Students     Resource names (Instructors)
    Course YYY       10d                10                       
    Instructor X
    it is an attribute on the task, not the assiment.
    When i group by dates (Weeks, months, quarters) or by another field (can be course type for example) i the students are summed in the task summary level for all tasks.
    Lets say i group by all the tasks (Classes) that are in the 1st quarter, and lets say for the example that there are 3:
    Task 1 -->  5 students
    Task 2 --> 10 students
    Task 3 --> 7 students
    Then, the group by summary should count:
    Quarter 1 - 2014:   22 (students)
    Task 1 --> 5
    Task 2 --> 10
    Task 3 --> 7
    By the way, it doesn't matter if the version is project 2007,2010, 2013, the logic is the same.
    Hope it helps and i'll be glad to have some ideas or evan get examples for solution in a project file by e-mail.
    Ofir Marco , MCTS P.Z. Projects

Maybe you are looking for

  • SCSM SSP Webpart Auto-Sizing

    SCSM 2012 R2.  The SSP and SharePoint Foundation 2010 SP2 are installed on a Windows Server 2012 R2 box.  I'm trying to change the webpart's size from the default 660px to auto-size.  I've changed the setting from within SharePoint, but the control s

  • HT4623 In trying to download itunes 11 I keep getting the message, verfiy that you have access to parental advisory. When I click yes it continually re tries but doesn`t load. Any ideas ???

    In trying to download itunes 11, I keep getting the message, verfiy that you have access to parental advisory. When I click yes it continually re tries but doesn`t load. Any ideas ??? Actual message Error writing to file;C:\programs files(x86)\itunes

  • Blu-ray Disc size not changing.

    I followed adobes workflow for final cut to encore cs4 by using compressor to create and MPEG2 Elementary stream Blu-ray file. now when i take the file (20GB) into encore the blu-ray project and my disc info always says 28 GB. I am trying to trim the

  • Playing the DVD on VLC player

    Hi there I have authored a dvd in dvd studio pro and it has to play on PCs. Since it is very copy heavy it looks really crappy when played in WMP. Someone suggested i include vlc player on the dvd to play off and indeed the quality is great. it howev

  • Condition based maintenance plan

    Dear Experts, Can anybody clarify me about the condition based maintenance plan? How the plan is created and measuring points and measuring documents are controlled? My requirement is as follow: I have one equipment, for that equipment I have created