validation on multiple fields

Created a form on a table. Table 1 a div, lname, fname columns: id (non-null)

Need a validation: If all 3 fields are empty (fname, lname, div) so that it does not accept the entry of the form.

How to make a posting on multiple fields in apex? I can write a function like

If (: fname is null and: lname is null and: div is null) then return True else return False.

But how do you put it in the condition under the process in the Apex section? It means, basically, if all 3 fields are null then do not run line of the table1 process when the user click on create button.

Can someone give me some advice? Thanks in advance.

Tai

Tai,

You can create page apex level validation where you can do what you have specified.

In the definition of the Page, click on + sing against 'Validation', Slelect "Validation of levels Page" and THEN click, select "PL/SQL" click Next and select here "function that returns a Boolean" put your code.

Return the FALSE value - if the validation fails

See you soon
Hari

Tags: Database

Similar Questions

  • How to query the data of Contact with multiple fields

    How can I query the data of Contact with multiple fields?

    For example, I'll get contacts which are changed after a point at the specified time and whose country is US. How could I make the chain of research of the SOAP API "Query"?

    And I also want to know how to make a search term for RESTful API for contacts above.

    Any suggestions?

    Thank you.

    Hi Biao,

    The following document describes how query for multiple fields using the SOAP API: request a Contact from several fields.

    And you can search multiple fields using the REST API with the & operator. For example, to search for a Contact by e-mail address and date of creation:

    Hope this helps and please let us know if you need more information.

    Thank you

    Fred

  • problem with validation in the field with the radio button type in create profile jsp page

    Hello

    Kindly help me with the validation of a field with the type option button in the createProfile jsp page. Its actually not to validate the sex with radio button field.

    The code is as follows...

    < % @ page language = "java" contentType = text/html"; charset = ISO-8859-1"

    pageEncoding = "ISO-8859-1" % >

    <! – this taglib used to access dsp tags - >

    < %@taglib uri = "" / dspTaglib "prefix ="dsp"% >"

    < dsp:page >

    < dsp:importbean bean = "/ atg/userprofiling/ProfileFormHandler" / >

    < dsp:importbean bean = "/ atg/dynamo/drop/ErrorMessageForEach" / >

      <! DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / IN" "http://www.w3.org/TR/html4/loose.dtd" > ""

    < html >

    < head >

    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"

    < title > < /title > user registration Page

    < / head >

    < body >

    < dsp:form id = "registerForm" method = "post" action = "registration.jsp" >

    < div >

    < div > if please fill in all fields below and click Save

    button. < / div >

    < br / >

    < table >

    < tbody >

    < b >

    < td width = "150" > name < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.firstName"

    MaxLength = "30" size = "25" type = "text" required = "true" / > < table >

    < /tr >

    < b >

    Last name < td > < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.lastName"

    MaxLength = "30" size = "25" type = "text" required = "true" / > < table >

    < /tr >

    < b >

    < td > username < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.login"

    MaxLength = "30" size = "25" type = "text" required = "true" / > < table >

    < /tr >

    < b >

    password < td > < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.password"

    MaxLength = "30" size = "25" type = "password" required = "true" / > < table >

    < /tr >

    < b >

    < td > confirm password < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.password"

    MaxLength = "30" size = "25" type = "password" required = "true" / > < table >

    < /tr >

    < b >

    Identification of Email < td > < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.email"

    MaxLength = "30" size = "25" type = "text" required = "true" / > < table >

    < /tr >

    < b >

    Sex < td > < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.gender"

    Type = "radio" required = "true" > male < / dsp:input > < dsp:input

    Bean = "ProfileFormHandler.Value.Gender" type = "radio" "

    required = "true" > female < / dsp:input > < table >

    < /tr >

    < b >

    < td colspan = "2" > < dsp:input bean = "ProfileFormHandler.create"

    Type = "submit" value = "Save" / > < dsp:input

    Bean = "ProfileFormHandler.createSuccessURL" type = "hidden"

    value = "index.jsp" / > < table > "

    < /tr >

    < b >

    < td colspan = "2" >

    < ul >

    < dsp:droplet name = "ErrorMessageForEach" >

    < dsp:param bean = "ProfileFormHandler.formExceptions"

    name = 'exceptions' / >

    < name dsp:oparam = "output" >

    < li > < dsp:valueof param = "message" / > < /li >

    < / dsp:oparam >

    < / dsp:droplet >

    < /ul >

    < table >

    < /tr >

    < / tbody >

    < /table >

    < / div >

    < / dsp:form >

    < / dsp:page >

    < / body >

    < / html >

    Use code next, may be you do not value attribute set and causing a problem (data inconsistency problem) or case mismatch while storing data in the repository.

    <%Boolean checked = true;%>

    Sex:

    Male

    Female

    I do not know what will radio back button if the value is specified: a boolean value or the value aim to display (in your male cases),.

    If the problem is fixed, undo the change and please let me know what value he sent in your case.

    Please

    Thank you

    Nitin.

  • Import Format script to update multiple fields

    Following my previous post yesterday (Import Format script required for work in several areas , now I need my script import to Update several fields (two) at the same time, based on criteria across multiple fields. ) So far, I can use DW. Utilities.fParseString to assess values across several fields, but now I need to update not only the field in question, but also an additional field at the same time. For example:

    Function TBService (strField, strRecord)

    "How to upgrade a second field at the same time?
    Dim strField2 As String

    If left (strField, 1) = "S" Then
    If DW. Utilities.fParseString (strRecord, 3, 8, ',') = 'B1110"Then
    strField2 = "N101.
    On the other
    strField2 = 'network n/a '.
    End If
    TBService = strField
    On the other
    TBService = "Service s/o".
    End If

    End Function

    Is it still possible? Should I look for to create an event script that would work subsequent to importation? Or is it possible here in the import script?

    The second field you are trying to manipulate should have its own import script.

  • How to make a request for Validation on the field of comments in BPM Worklist task details Page

    Hello
    I am newbie to SOA 11 g.

    I use SOA 11 g and Jdev 11.1.1.3 for development. I created a human with two results (APPROVE, REJECT) and task able to display the page the task details in the BPM list. I have the comments of default section that comes by 'Auto generation of ADF Taskflow' in the Task Details page. This comments section will display the comments of several users who have access to the task. I want to add validation for the field of comments as below-

    (1) to DISMISS the action, we must check whether or not the APPROVER had provided the reason for REJECTION in the comments field. If this isn't the case, we need to display a popup asking him to provide observations of REJECTION.
    (2) on the action to APPROVE, no need to check for comments, so no validation is necessary.

    Can someone give me some ideas how it is possible.

    Thank you
    Udaya Neeliahgari

    Hello
    Try the following...
    In the composite open y'r process bpel... and then to expand the human task... you will notice a task entitled just before the initiateTask run the following two copy operation in the task of AssignTaskAttributes within the scope of the human task.

    IMP Note: The variable is the variable initiateTaskInput of the human task field. Don't assign not on on the global variable

    1 assign a string value "REJECT" in the expression (assuming that you do so that the result of REJECTION) and assign it to the variable

    /TaskService:initiateTask / task: task / mission: systemAttributes / task: preActionUserSteps / task: preActionUserStep / task: results

    2 assign the string value "PROVIDE_COMMENTS" in the expression and assign it to the variable

    /TaskService:initiateTask / task: task / mission: systemAttributes / task: preActionUserSteps / task: preActionUserStep / task: userStep

    view the .bpel file source y'r and make sure that you see something like the following:




    Query = "" / taskservice:initiateTask / task: task / task: systemAttributes / task: preActionUserSteps / task: preActionUserStep / task: result "/ >"




    Query = "" / taskservice:initiateTask / task: task / task: systemAttributes / task: preActionUserSteps / task: preActionUserStep / task: userStep "/ >"

    Just deploy the app... and when you try to dismiss... it should appear the message.

    concerning
    Raja

  • Validation of DateTime field (without custom management functions)

    Hello

    I need to know how I can validate if a date is correct or not and fail to do something.

    I have a DateTime Field field, with a pattern ' DD / MM / YYYY ', the value appears correctly using the selected template, the problem is validation.


    Now I just that if the date is wrong, teaches an alert to the user, and the focus returns to the DateTime control until you enter a valid value.

    I need something like:

    -Form1.SUBVENCION_O_AYUDA.dateTimeField1: Validate - (JavaScript, client).

    If (this.rawValue! = null & &! test (this.rawValue, ' DD/MM/YYYY')) {}

    xfa.host.setFocus ("this");
    }

    How will I know if the validation is successful or not (without having to implement long-standing management functions)?

    By default, if I put 'validation model messaga' field, a warning message is displayed, but here the emphasis is more and the user can continue to fill the rest of the form, whereas the datetime field is filled with an incorrect value.

    I want to warn the user to continue to fill out the form, if the value in the dateTime field is not valid.

    Any idea?

    Thank you!

    Hello

    If your date may not be formatted correctly against your view model then the formattedValue is equal to the rawValue.

    Thus, in the event output put;

    If (this.rawValue is this.formattedValue)

    {

    App.Alert ("enter a date in the dd/mm/yyyy" format "");

    xfa.host.setFocus (this.somExpression);

    }

    Bruce
  • Validation of custom field obj. 4: value of a field that is other req.

    Hi all

    I worked on a problem of validation of field for awhile. I have a custom on K4 drop-down list. This list of choices has two values YES and NO (a checkbox does not meet the conditions). What I do is if dropdown = "YES" then FieldA, FieldB and FieldC are needed elsewhere are not necessary. FieldA = FieldB = Date and FieldC = (short) text change. I tried many ways to validate in the fields A, B and C with statements such as IIf (list of choices = ValRech (list of choices, 'YES'), FieldA <>NULL, FieldA) or Iir (FieldValue (selection list) = 'YES', FieldA <>NULL, FieldA) etc... These are just my past attempts at this time I am trying just to random things to try to make it work. I'm probably using incorrect syntax (even if it passes the syntax checker). If anyone has any suggestions let me know. Also if I did not specify what it is I'm trying to let me know and I'll try to clarify.

    Thank you
    Z

    Hello

    If I understand correctly, you want this feature:

    If drop-down list = NO => any values are contained in the to field, B and C.
    If drop-down list = YES-online field is not null and field B is not null and C field is not null

    To trigger the validation when the value of the drop-down list, then you must configure the Validation in the field to the list of choices:

    [] = LookupValue("Picklist","NO") OR (Len ([]) > 0) AND Len ([]) > 0 AND Len ([]) > 0

    You have to put the validation also on Field_A and Field_B and Field_C, because in the case of an update of the, let's say, Field_B, you should prevent Field_B is deleted.
    If someone updates only Field_B and it does not change the value of the drop-down list, the validation on the choice list expression is not evaluated.

    Simona

  • Validations with multiple form provisions on a JSF page

    Hello Experts

    I have a page where I have several sections, each with a PanelFormLayout and a button "submit". My requirement is that when I click on the "submit" button, only this form must be validated. But in my case, the required fields in the other sections are being validated that I don't want.

    Is it possible to achieve it? Please suggest.

    What is available including all forms? High school-forms allows to ignore validation on other forms.

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/40-PPR-subform-169182.PDF

  • Validation of input field in the OPA for the optional input fields

    Hi all

    OPM, I have a text input field. To do this, I wrote an entry of Validation Using Regular Expressions to allow the alphabets and numbers.

    Also, I did the same field as "optional-always.

    Then in debugging, it is always check for the Input Validation and displaying the error message when I do not enter any value.

    How can I request an entry for an optional input field Validation.

    Thank you

    Siri

    I'm not an expert on regular expressions, but my guess here is that your regular expression must change. If an empty string is an acceptable entry, then you should allow for her in the regular expression. I don't know the regex code for this on the top of my head, but I hope that you will find quite easily with a few searches on Google.

  • Validation error: the field types incompatibilities.

    Hi all

    I coded an integration to export data from the API in bulk Eloqua REST and it worked well before.

    But recently, when I try again to launch an export, I could only successfully to POST an export. I met a WebException when you try to VIEW a synchronization for export.

    The exception message is: "the remote server returned an error: bad request (400)"

    And the JSON response is:

    {

    {"failures": [{"field": "'status' ',' forced':" "Validation error: incompatibilities of field types."}]}

    I haven't changed anything recently, but it wouldn't work any longer.

    Is there something different for the API in bulk?

    Any suggestions for this exception?

    Thank you

    Biao

    This was announced in the recent release (Archives) what's new in Oracle Eloqua?.

    Validation of strict type for JSON serializer is now enabled (see API in bulk in the notes above), so it provides you with an explanation of what is wrong, by design.

    Make sure that your JSON is valid and everything should work fine.

  • ADF |  Duplicate validation in the field.

    Hello

    Jdev: 11.1.1.1.6.0

    I have a requirement to allow the user to edit the data in an editable table. My question is, for one of the column, I should not allow the user to enter the duplicate on the JSF page levelvalue.

    It is not a primary key field. How to validate the duplicate column during the click on the button Save.

    Validation should work only on the page, not DB or OS level.

    Where is the duplicate, it should show an error message.

    I'm looking for the JAVA Bean code, instead of using the unique key validator in business-> validator entity rules.

    Please help me with the java code if any knows

    Thank you

    Hello

    Finally I got the answer, thank you for helping me.

    I used the code is:

    private void ItemIdValidator() {}

    P2PWebAMImpl am = (P2PWebAMImpl) resolvElDC ("P2PWebAMDataControl");

    PoShipmentLinesVOImpl shipmentlineView2 = (PoShipmentLinesVOImpl) am.getPoShipmentLines2 ();

    DCIteratorBinding dciter = (DCIteratorBinding) bindings.get ("PoShipmentLines2Iterator");

    Line r = dciter.getCurrentRow ();

    Number of itemidValue = (Number) r.getAttribute ("ItemId");

    Row [] filteredRowsInRange = shipmentlineView2.getFilteredRows ("ItemId", itemidValue);

    int i = filteredRowsInRange.length;

    String msg = "ItemId with the same number found. Please select another ItemId. « ;

    JSFUtils.addFacesErrorMessage (regClientIDPrefix + msg);

    {if(i>1)}

    throw new ValidatorException (new FacesMessage (FacesMessage.SEVERITY_ERROR, msg, null));

    }

    }

    Private Object resolvElDC (String data) {}
          FacesContext fc = FacesContext.getCurrentInstance ();
          Application app = fc.getApplication ();
          ExpressionFactory elFactory = app.getExpressionFactory ();
          ELContext elContext = fc.getELContext ();
          ValueExpression valueExp =
              elFactory.createValueExpression (elContext, "#{data." + data + ".dataProvider}", Object.class);
          Return valueExp.getValue (elContext);
      }

    Sainaba...

  • Validation of required fields on create page

    Friends,

    I need help on a problem. I created a page to input data with two data fields, save and Cancel buttons.

    I've marked these two fields as required, so when I hit the button with the data to save his shot a pop-up box indicating that they are necessary.

    So far so good.  But when I hit Cancel postings still draw. I want the validations to fire when I hit the Save button only.

    Can you please let me know how I can get this feature.

    Thank you

    Sri.

    OK my mistake there, it should be real change these properties to True and try.

    BR, 906099

  • Validation of two fields

    Hello.

    I use JDeveloper 11.1.1.7.0

    I have a simple form to create a table with 3 fields: ID, VALUE_1 AND VALUE_2. All fields are mandatory.

    I've included (not programmatically) validations for all areas, with personalized messages, but I need to include a new validation for the last two fields.

    I need to check that VALUE_2 is superior to VALUE_1.

    How can I complete this check?

    Is it possible to do not in one program by the way?

    Any help would be much appreciated.

    Thank you.

    Hello

    I guess you want to put validators at the level of the right business components? If this is the case, you could add a validator to your VALUE_2 with the following expression;

    newValue > VALUE_1

    Concerning

  • Field of own ViewObject and its validation mutual transient fields

    Hello

    I have a question about the validation between the own field of ViewObject and transitional fields.

    My VO has an attribute named AmountReceived & it is inherited from the EO.

    My VO has also 2 transitional named Expense1 and Fees2attributes. These 2 transient fields are directly added to the level of the VO.

    Now in the Page UI, I have a table for my VO.

    For each row in the table, all 3 fields above appears.

    I have to validate this Expense1 + Fees2 cannot be greater than AmountReceived field.

    I know I can do this at the bean support using valueChangeListener but the problem with this implementation is the user can COMMIT the transaction without correction of the data.

    Where and how should I apply my validation logic SO that the user must need to correct the data before embarking, I mean when the user loses the focus of the current row in my table - it should trigger my logic and the user must need to correct the data?

    Help please?

    Thanks - Hitesh

    As you have two fields for each row place in the OT instead of the original version. Then, you can implement a business for your validation rule.

    Timo

  • With immediate SOC = true is always run validation of other fields

    11.1.2.2 JDev

    I have a popup and the dialog box that contains a set of SOC and InputText fields. I put the attribute 'required' to all the fields of the form to "false" so I can run validation in the dialogListener method.

    On the one hand the components of the SOC, I need to show or hide a panelGroupLayout according to the value selected in the SOC.  For this SOC, I 'autosubmit = true' to trigger the valueChangeListener method in bean and ' immediate = true' to bypass validation for the other fields in the form.

    The problem is that, even if none of the fields are marked as 'required' in the form and even if I ' immediate = true' to the SOC, when I change the value of the SOC, I get a facesMessage saying a couple of fields are required in the t.  So it seems to be bypassing the validation on the client and go directly to the validation of the model side during the valueChangeEvent of the SOC, and I don't want ANY type of validation to perform during the action autosubmit to one of the fields on the form.  I use an addPartialTarget in the valueChangeEvent to refresh the panelGroupLayout after you have determined whether or not it should be displayed.

    Here is the Declaration of .jsff to the SOC and panelGroupLayout:

    <af:selectOneChoice value="#{bindings.ItemTypId.inputValue}"
                                                        label="#{bindings.ItemTypId.label}"
                                                        shortDesc="#{bindings.ItemTypId.hints.tooltip}" id="soc4"
                                                        autoSubmit="true"
                                                        valueChangeListener="#{pageFlowScope.MyBean.selectedItemTypeValueChangeListener}"
                                                        immediate="true">
                                        <f:selectItems value="#{bindings.ItemTypId.items}" id="si4"/>
    </af:selectOneChoice>
                                    <af:panelGroupLayout id="pgl1"
                                                         rendered="#{pageFlowScope.MyBean.passingScoreReq}"
                                                         binding="#{pageFlowScope.MyBean.pglPassingScore}"
                                                         clientComponent="true">
                                        <af:inputText value="#{bindings.PassingScorePct.inputValue}"
                                                      label="Passing Score"
                                                      columns="#{bindings.PassingScorePct.hints.displayWidth}"
                                                      maximumLength="#{bindings.PassingScorePct.hints.precision}"
                                                      shortDesc="#{bindings.PassingScorePct.hints.tooltip}" id="it1">                     
                                            <f:validator binding="#{bindings.PassingScorePct.validator}"/>
                                            <af:convertNumber groupingUsed="false"
                                                              pattern="#{bindings.PassingScorePct.format}"/>
                                        </af:inputText>
                                    </af:panelGroupLayout>
    

    Here is the code of the bean that performs the valueChangeEvent for the SOC in question:

    /**
         * Handle value change event for Item Type SOC on Edit Item popup
         * @param valueChangeEvent
         */
        public void selectedItemTypeValueChangeListener(ValueChangeEvent valueChangeEvent) {
            Long newItemTypId = (Long) valueChangeEvent.getNewValue();
            passingScoreReq = false;
            
            RichSelectOneChoice soc = (RichSelectOneChoice) valueChangeEvent.getComponent();
            List<UIComponent> socItems = soc.getChildren();
            UISelectItems uiSelectItems = (UISelectItems) socItems.get(0);
            List<SelectItem> listSelectItems = (List<SelectItem>) uiSelectItems.getValue();
            for(SelectItem item : listSelectItems){
                if(item.getValue().equals(newItemTypId) && item.getLabel().equals("Test")){
                    //The selected item is a 'Test' type, so we need set set passingScoreReq to true and refresh the pglPassingScore PanelGroupLayout
                    passingScoreReq = true;
                    break;
                }
            } 
            
            AdfFacesContext.getCurrentInstance().addPartialTarget(pglPassingScore);
        }
    

    You can try setting skipValidation = true in your pagedef.

    Thank you

Maybe you are looking for

  • Migrating to a new Mac licenses

    I need to move from Logic pro X, Melodyne, waves plugins, and other applications for my new mac, but with these two licenses used for applications.Installed on both apps and iMac and MacBook pro.I want to sell the iMac and migrate the applications on

  • Tried to import pictures. Will not stop or go away and I can't turn off my laptop

    I was importing pictures from a SD card to my Macbook pro and tried to do them all at once. There were about 700 pictures. Once, I moved their this tab below that presented themselves. After about 5 minutes of nothing don't be going on I tried again

  • My card repeat its denied!

    Hello, my name is Christian and I need help from Apple. Whenever I enter my card information, he repeat his decline. What should I do?

  • HP Compaq 6005 Pro SFF PC: Transfer motherboard... EXPERT NEEDED I GUESS!

    I'm building a new computer and I would put my motherboard in the case again until I get my new hardware... Will it work? Also can I use any cpu am3 with the stock mobo that attracts only 95w or less?

  • NET updates do not install

    updates automatic for the NET framework are not install, no idea why and how fix it. try to get a gaming mouse to work and need the latest updates for the net framework works from 2 to 3.5