Table validation question

Hi
I have created 2 tables zposition, zwork.
The fields in zposition is department and position.
The fields in zwork is empid, department, position, firstname and lastname.
I wanted to create a validation that when i insert the data into the zwork, the system will automatically check against the zposition tables for the department and position that was store inside it. How do i do it?

in ur zwork table where u find the fields department and position..
in the table fields of zwork just put the cursor on this field say department and click the key button(on the top) it will propose for a check table and in there give the zposition table relavant field department.
the answer is there in ur question itself ...
// check against the zposition tables for the department and position--> u need to propose the check table on that field .
so all in ur are validating the zwork department entry with zposition department field..

Similar Messages

  • How to use a bind variable in a table-validated flexfield

    Hi,
    I want to prepare a table-validated descriptive flexfield, which uses as source a select statement.
    So, in the form "Validation table information" I use as table name the statement:
    (SELECT my_procedure('test_value') FROM DUAL)
    Up to here it works fine.
    But instead of 'test_value' I want to use the value of a field in the form or a value of another flex (using $FLEX$ bind variables).
    Please advice if it is possible to perform this in "table name" statement. I use it in "where/order by" clauses and it works fine.
    Thank you.

    Hi,
    I have posted in the place where you did advise,
    https://forums.oracle.com/thread/2560192
    but they reply there that this is an EBS question, with no much relation to dev tools in general.
    Please, can I continue in this place with this question?
    Thank you.

  • How to use the :$PROFILE$ token in a table validation value set

    Hi Community,
    Let me explain the scenario.
    We have a Flex Value Set (CLIENTES SERVICIO DIRECTO) with a table validation, included in the PO Headers DFF, which shows a LOV with the Ship-to addressfrom the customer which we want to serve the goods; i.e. we are acting as a commisionists and the supplier puts the goods in the Ship-to address of the customer.
    This Flex Value Set, as I mentioned, have a table validation, with the following validation table information:
    Table Application: Oracle Receivables
    Table Name: RA_ADDRESSES_ALL a, RA_CUSTOMERS b
    Table Columnns: b.CUSTOMER_NAME Varchar2(20), a.PARTY_LOCATION_ID Varchar2(20)
    Where/Order By: a.CUSTOMER_ID = b.CUSTOMER_ID
    Additional Columns: a.ADDRESS1 "Dirección"(20), a.CITY "Ciudad"(10)
    If we translate this to a SQL code:
    select a.address1,
    a.city,
    a.party_location_id,
    b.customer_name
    from ra_addresses_all a,
    ra_customers b
    where a.customer_id = b.customer_id
    and b.customer_id = 6283 <--- This last condition clause is for narrowing the result to the interested customer.
    This select retrive us two records; for the same customer, one of them for one organization_id (let's say 85) and one of them for the other organization_id (84).
    What we are looking for and want is that the LOV, which actually display the two records, shows only the ship-to site of the customer that belongs to the organization_id which belongs the user who queries or creates the Purchase Order.
    I.e. Suppose that we enter to Purchasing using the responsibility assigned to the Operating Unit or Organization_id 84. We want that theLOV only shows the Ship-to Site from the customer that belongs to the Operating Unit or Organization_id 84.
    I believe that we can achieve this using the :$PROFILE$ token, but we do not know how.
    Any ideas?
    Thanks a lot for your answer.

    Hi Rcana,
    We have just test your suggestion and it works. We believe that the correc sentence was fnd_profile.get('profile_name'), but the value feature solve the problem. Thanks for your help.
    Regards.

  • Table Validation - Report errors without losing changes

    Hi all,
    I am experimenting with table validation based on Denes Kubicek's example at http://apex.oracle.com/pls/otn/f?p=31517:41. I have had no problems getting this working,
    but I need to stop if loosing data when the validation rules are not met.
    If I have 10 rows in my table and the user updates 6 of these with valid new values and 1 with an invalid value then the submit button causes the error message to be shown as expected, but the page / table reverts back to the data from the databse and all the other changes are lost.
    How can I get the page to keep the entered values when the page is refreshed?
    Thanks,
    Martin

    Martin,
    You may need to replace the validation using JS. JS equivalent for Denes e.g.
    Put this in page HTML Header..
    <script type="text/javascript">
    function f_validate()
         var comm;
            var dept;
            var err ='';
         for (i=0;i < document.wwv_flow.f02.length;i++)
         comm = document.wwv_flow.f07.value;
         dept = document.wwv_flow.f08[i].value;
         if (comm > 2000 && dept == 20)
              err = err + 'Error at Row ' + i;
    if (err == '')
    doSubmit();
    else
    alert (err);
    document.wwv_flow.f07[0].focus();
    </script>
    Change the 'Submit' button target to URL and type javascript:f_validate(); as URL Target
    Cheers,
    Hari
    Edited by: Hari_639 on Oct 29, 2009 7:07 PM

  • Validate a value against table validation value set within PL/SQL

    Hi,
    I am trying to import price list lines along with Pricing attribute values.
    I have to validate the uploaded values against the pricing attribute value set, before I import them into base tables.
    Value set defined is of type table validation.
    I wanted to know if there are any public APIs that can be used to validate the value against the Value set values within my PL/SQL procedure
    Also please point me to documentation that lists various public PL/SQL APIs
    Regards,
    Mrutyunjay

    You can find functions and procedure for Value sets in packages FND_FLEX_VAL_API or FND_FLEX_VAL_UTIL.
    Example : get_table_vset_select gives you the select statement of your value set. Executing this statement will allow you to validate your values.

  • Jdev 11 Table validations bug.

    Validation errors on ADF editable table fires only when you change a row by clicking.
    If you press any submit button they disapear.
    Also validations dont fire if you navigate to a diferent row by pressing Tab key.
    is this a bug?
    Is there any way that these validation errors do not disapear when i press any button?
    details:
    [http://adfbugs.blogspot.com/2009/08/table-validations-bug.html]

    Hi,
    don't think this is a bug because you perform sever side validation that is not existing on the client. So this validation only happens when you change the row currency on the binding layer, which is not happening when you use the tab. To see this error immediately you would need to assign a submit event when leaving a filed. So if you set autosubmit=true on your cell component renderers then this fires quite happily (but who wants to pay the price for this ?)
    Frank

  • The data from my web page insert in SQL table as question marks

    I use Farsi language in my web page for inserting customer data. The data that is inserted in webpage and submitted, showed as ???? in SQL table. A lot of developers say that I should use N' before the Unicode character, but I don't know how I can use it
    in my code. I attached the code. Can someone say me where I should insert the N in my code?
    protected void cmdInsert_Click(object sender, EventArgs e)
    //Checking the validation of required fields
    if (cboCustomerType.Text == "" || cboTitle.Text == "" || SearchableName.Text == "" ||
    FinalName.Text == "" || NationalID.Text == "" || BusinessID.Text == "" || MobilePhone.Text == "")
    lblStatus.Text = "لطفا فیلدهای اجباری را حتما پر کنید";
    return;
    //define ADO.NET objects.
    string insertSQL;
    insertSQL = "INSERT INTO Customers(";
    insertSQL += "CustomerType,CustomerTitle,CustomerFirstName,CustomerLastName,CompanyType,";
    insertSQL += "CompanyName,SearchableName,FinalName,NationalCode,BusinessID,City,Address,PostalCode,";
    insertSQL += "Zone,MobileNumber,WorkPhone1,WorkPhone2,HomePhone,FaxNumber,Email,Website,Note)";
    insertSQL += "VALUES('";
    insertSQL += cboCustomerType.Text + "','";
    insertSQL += cboTitle.Text + "','";
    insertSQL += CustomerFirstName.Text + "','";
    insertSQL += CustomerLastName.Text + "','";
    insertSQL += cboCompanyType.Text + "','";
    insertSQL += CompanyName.Text + "','";
    insertSQL += SearchableName.Text + "','";
    insertSQL += FinalName.Text + "','";
    insertSQL += NationalID.Text + "','";
    insertSQL += BusinessID.Text + "','";
    insertSQL += City.Text + "','";
    insertSQL += Address.Text + "','";
    insertSQL += PostalCode.Text + "','";
    insertSQL += Zone.Text + "','";
    insertSQL += MobilePhone.Text + "','";
    insertSQL += Phone1.Text + "','";
    insertSQL += Phone2.Text + "','";
    insertSQL += HomePhone.Text + "','";
    insertSQL += FaxNumber.Text + "','";
    insertSQL += Email.Text + "','";
    insertSQL += Website.Text + "','";
    insertSQL += Note.Text + "')";
    SqlConnection con = new SqlConnection(connectionString);
    SqlCommand cmd = new SqlCommand(insertSQL, con);
    //try to open the database and execute the insert
    int added = 0;
    try
    con.Open();
    added = cmd.ExecuteNonQuery();
    lblStatus.Text = added.ToString() + "اضافه شد";
    catch (Exception err)
    lblStatus.Text = "Error inserting record.";
    lblStatus.Text += err.Message;
    finally
    con.Close();
    //If the insert succeed, refresh the customer list.
    if (added > 0)
    FillCustomerList();
    Regards,

    Because you're composing the SQL statement with string concatenation, you would put the "N" before the single quote,
    VALUES(N'";
                insertSQL += cboCustomerType.Text + "',N'";
                insertSQL += cboTitle.Text + "',N'"; // ...etc
    However, composing SQL statements with string concatenation is not a suggested practice because it's open to SQL injection (see:
    https://technet.microsoft.com/en-us/library/ms161953(v=sql.105).aspx). A safer way to do this is to use command parameters to represent the values (see SqlCommand.Parameters
    property). If you use parameters, you can specify parameter data type as SqlDbType.NVarchar, which will ensure your text values are passed in as Unicode. Also ensure that the columns in question are defined in the database table definition as Unicode (NVARCHAR
    rather than VARCHAR).
    Hope this helps, Bob

  • Validator Question

    Hi i am creating an application where a user simply enters their details such as name, email etc which should be then validated using the validator. If the details are correct it should redirect the user to my Acknowledge page, however if not it will put the user back to the original part displaying error messages to re-enter their details. Now as it stands i already have the a form for the user to enter their details, enterStudentDetails.jsp, and i am trying to test that their email is not left blank but when i do leave it blank, and hit the submit button, it goes into my Acknowledge.jsp page. That is the issue i have at the moment, and i am trying use the validator to check the input on the server side to display the error message.
    enterStudentDetails.jsp
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%--
    The taglib directive below imports the JSTL library. If you uncomment it,
    you must also add the JSTL library to the project. The Add Library... action
    on Libraries node in Projects view can be used to add the JSTL 1.1 library.
    --%>
    <%--
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    --%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Enter Student Details</title>
        </head>
        <body>
        <h1>Enter Student Details</h1>
        <html:form action="ValidateDetails">
            <table border="1">
                <thead>
                    <tr>
                        <td>Email :
                        <td><bean:message key="validatedetails.email" />
                        <th> <html:text property="email" size="32"/>
                        <th><html:errors property="email" />
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>First Name:</td>
                         <td><bean:message key="validatedetails.firstName" />
                        <td><html:text property="firstName"/></td>
                        <td><html:errors property="firstName"/></td>
                    </tr>
                    <tr>
                        <td>Last Name: </td>
                         <td><bean:message key="validatedetails.lastName" />
                        <td><html:text property="lastName"/></td>
                        <td><html:errors property="lastName"/></td>
                    </tr>
                    <tr>
                        <td> Password
                         <td><bean:message key="validatedetails.password" />
                        <td><html:password property="password"/></td>
                        <td><html:errors property="password"/></td>
                    </tr>
                    <tr>
                        <td> Confirm Password
                         <td><bean:message key="validatedetails.confirmPassword" />
                        <td><html:password property="confirmPassword"/></td>
                        <td><html:errors property="confirmPassword"/></td>
                    </tr>
                    <tr>
                        <td>Date of birth (dd/mm/yyyy):
                        <td><html:text property="dateOfBirth"/></td>
                        <td><html:errors property="dateOfBirth"/></td>
                    </tr>
                    <td><html:submit value="sign up!" />
                </tbody>
            </table>   
        </html:form>
        <%--
        This example uses JSTL, uncomment the taglib directive above.
        To test, display the page like this: index.jsp?sayHello=true&name=Murphy
        --%>
        <%--
        <c:if test="${param.sayHello}">
            <!-- Let's welcome the user ${param.name} -->
            Hello ${param.name}!
        </c:if>
        --%>
        </body>
    </html>ValidateDetails.java
    * ValidateDetails.java
    * Created on 10 April 2008, 22:00
    package com.myapp.struts;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionForward;
    * @author
    * @version
    public class ValidateDetails extends Action {
        /* forward name="success" path="" */
        private final static String SUCCESS = "success";
         * This is the action called from the Struts framework.
         * @param mapping The ActionMapping used to select this instance.
         * @param form The optional ActionForm bean for this request.
         * @param request The HTTP Request we are processing.
         * @param response The HTTP Response we are processing.
         * @throws java.lang.Exception
         * @return
        public ActionForward execute(ActionMapping mapping, ActionForm  form,
                HttpServletRequest request, HttpServletResponse response)
                throws Exception {
            return mapping.findForward(SUCCESS);
    }DetailsForm.java
    * DetailsForm.java
    * Created on 10 April 2008, 21:52
    package com.myapp.struts;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionMessage;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    * @author
    * @version
    public class DetailsForm extends org.apache.struts.validator.ValidatorForm {
       private int id;
        private String firstName;
        private String lastName;
        private String password;
        private String confirmPassword;
        private String email;
        private Date dateOfBirth;
        public int getId() {
            return id;
        public String getFirstName() {
            return firstName;
        public String getLastName() {
            return lastName;
        public String getPassword() {
            return password;
        public String getEmail() {
            return email;
        public Date getDateOfBirth() {
            return dateOfBirth;
        public String getConfirmPassword() {
            return confirmPassword;
        public void setFirstName(String s) {
            firstName = s;
        public void setLastName(String s) {
            lastName = s;
        public void setPassword(String s) {
            password = s;
        public void setEmail(String s) {
            email = s;
        public void setDateOfBirth(String s) {
            try {
                // TODO: put the date format in the resources file
                dateOfBirth = new SimpleDateFormat("dd/MM/yyyy").parse(s);
            } catch (ParseException e) {
        public void setConfirmPassword(String s) {
           confirmPassword = s;
           password = confirmPassword;
        public DetailsForm() {
            super();
            // TODO Auto-generated constructor stub
    /**  public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
            ActionErrors errors = new ActionErrors();
            if (getName() == null || getName().length() < 1) {
                errors.add("name", new ActionMessage("error.name.required"));
                // TODO: add 'error.name.required' key to your resources
            return errors;
       */struts-config.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <struts-config>
        <form-beans>
            <form-bean name="DetailsForm" type="com.myapp.struts.DetailsForm"/>
        </form-beans>
        <global-exceptions>
        </global-exceptions>
        <global-forwards>
            <forward name="welcome"  path="/Welcome.do"/>
        </global-forwards>
        <action-mappings>
            <action input="/enterStudentDetails.jsp"
                    validate="true"
                    name="DetailsForm"
                    path="/ValidateDetails"
                    scope="request"
                    type="com.myapp.struts.ValidateDetails">
                <forward name="success" path="/Acknowledge.jsp"/>
            </action>
            <action path="/Welcome" forward="/welcomeStruts.jsp"/>
        </action-mappings>
        <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
        <message-resources parameter="com/myapp/struts/ApplicationResource"/>   
        <!-- ========================= Tiles plugin ===============================-->
        <!--
        This plugin initialize Tiles definition factory. This later can takes some
        parameters explained here after. The plugin first read parameters from
        web.xml, thenoverload them with parameters defined here. All parameters
        are optional.
        The plugin should be declared in each struts-config file.
        - definitions-config: (optional)
        Specify configuration file names. There can be several comma
        separated file names (default: ?? )
        - moduleAware: (optional - struts1.1)
        Specify if the Tiles definition factory is module aware. If true
        (default), there will be one factory for each Struts module.
        If false, there will be one common factory for all module. In this
        later case, it is still needed to declare one plugin per module.
        The factory will be initialized with parameters found in the first
        initialized plugin (generally the one associated with the default
        module).
        true : One factory per module. (default)
        false : one single shared factory for all modules
        - definitions-parser-validate: (optional)
        Specify if xml parser should validate the Tiles configuration file.
        true : validate. DTD should be specified in file header (default)
        false : no validation
        Paths found in Tiles definitions are relative to the main context.
        -->
        <plug-in className="org.apache.struts.tiles.TilesPlugin" >
            <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />     
            <set-property property="moduleAware" value="true" />
        </plug-in>
        <!-- ========================= Validator plugin ================================= -->
        <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
            <set-property
                property="pathnames"
                value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
        </plug-in>
    </struts-config>Application Resource file
    errors.header=
    errors.prefix=<span style="color: red">
    errors.suffix=</span>
    errors.footer=
    DetailsForm.required.email=Email must be entered
    validatedetails.email=Email
    validatedetails.firstName=First Name
    validatedetails.lastName=Last Name
    validatedetails.password=Password
    validatedetails.confirmPassword=Confirm Password
    error.email.required=Email must be entered
    errors.header=<UL>
    errors.prefix=<LI>
    errors.suffix=</LI>
    errors.footer=</UL>
    errors.invalid={0} is invalid.
    errors.maxlength={0} can not be greater than {1} characters.
    errors.minlength={0} can not be less than {1} characters.
    errors.range={0} is not in the range {1} through {2}.
    errors.required={0} is required.
    errors.byte={0} must be an byte.
    errors.date={0} is not a date.
    errors.double={0} must be an double.
    errors.float={0} must be an float.
    errors.integer={0} must be an integer.
    errors.long={0} must be an long.
    errors.short={0} must be an short.
    errors.creditcard={0} is not a valid credit card number.
    errors.email={0} is an invalid e-mail address.
    errors.cancel=Operation cancelled.
    errors.detail={0}
    errors.general=The process did not complete. Details should follow.
    errors.token=Request could not be completed. Operation is not in sequence.
    welcome.title=Struts Application
    welcome.heading=Struts Applications in Netbeans!
    welcome.message=It's easy to create Struts applications with NetBeans.validation.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
    <form-validation>
        <form name="DetailsForm">
            <field
                property="email"
                depends="required,email">
                <arg key="DetailsForm.email"/>
            </field>
            <field
                property="firstName"
                depends="required">
                <arg key="error.firstName" />
            </field>
            <field
                property="lastName"
                depends="required">
                <arg key="error.lastName" />
            </field>
            <field
                property="password"
                depends="required,minlength">
                <arg key="error.password" />
                <arg1 name="minlength" key="${var:minlength}" resource="false" />
                <var>
                    <var-name>minlength</var-name>
                    <var-value>6</var-value>
                </var>
            </field>
            <field
                property="confirmPassword"
                depends="required,validwhen">
                <arg key="error.password" />
                <msg name="validwhen" key="error.password.confirm" />
                <var>
                    <var-name> test </var-name>
                    <var-value> (*this* == password) </var-value>
                </var>
            </field>
            <field
                property="dateOfBirth"
                depends="required,date">
                <arg key="Date of Birth" resource="false" />
                <var>
                    <var-name>datePatternStrict</var-name>
                    <var-value>dd/mm/yyyy</var-value>
                </var>
            </field>
        </form>
        <!--
         This is a minimal Validator form file with a couple of examples.
    -->
        <global>
            <!-- An example global constant
            <constant>
                <constant-name>postalCode</constant-name>
                <constant-value>^\d{5}\d*$</constant-value>
            </constant>
            end example-->
        </global>
        <formset>
            <!-- An example form -->
            <form name="logonForm">
                <field
                    property="username"
                    depends="required">
                    <arg key="logonForm.username"/>
                </field>
                <field
                    property="password"
                    depends="required,mask">
                    <arg key="logonForm.password"/>
                    <var>
                        <var-name>mask</var-name>
                        <var-value>^[0-9a-zA-Z]*$</var-value>
                    </var>
                </field>
            </form>
        </formset>
        <!-- An example formset for another locale -->
        <formset language="fr">
            <constant>
                <constant-name>postalCode</constant-name>
                <constant-value>^[0-9a-zA-Z]*$</constant-value>
            </constant>
            <!-- An example form -->
            <form name="logonForm">
                <field
                    property="username"
                    depends="required">
                    <arg key="logonForm.username"/>
                </field>
                <field
                    property="password"
                    depends="required,mask">
                    <arg key="logonForm.password"/>
                    <var>
                        <var-name>mask</var-name>
                        <var-value>^[0-9a-zA-Z]*$</var-value>
                    </var>
                </field>
            </form>
        </formset>
    </form-validation>Now, i have read a few articles on the subject but i am slighly confused in that in terms of creating a bean does it necessarily nead to be a dynamic bean? or can i still keep the one that i have right now for me to use validator. Can somebody provide some insight on what i would need to do because i am slighly confused.
    Thanks.

    oh, i didn't realize i could do that. I acutally already
    found a way to do it, if a whole bunch of if statments :) mhehe,
    but it works. i'lll try to do it your way :)
    another question. It seems that in my functions if i
    reference a field which is located on a different tab, it does not
    recoglize it, and i get a runtime error, unless i click on that
    tab, before clicking on the "validate" button.
    does anyone know why it's not recognizing it? do i need to
    somehow declare that field in my init()?
    Thanks!

  • Struts and validation question ?

    hi,
    i am using the struts framework for my application, i have a simple jsp logon page (username, password)
    i have defined a validtion.xml file
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE form-validation PUBLIC
              "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
              "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <!--
        Validation Rules for the Struts Example Web Application
        $Id: validation.xml,v 1.8 2003/05/25 22:51:20 dgraham Exp $
    -->
    <form-validation>
        <!-- ========== Default Language Form Definitions ===================== -->
        <formset>
            <form name="logonForm">
                <field property="username"
                        depends="required, minlength,maxlength">
                    <arg0   key="prompt.username"/>
                    <arg1   key="${var:minlength}" name="minlength"
                       resource="false"/>
                    <arg2   key="${var:maxlength}" name="maxlength"
                       resource="false"/>
                    <var>
                        <var-name>maxlength</var-name>
                        <var-value>16</var-value>
                    </var>
                    <var>
                        <var-name>minlength</var-name>
                        <var-value>3</var-value>
                    </var>
                </field>
                <field property="password"
                        depends="required, minlength,maxlength">
                    <arg0   key="prompt.password"/>
                    <arg1   key="${var:minlength}" name="minlength"
                       resource="false"/>
                    <arg2   key="${var:maxlength}" name="maxlength"
                       resource="false"/>
                    <var>
                        <var-name>maxlength</var-name>
                        <var-value>16</var-value>
                    </var>
                    <var>
                        <var-name>minlength</var-name>
                        <var-value>3</var-value>
                    </var>
                </field>
            </form>
            <form name="registrationForm">
                <field property="fromAddress"
                        depends="required,email">
                    <arg0   key="prompt.fromAddress"/>
                </field>
                <field property="fullName"
                        depends="required">
                  <arg0     key="prompt.fullName"/>
                </field>
                <field property="replyToAddress"
                        depends="email">
                    <arg0   key="prompt.replyToAddress"/>
                </field>
                <field property="username"
                        depends="required">
                  <arg0     key="prompt.username"/>
                </field>
            </form>
        </formset>
    </form-validation>i have also the validation-rules.xml file provided by the struts lib.
    i would like to force the content of 'username' property to be alphabetic.
    i guess i have to create my own element
    <validator name="alphabeticString"...> inside the validation-rules.xml file, but i am newbie in javascript programming.
    i have tree question.
    1) why the validation code inside the validator element is written in javascript since it's not going to be executed at client side???
    2)can i use java instead ? (to code teh validation ...)
    3)has anyone got a code to solve this problem ?
    thanks for your help

    i would like to force the content of 'username' property to be alphabetic.
    i guess i have to create my own element
    <validator name="alphabeticString"...> inside the validation-rules.xml file,
    but i am newbie in javascript programming.Not for something that simple... there's a validator rule called mask, which takes a regular expression as an argument, so if you want only a-z: "[a-zA-Z]*" should work.
    1) why the validation code inside the validator element is written in javascript since it's not going to be executed at client side???It is validated on the client, or can be. You have to include the javascript with the html:javascript tag library tag and specify the form name. Then you need to put the onsubmit="return validateFormName();" attribute in the form tag. If JS isn't supported, it'll still default back to the server side validation.
    2)can i use java instead ? (to code teh validation ...)Don't include the JS stuff.

  • Partitioning on a Table - Few Questions, Confusions

    Hello All,
       I've a table with around 300 Million Records. This Table has one Key Column (Auto Incremented by 1 ) and a Unique ID Field.
    Primary Key (Clustered Primary Key) was created on Key Column of this Table.
    Now If I want to partition this table based on UniqueID Field, SQL Server is not allowing me to do it! It throws the error something like "Partitioned Column should present in Primary Key (Clustered Index)"
    Is it mandatory that the partitioned column should definitely be present in the clustered index or primary key of the table if exists.
    Could someone tell me what are the prerequisites to partition a table that already have a primary key on FieldA and Unique Non Clustered Index on FieldB and I'd like to partition the table based on FieldC?
    Thanks in Advance...
    Unknown

    Hi Roger,
    I am a little confused, why do you want to partition a table based on a UniqueID? Partioning is more of a logical thing to do like dividing a table yearly, for ex the table can be divided on a year by year basis which would make more sense as the older data
    can be moved over to slow storage if it's used as often as the new one based on the environment.
    A UniqueID would just be a random number, I am not sure how are you planning to create a partition scheme on this and would that be effective.
    Just to answer your question, it's not mandatory to have a PK column included in the partitioning.
    For Ex, one of the scripts that I wrote
    --CREATE PARTITION FUNCTION PF_test (datetime)
    AS RANGE LEFT FOR VALUES
     ('2010-12-31 23:59:59.999',
     '2011-12-31 23:59:59.999',
     '2012-12-31 23:59:59.999',
     '2013-12-31 23:59:59.999',
     '2014-12-31 23:59:59.999',
     '2015-12-31 23:59:59.999')
    GO
    I would suggest that you watch the below video to have a better understanding:-
    http://technet.microsoft.com/en-US/sqlserver/gg545008.aspx
    Please mark the answer as helpful if i have answered your query. Thanks and Regards, Kartar Rana

  • SRM table CFF_CONT question : huge table, what is that table for ?

    Hello
    We are looking to have more details about table CFF_CONT on a SRM system
    The tolat size of DB is 344 GB
    and only for table CFF_CONT we do have 284 GB, compared to total size this is really huge
    the rest of the DB is only about 60 GB
    What is that table for ?
    Would it be normal to see that table on SRM growing much more than the others ?
    Is that table something that can be clean up ?
    Those questions are poping up becasue we are doing a system copy with sapisnt and R3load
    and we see that this table only is requiring a so huge amount of thime to be exported
    Regards

    By the way ...
    That CFF_CONT table belongs to cFolder components

  • Table design question

    Hello,
    I have a quick question on a table design. I currently have a table that will store approval information on a report. The individual report will need to go through 3 levels of approval before it's considered final. I have considered a few different scenarios on how to design the table but I'm not sure on what is the best choice. Currently I'm using 3 columns that will store each approval. For example,
    Table 1:
    file_id,
    subject,
    summary,
    division_approve,
    program_approve,
    group_approve
    I thought about using one column and simply stepping through a higher numeric value for each approval but found that doesn't work if I want to view items that were approved only at the division_approve level. Does anyone else have any suggestions? Hopefully I provided enough information.....
    Thanks in advance!
    Randy

    yes, better going for higher level of normalisation and desiging more tables:
    tab_aproval ( id,File_id,Approval_authority,rank )
    id      File_id Approval_level rank
    1     1 first_level 1
    2     1 second_level 2
    3     1 third_level 3
    4     2 first_level 1
    5     2 second_level 2
    tab_file_approval
    file_id, subject, summary, id
    1 'doc 1' 'first level done' 1
    1 'doc 1' 'second level done' 2
    1 'doc 1' 'third level done' 3

  • Size of dimention table  fact table ratio  question..

    Hey Guys !!!
    I have  very basic question regarding the ratio of size of dimention table and fact table..
    its mentioned that the ratio of dim table / fact table  sizes should not be greater than 1:20 for performance reasons .. thats OK..
    now lets say if i have fact table with customer dim_id ,some other dimention ids , and revenue (KF) .. with 1 million records ..
    so ideally my customer dimention table should not have more than  200,000 recods (.ie 200,000 different customers ).
    doesnt this put limitation on number of customers in a cube ?
    if so, how do we handle this ?
    please correct me if i am wrong  in interpreting the concept of dimension table.
    thanks in advance
    swapnil

    Hi ASRao ,
    thanks  for replying ...
    you said exactlly what i know  ..
    sorry i didnt put my question in correct prespective ...
    whay i meant was...
    lets say  , i need to have more than specified (1:20 ) number records in dimension table ,it will definately hamper my reporting performance ...
    so, is there any solution to handle this kind of problem ?
    like how would i maintain my efficiency of reporting in this case ?
    thanks in advance

  • Table validations

    i have couple of pages where i have an editable table. when user edits table data, i need to do some validations on values entered. these validations depend on other values of fields in row. table is based on a VO / Data control which is entity object based. sometimes i have to enable or disable a row and some fields depending on values of fields in a row. besides this, i have an action menu. i have to enable / disable command menu items depending on values of fields in row. what is the best practice / place to implement such validations. should these be kept at business components or view layer. jdev 11 1 1 6

    Validation is part of the business logic so it should be defined and enforced there. However (and this it what the framework does), some validations are better done in the UI as you otherwise need a roundtrip to the server.
    Next you have to think about the ui experiance the user have. If you disable fields right after he enters a value into another field it might disturb his thinking (e.g. he entered the wrong value in a field which causes other fields to get disabled). On the other hand users might like this as they always see what they can do and so see the error right away.
    It depends on the use case and the users how to do the validation. From what I read out of your use case it'll be a mix.
    Timo

  • Dynamic Table Creation Question

    Can you dynamically add a column to a data table at run time using JSC and JSF? I have a case where I want to add a column to a table based on a selection by the user.

    Hi
    I have been trying to this when I saw your question first time two days back. I tried changing the rowset's query but nothing seems to work. I will try again and I am sure that I can give you something on this if there is any straight solution to this.
    Thanks
    Srinivas

Maybe you are looking for