Need help with Time Field

Hi everyone,
I'm new to LiveCycle Designer and so far I'm loving it! I have a question on the time field.
I want the user to enter a time such as 8pm or 830pm and field to automatically display the time as 8:00 PM or 8:30 PM. I have not been able to achieve this.
If I use anything in the validation area, then I am forcing the user to enter the time in that format (so 8pm fails). If I don't put anything in the validation area, the system doesn't change the time (and it remains displayed as 8pm).
What am I doing wrong? Any help would be greatly appreciated!
Jose

I figured it out.
Thanks!

Similar Messages

  • 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 TIME CAPSULE!

    Hello, I am new to this forum and this is my first post. Currently I have a Macbook pro and it is really the only computer in my house I use. My Mom has a Macbook, My dad has a Apple Desktop and my brother a toshiba laptop.
    I am running OS X 10.5.8 on my macbook pro, Snow Leopard on the other.
    Tonight I got the time capsule, and I am really excited to get this working. To give a little background, I have FiOS and our modem is in the basement which runs directly to a verizon wireless router, MI424WR to be exact. I have a few questions about how to set it up because I tried to set it up like they said but when I plugged the Time Capsule into the Fios router and turned it on all I got on the Capsule was the blinking amber light. I ran an ethernet cord from one of the opened LAN ports on the router to the WAN port on the Capsule. I installed the Airport utility on my macbook and my dads desktop but still do not get any type of connection to the capsule. I am reading about bridging so I tried to do the manual set up in the Airport utility it just scanned and got nothing and I cannot even hit manual setup. My questions are..
    How exactly do I set up the Time Capsule, as I described it does it sound like I have everything plugged in correctly?
    Is it possible to completely get rid of the verizon router?
    How do I get any of my computers to pick up the time capsule?
    If you have any questions as to how I explained please just ask. I am really trying to get this set up because I do not want my dad to think he wasted 350 dollars on something that is completely useless for our home setup. Any help would be greatly appreciated. THANK YOU, Zach.

    No matter what, even when the TC is plugged into my MBP with an ethernet cable it does not read it.
    Disconnect any ethernet cables that you connected to the Time Capsule at the moment
    Hold in the reset button on the back until the amber light begins to blink more quickly and continue holding the button another 4-5 seconds when this occurs. Then release the reset button.
    Connect an ethernet cable from one of the available LAN <-> ports on the Verizon router to the WAN (circle of dots icon) port on the Time Capsule.
    You have two ways to configure the Time Capsule using either wireless or ethernet.
    To use wireless, click on the fan shaped Airport icon at the top of the computer screen and look for a wireless network with a name like Apple Network xxxxxx. Log on to that network first, then open AirPort Utility.
    To use ethernet, temporarily connect an ethernet cable from your Mac to one of the LAN <-> ports on the Time Capsule. Open AirPort Utility.
    When you open AirPort Utility, click Continue to follow the guided setup. You did not indicate whether you want to Time Capsule to provide a wireless network, but most users want that option. So, you when asked how you want to configure the Time Capsule, you would choose the "Create a new wireless network" option.
    As the Jolly Giant says, you will need to choose Bridge Mode when you see a choice of how to connect in the setup process. If you are an experienced computer user, you may want to configure the Time Capsule manually, but I would not recommend that you do this unless you know exactly what you are doing.
    My next step is to call verizon and say they need to get out here and fix this ** or I will be going back to comcast.
    Verizon has nothing to do with the Time Capsule problems that you have encountered. Blaming them will accomplish nothing.

  • 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:_
    &lt;/script&gt;
    &lt;script language="JavaScript1.1" type="text/javascript"&gt;
    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&lt;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}

  • 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})

  • 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

  • I need help with Time Machine - Won't back up properly

    I'm new to Macs, my MBP is barely a month old, so bare with me.  I do understand computers pretty well and I've been trying like **** to read up and fix this on my own, but it's starting to tick me off.
    Okay so I got a "WD My Passport" external HD for Xmas and my goal is to have Time Machine back everything up on it.  The problem started after a backup was halfway through and froze.  I thought wiping the Passport clean and starting over would do the trick, but it was tricky figuring out how to erase "Backup In Progess Files"
    I read up on the "Disk Utility" stuff and partioned the Passport, which set it back to normal it seemed like.  So I tried the backup one more time, but again it froze a little less than half way through.
    So now "Disk Utility" won't even let me erase the Passport or Partition it - it tries for about 10 minutes and eventually says it can't "unmount".  Yet when I enter Time Machine it shows that some files have been backed up in "Star Wars Mode", but it seems like that's only saved to the MBP itself?
    Please correct me if I'm wrong with my logic, and any help is much appreciated.  I'll provide further input if it helps too, just let me know.

    Sounds like a bad Passport may be the culprit. If Disk Utility can't erase or properly mount the drive, it may have serious problems.
    I've used Passports for Time Machine with great success, but I've also had to replace 2 of them as they eventually went bad. Try another external hard drive and I'll bet it works.

  • 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.

  • Need help with Timer function

    I am using a timer class for my application such that when i log in, i immediately call the timer.start function from the Timer.java class.
    The problem i am having, is that when this timer expires, it calls an exit function, but i want it to restart the original application. i have tried to create an instance of the old session to kill its timer and a new instance that spawns a new start page, but this doesnt work well because i have both applications running and if i close either one of them, both get killed!!
    Can anyone help me out in this regard?
    Sule.
    public void timeout()
            System.err.println ("terminating");        
            System.exit(1);
                         // instance.getContentPane().add(d2.new StartPage());                     
                         // instance.setVisible(true);
                         // previousInstance.timer.stop();
            }

    hey Uhrand.. thanks for your suggestions. I really appreciate them, however it doesnt completely solve my problem. As I stated before my Timer program runs in its own class file. so i have in one class file
    public class Timer extends thread {
    public static Application dl = new Application();
    public void timeout()
                          System.err.println ("Logging-Off");
            new Application();             
            dl.timer.stop();
            }and then i have another class file for the main program like this...
    import java.awt.*;
    import javax.swing.*;
    public class Application {
        public Application() {
            app = new JFrame("'Application' restarts every 15 seconds");
            app.add(new JLabel("Please watch the Title of this frame"));
            app.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            app.setBounds((screenSize.width-400)/2, (screenSize.height-150)/2, 400, 150);
            app.setVisible(true);
            (new Thread(new Timer(app))).start();
        public static void main(String args[]) {new Application();}
        private JFrame app;
        private JFrame app;
    }when the timer expires, i am not able to create a new Application without the old Application.
    I would appreciate it if you can respond.
    thanks
    salau

  • Need help with Time Stamps and saving Strings in Excel

    Hi, Am learing LabView now....and my task is
    Everytime start button is pressed, a Random number must be generated.
    The Random number is to be staroed in an Excel sheet such that the Random Number is in the first column and Time at which it was generated in the second column...
    I used to work with Agilent Vee before and am finding it hard to adjust to LabView
    Thanks
    Sanjay

    Am making the same mistake again......
    Here yougo in LV 8.5 version....
    The best solution is the one you find it by yourself
    Attachments:
    Time Number.vi ‏12 KB

  • New Mac-user need help with time machine

    Hi. I have jut got rid of everything that reminds me of a pc, and installed an Imac + one macbook and a macbook pro in the house. I have also installed an airport extreme and connected an external 500gb drive + a printer to it. The idea was to use this network drive as a network backup disk for the different machines.
    My question is: Can Time machine use this networkdisk to backup the different machines connected to the network? If so, how do I set it up. Right now this disk is not listed when I try to configure time machine.
    Hope somebody have time to answer.
    Thanks.
    terjem

    Unfortunately even though Apple had touted the AEBS USB2 HD use with TimeMachine (TM) they pulled it from the Leopard TM feature list about 1 week before releasing Leopard GNBuild 9A581.
    At this time Apple does not support use of the AEBS USB HD for use TM.
    I strongly suspect we will see this feature return in one of the next two updates Apple releases for Leopard.
    In the meantime be patient and I don't recommend you use a hack to circumvent the current TM limitation.

  • New user needs help with time machine and mac server.

    I am a new mac user and got a new mac mini running server.  I have time machine enabled on the server and a back up folder created.  My macbook will not see the server when trying to set up time machine from the macbook.  What am I missing?  Thanks.

    Unfortunately even though Apple had touted the AEBS USB2 HD use with TimeMachine (TM) they pulled it from the Leopard TM feature list about 1 week before releasing Leopard GNBuild 9A581.
    At this time Apple does not support use of the AEBS USB HD for use TM.
    I strongly suspect we will see this feature return in one of the next two updates Apple releases for Leopard.
    In the meantime be patient and I don't recommend you use a hack to circumvent the current TM limitation.

  • HT3275 Need help with Time Machine back up

    I keep receiving this message: Time Machine could not complete the back up. The back up disk image "Volumes/Data/A**** W**** Mac Book Pro. Sparse Bundle" could not be created. (error 1). Time Machine and Airport are up to date, as is the Macbook Pro. I have not been able to find a work around for this error. Any advice would be appreciated.

    There are different reasons for that problem. Follow the steps of this page > http://pondini.org/TM/C17.html

  • Need help with required fields for my online form

    Hi, I've been mucking around with my online form for a while
    and I just can't see what the problem is in the code.
    I am trying to make all but two of the form items to be
    required upon form validation. However, it doesn't work, nothing is
    required now.
    I'm using these two ways of doing it (natemail.php is my form
    handler).
    <form action="../NateMail.php" method="post"
    enctype="application/x-www-form-urlencoded" id="Man Meets Woman
    Long Form Opt-in"
    onsubmit="MM_validateFormMM_validateForm("date","first_name","last_name","alias","address ","city","prov_state","postal","country","phone","email","birthdate","Sex","marital_status ","other_forums","methods_known","want_learn","coaching","invite_friends","about_myself"," terms_conditions");return
    document.MM_returnValue">
    ...is one way and the other is:
    <input name="require" type="hidden" id="require"
    value="date,first_name,last_name,alias,address,city,prov_state,postal,country,phone,email ,birthdate,Sex,marital_status,other_forums,methods_known,want_learn,coaching,invite_friend s,about_myself,terms_conditions"
    />
    The page is
    http://www.vancouversocialboard.com/register.html
    Can anyone tell me my error and tell me the proper way to do
    this?
    Thank you!

    > (never did figure out what the 'MM_validateForm code was
    supposed to be)
    It's a call to a Dreamweaver javascript function that
    validates your form.
    The function definition should be in the head of the page.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "audio90" <[email protected]> wrote in
    message
    news:ghsljj$4ll$[email protected]..
    >
    quote:
    Originally posted by:
    Newsgroup User
    > On first glance, the problem seems to be that both the
    onsubmit event
    > and the JavaScript function inside are encapsulated with
    double quotes.
    > Try wrapping the onsubmit attribute/event in single
    quotes instead, like:
    >
    >
    >
    onsubmit='MM_validateFormMM_validateForm("date","first_name","last_name","alias"
    >
    ,"address","city","prov_state","postal","country","phone","email","birthdate","S
    >
    ex","marital_status","other_forums","methods_known","want_learn","coaching","inv
    > ite_friends","about_myself","terms_conditions");return
    > document.MM_returnValue'
    >
    >
    > [snip]
    >
    >
    >
    > No, it didn't work. But I solved it to be acceptable. I
    removed the
    > 'MM_validateForm and used the Natemail action. My
    mistake there was that I
    > put
    > "require" rather than "required". It comes up with a
    different screen when
    > form
    > items are missing, rather than a pop up video, but good
    enough.
    >
    > thanks
    >
    > (never did figure out what the 'MM_validateForm code was
    supposed to be)
    >
    >
    >

Maybe you are looking for