Validation for 2 attributes in a single expression

Hi All,
I have a scenario such that I need to make 2 attributes as mandatory when I chose a particular
Category node.
Now I am able to write, execute validation for one attribute but when I write for 2 attributes, only the first
attribute is being considered. Even if the second attribtue is not present, it says there are no errors.
Regards,
Pramod

Hi Pramod,
I have tried this thing at my side and its working fine.
Please check the steps below:
1. Create new validation and dont write any thing in the expression.
2. Add a branch to this validation and select the node which you want to validate.
3. Inside the branch expression just write IS_NOT_NULL(Attribute1) AND IS_NOT_NULL(Attribute2)
select Attribute1 and Attribute2 from the Attributes list.
4. Run the Validation.
Regards,
Jitesh Talreja

Similar Messages

  • How can i add multiple validations for a single input box in adf?

    hi,
    i want to add multiple validation for a single input text control in adf like number validation and its existence in database.
    MY JDEV VERSION IS 11.1.1.5.0
    pls help !!!!

    Hi,
    1.I want to validate if the value entered is pure integer
    Option 1-
    select the component and in the Property Inspector, in the "Core" category select a "Converter" format, select javax.faces.Number, if the user put a string, adf show a dialog error or message error...
    Option 2-
    or use the Regular expression:-
    http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_validateRegExp.html
    https://blogs.oracle.com/shay/entry/regular_expression_validation
    Also check this:-
    http://docs.oracle.com/cd/E15523_01/web.1111/b31973/af_validate.htm#BABHAHEI
    Option 3-
    Frank in his great book 'Oracle Fusion Developer Guide' shows a example using a javascript for input which is allowed only for numbers. You can manipulate for your requirement.
    Here is the code:
    function filterForNumbers(evt) {
        //get ADF Faces event source, InputText.js
        var inputField = evt.getSource();
        var oldValue = inputField.getValue();
        var ignoredControlKeys = new Array(AdfKeyStroke.BACKSPACE_KEY, AdfKeyStroke.TAB_KEY, AdfKeyStroke.ARROWLEFT_KEY, AdfKeyStroke.ARROWRIGHT_KEY, AdfKeyStroke.ESC_KEY, AdfKeyStroke.ENTER_KEY, AdfKeyStroke.DELETE_KEY);
        //define the key range to exclude from field input
        var minNumberKeyCode = 48;
        var maxNumberKeyCode = 57;
        var minNumberPadKeyCode = 96;
        var maxNumberPadKeyCode = 105;
        //key pressed by the user
        var keyCodePressed = evt.getKeyCode();
        //if it is a control key, don't suppress it
        var ignoreKey = false;
        for (keyPos in ignoredControlKeys) {
            if (keyCodePressed == ignoredControlKeys[keyPos]) {
                ignoreKey = true;
                break;
        //return if key should be ignored
        if (ignoreKey == true) {
            return true;
        //filter keyboard input
        if (keyCodePressed < minNumberKeyCode || keyCodePressed > maxNumberPadKeyCode) {
            //set value back to previous value
            inputField.setValue(oldValue);
            //no need for the event to propagate to the server, so cancel
            //it
            evt.cancel();
            return true;
        if (keyCodePressed > maxNumberKeyCode && keyCodePressed < minNumberPadKeyCode) {
            //set value back to previous value
            inputField.setValue(oldValue);
            evt.cancel();
            return true;
    2.I want to check if the value exists in my respective DB You must be having EO or VO if you want to validate with database in that case use the solution suggested by Timo.
    Thanks
    --NavinK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Issue when installing SQL Server Express 2012 - "The requested control is not valid for this service" + "Could not find the database engine startup handle"

    Good morning,
    I'm experiencing the following issue when installing Microsoft SQL Server Express 2012 (with tools, SQLEXPRWT_x86_ENU.exe) on the laptop of my company;
    Installation goes plain until around the end of the progress bar, it stops on the setup of
    SqlEngineDBStartConfigAction_install_configrc_Cpu32
    giving 7-8 times, even pressing "Cancel", the message "The requested control is not valid for this service";
    After this, I receive one last message ""Could not find the database engine startup handle", then installation ends with failures, in particular the Database Engine and the Server Replication failed to be installed.
    I've put in my SkyDrive the error log I received after the install;
    I'm at full disposal if you need further information,
    thank you in advance
    Best regards
    Francesco

    Well, i just ran into this issue and the problem was lack of admin rights. It was my company's laptop so got the setup initiated by my company's IT team with admin rights. However, the upon completion of setup, i go the same error messages as stated above: 
    SqlEngineDBStartConfigAction_install_configrc_Cpu32
    giving 7-8 times, even pressing "Cancel", the message "The requested control is not valid for this service";
    After this, I receive one last message ""Could not find the database engine startup handle", then installation ends with failures, in particular the Database Engine and the Server Replication failed to be installed.
    Also, if you open SQL Server Configuration, the status of the service is "Change Pending" and you would not be able to set the startup login type to Local Service/System/Network.
    Then, I just got my account added as Local Admin and then tried to start the service and was able to.
    However, I am not sure whether same was the case for you.
    Please mark the answer as helpful if i have answered your query. Thanks and Regards, Kartar Rana

  • How to create a single 'not null ' validation for all the items in a page ?

    Hi everyone ,
    how to create a single 'not null ' validation for all the items in a page ? I have many textfields . Instead of creating 'not null' validation for each item , I would like to create a a single validation control that will serve the purpose
    Thanks & Regards
    Umer

    Nice1 wrote:
    bob , as u said I have done the following :
    1) under create button , there are 9 items and for each item I have set Required to 'Yes'
    2) under delete button , there is 1 item and have set Required to 'Yes' for the item
    3) defined page validation for 9 items under 'create ' button and have set it to fire when 'create ' button clicked
    4) defined page validation for 1 item under 'delete ' button and have set it to fire when 'delete ' button clicked
    now , when I click 'create' button it even shows for the item under 'Delete ' button that it is a required itemSorry, I didn't see this note. The required template won't work, there is no way to attach it to the button.
    The best solution is as the reply a couple replies up
    Create 2 page type validations as a PL/SQL with code
    1st validation
    :P1_ITEM1 IS NOT NULL and :P1_ITEM2 IS NOT NULL ...... and :P1_ITEM9 IS NOT NULL  include all 9 items
    Set the When Button Pressed to the CREATE button
    2nd validation
    :P1_ITEM10 IS NOT NULL
    Set the When Button Pressed to the DELETE buttonI think that's going to be the easiest way to do it.
    Edited by: Bob37 on Apr 27, 2012 12:02 PM

  • MultiRowEdt-JBO-35000: Cant resolve spel expression for attribute {0}in{1}

    Hi All,
    i'm in the process of completing the mutli row edit tutorial that I downloaded from this site. I'm using 10.1.2, adf bc and jsp's.
    I've competed the tutorial and am getting an error JBO-35000: Cant resolve spel expression for attribute {0} in {1} .
    I've checked that my attribute names are the same as the VO and have created a BeanInfo class to handle the mapping of these attributes. All appears as it should, so not sure where to go from here.
    Any ideas would be gratefully received.
    Thanks in advance,
    Newbw

    hello,
    I'm facing the same problem in implementing mutli row edit tutorial.
    I'm using JDeveloper 9051.
    Can u please tell me how did u solve ur problem as i didnt understand what u've posted on forum "spelt my VO wrong".
    Please reply. waiting
    Thanks in advance
    Mina

  • Marketing attribute valid for a specific customer only?

    Hi
    We have a requirement that a specific marketing attribute set should only be valid for a specific group of customers.
    Is this possible to define in customizing?
    Any other suggestions of how to solve this?
    BR
    Johan

    Hi
    Thanks for both answers!
    The territory solution is unfortunately not possible, cause we do not have a perfect match between the attribute sets and the customers belonging to a particular territory. Otherwise that would have been a great solution, I really appreciate your answer.
    Regarding ACE, I thought that the authorization concept would be based on the user? The user should have access to all marketing attributes, but for a particular customer only certain marketing attributes should be valid. Is that possible to set up with ACE?
    Could you further explain that approach?
    BR
    Johan

  • Validation for DropDown Box

    hi,
    I want to do validation for dropdownbox. What I have done:
    public void checkSelected(java.string.fieldName)
      Print Message from Message Pool.
    onActionsubmit()
    checkSelected(IPrivateView.IMaritalStatusElement.Value)
    checkSelected(IPrivateView.IBloodGroupElement.Value)
    How can I pass node dynamically so that this single method"checkSelected" works for two DropDownbox?
    Please help me...
    Regards
    Manish

    Hi,
    use as follows
    public void validate(IWDNode node, String attrName)
            // To access a value
            node.getCurrentElement().getAttributeValue(attrName);
            //To get attrinfo
         node.getNodeInfo().getAttribute(attrName);
    invoke the above function
    validate(<YourNode>,<Your Attribute part of 1param node>);
    Regards
    Ayyapparaj

  • Defining complex validations for flex items

    Hi,
    We've defined a flex regions and a number of flex items. We would like to define more complex validation logic at the entity object level, whereby we'd like to reference both 'fixed' entity attribute values as well as values of the flex items.
    Could you please indicate how this can be achieved in the validateEntity method of the EntityImpl.java class.
    We know beforehand which flex items will be displayed based on the value of one of the fixed entity attributes (e.g. if the attribute request_type='assist' then display flex items A and B, if request_type='info' then display flex items D, E and F). We use flex items because the number of request_types and corresponding 'dynamic' attributes is too large (and subject to frequent additions, deletions or modifications) to incorporate in a fixed static db table structure.
    If you can suggest alternatives to using JHeadstart flex items, these are more than welcome, of course.
    Many thanks beforehand,
    Ibrahim

    Dear Steven,
    First of all many many thanks for your prompt reply. We can use JSF EL expressions to conditionally render flex items. I'd like to illustrate my question with a simple example:
    We have three fixed entity attributes displayed:
    RequestType
    Birthday
    Sex
    and two flex items (rendered at runtime for a specific runtime value of RequestType):
    Smoker (Y/N)
    Weight
    Before saving the record I'd like to check a number of validation business rules that depend on the fixed entity attributes as well as the two flex items being displayed.
    Consequently, I'd need to be able to access the flex item values provided by the user, inside my validateEntity method (right ?).
    I can define simple validations for the flex items, but I can only access the flex item value and possibly the DependsOnItemValue.
    PS: When I define a flex item of type 'inputtext' and try to access its value using a bind variable in the validation query of the flex item e.g.
    :ItemValue = 'blabla'
    Suppose the user fills in the value Abracadabra, the validation logic substitutes as follows:
    Abracadabra = 'blabla' (which generates an Oracle error). I'd expect the following substitution to take place:
    'Abracadabra' = 'blabla'

  • Validation for text field: Null and contains no spaces

    Currently on APEX 3.2
    I want to check 1 text field and 2 text areas to ensure they are not null and blank (hitting the space bar in the field) before submitting the page. How do I do both validations for on each field?

    I created a validation with a type of 'Function Returning Boolean' and using the following code in the expression:
    IF( TRIM( :P1_Text_Field) IS NULL
    Or LTRIM( :P1_Text_Field ) != :P1_Text_Field )
    THEN
    RETURN false;
    ELSE
    RETURN true;
    END IF;
    Edited by: Jeremy_F on Apr 12, 2012 8:15 AM

  • Oracle.jbo.AttrValException: JBO-27019: Get method for attribute

    Hi Guys,
    I am trying to add a new column to Oracle quoting.It has already been customized by some consultant few years back. I followed the note 392728.1 on metalink and also have the documentation by the previous consultant but getting the error oracle.jbo.AttrValException: JBO-27019: Get method for attribute Draft in HeaderVO could not be resolved after adding my column, when I try to print the quote.
    Here are the steps I took
    1) added a column to the query (at the end) in HeaderVO.xml
    2) added the below code in the HeaderVO.xml
    <ViewAttribute
    Name="DRAFT"
    IsQueriable="false"
    IsPersistent="false"
    Precision="100"
    Type="java.lang.String"
    AliasName="DRAFT"
    ColumnType="VARCHAR2"
    Expression="DRAFT"
    SQLType="VARCHAR" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="100" />
    </DesignTime>
    </ViewAttribute>
    3). Modify HeaderVORowImpl.java file to add setters and getters for the newly added view attribute. For example,
    a) case 67: //
    setDRAFT((String)obj);
    return;
    b) case 67:
    return getDRAFT();
    c) ublic void setDRAFT(String s)
    setAttributeInternal(67, s);
    public String getDRAFT()
    return (String)getAttributeInternal(67);
    d) protected static final int DRAFT = 67;
    Everything is dont exactly as per the manual but not sure why I am getting this issue. Any help will be appreciated.

    a) case 67: //
    setDraft((String)obj);
    return;
    b) case 67:
    return getDraft();
    c)public void setDraft(String s){
    setAttributeInternal(67, s);
    public String getDraft(){
    return (String)getAttributeInternal(67);
    d) protected static final int DRAFT = 67;
    can u change it as explained above.. setDRAFT should be setDraft.. and getDRAFT should be getDraft..
    and make sure that the index.. number is exactly matching with the attribute order in the VO

  • P6 user name is not valid for connecting to the reporting database

    No data is available because your P6 user name is not valid for connecting to the reporting database
    I am getting above error in the following environment:
    P6 running on wls instance 1.
    BI Publisger running on wls instance 2
    MS SQL server 2005
    Note that the error appears when I clink on the 'Reports' tab in P6. My admin user on P6 has access to report/analyser modules.
    To connect P6 to BI Publisher I am using 'PxRptUser' in the P6 configuration for Bi Publisher. I know as well that the WSDL URL is correct and I can test this in SoapUI tool.
    In BI publisher I have created the PMDB data source using PxRprUser, and the test of this connection works.
    (Because the report samples come with Oracle flavoured SQL that SQL server does not like, I have configured BI Publisher so I have just a single report left that sources it data from an xml file. This works in BI Publisher. It also helps me in that I do not need to add 'WHERE' clauses and parameters required for SQL server?)
    Furthermore, using a DB tool, I can connect to my SQL server using PxRPTUser.
    So why do I get the error above?
    I picked up somewhere that I should not be adding users to BI Publisher. Funny enough, testing the 'login' method the BI Publisher exposes through its WSDL (as above) I noticed I HAD to create the user PxRptUser in BI publisher application itself (on top of PxRptUser in database) for the login web service to work with PxRptUser
    That did not solve the connection between P6 and BI Publisher though. What am I missing ...
    Edited by: user3674522 on 10/11/2011 20:16

    Thought I found something but can't repliacte, som issue is still there:
    Had a look at the wls instance logs where BI publisher is running, and the error I get is:
    111111_023646955][][ERROR] javax.naming.NamingException: Unresolved naming: cn=admin, dc=user, dc=users, dc=principals at [cn=admin]
    That user, admin, is the one I have used to access P6. Why is this passed on to BI Publisher? I thought the idea was that the PxRptUser set in BI Publisher configurations in P6 would be used?
    Edited by: user3674522 on 10/11/2011 20:17

  • Data validation for Date Field in Web Dynpro ABAP

    Hi ,
    In my WDA i want to perform data validation for date filed. (i.e. While creating a new record i have to check the Start Date should be always lesser than End Date.)
    If u ll enter the wrong date it should validate the Date and throw an error message.
    Please Reply soon its urgent.
    Thanks,
    Deepika

    Hi,
    First read the two attributes start date and end date.
    Then write the following condition.
    IF item_start_date > item_end_date.
    Error message.
    Endif.
    For pop up error message you need to use Create_window method of the Interface if_wd_window.
    Thanks.

  • Validation for saving values in jsp--is validation compulsory?

    Hi all,
    in my application there is a jsp which uses a pagebean.
    now i added somemore attributes to the pagebean and included them in the jsp as well.
    there is javascript validation for the previous attributes.
    the values can be modified and should be saved to the db2 database on cliking the modify botton.
    my question is do i need to include java script validation for the new attributes that i added to the pagebean and jsp to get modified and stored to the database?
    or can i modify and save the new values without validation?
    is validation compulsory?
    your reply is very imp to me friends
    cheers and thanks in advance

    well, validation in general isn't required, but if some bad value is entered and not otherwise checked for, you could get errors.
    and if you use validation at all, then the server-side validation will always run even if the JS validation runs or not.

  • Value 'defaultNs:AddBP2Type' is not allowed for attribute 'type'

    Hi All,
    I created the wsdl for mobile and I tried to send a SOAP request from Altova XMLSpy. However when I geive the wsdl in 'wsdl file location' I receive the following.
    File http://127.0.0.1:8080/B1iXcellerator/exec/dummy/com.sap.b1i.vplatform.scenarios.setup/vPac.sap.B1Mobile/001sap0003_sap.B1Mobile.wsdl is not valid.
    Invalid XML schema: 'Value 'defaultNs:AddBP2Type' is not allowed for attribute 'type'.'
      Error location: wsdl:definitions / wsdl:types / xs:schema / xs:element / @type
    Any Idea?
    Vangelis

    Hi,
      it seems that Altove did not cope with defaultNs prefix that is used for marking default namespace.
       just look up in your <xs:schema > tag what namespace prefix is used for your namespace - you shall find there something like this
    <xs:schema xmlns:ns0="your.namespace.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
    and replace prefix defaultNs with prefix of your namespace (in example above it would be ns0)
    There might be several usages of defalutNs iside of WSDL (at least in my case were two) so replace it everywhere using same approach
    Best regards, Artem

  • JS Validation for Drop down List is not working in Oracle PL/SQL Package

    Hi All,
    I am facing an issue with JavaScript validation done in Oracle PL SQL package.
    System Requirement:
    There is one screen which contains two fields viz. FLD 1 & FLD 2 and one 'Submit' button.
    FLD 1 and FLD 2 fields are drop down list boxes.These are mandatory fields.
    The screen is developed in Oracle Mod PL SQL package.
    The html coding and java scripting are embedded in the respective Oracle PL SQL Package procedure which generates this screen,takes the input values provided by user,does the
    field validations and submits the form.
    Issue:
    The javascript validation for FLD 2 dropdown is working successfully.
    When the user leaves this field as blank,the embedded javascript pops up an error message 'Selection of FLD 2 is manadatory before submitting the form!'.
    As FLD 1 is also a mandatory field,the javascripting validation should pop up the similar error message 'Selection of FLD 1 is manadatory before submitting the form!'.
    But,this first field validation is not at all working.
    The system allows to submit the form even if the 'FLD 1' is left blank.
    The javascript code sysntax for validation of FLD 1 & FLD 2 drop down list boxes as follows:
    function validate_form_fields()
    if (document.forms[0].p_fld_1.selectedIndex == 0))) || (document.forms
    [0].p_fld_1.selectedIndex < 1 )
    alert("Selection of FLD 1 is manadatory before submitting the form!!!");
    return false;
    else if (document.forms[0].p_fld_2.selectedIndex == 0))) || (document.forms
    [0].p_fld_2.selectedIndex < 1 )
    alert("Selection of FLD 2 is manadatory before submitting the form!!!");
    return false;
    return true;
    I am viewing the screen from the web browser IE version 8.0.
    Your timely help will really be appreciated.
    Regards & Thanking in advance,
    Alka

    Hi,
    1. Your problem is actually related to JavaScript, not SQL and PL/SQL. So, this is the wrong forum to post. The closest to JS is the Application Express forum {forum:id=137}. Clearly state that it is not an Apex issue and that you are looking for JS help.
    2. Your JS code, the way you has posted it, is syntactically incorrect, so if you post on Apex forum put the correct code and in tags as described in the FAQ
    {quote}
    function validate_form_fields()
    if (document.forms[0].p_fld_1.selectedIndex == 0))) || (document.forms
    [0].p_fld_1.selectedIndex < 1 )
    alert("Selection of FLD 1 is manadatory before submitting the form!!!");
    return false;
    else if (document.forms[0].p_fld_2.selectedIndex == 0))) || (document.forms
    [0].p_fld_2.selectedIndex < 1 )
    alert("Selection of FLD 2 is manadatory before submitting the form!!!");
    return false;
    return true;
    {quote}
    Regards,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for