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

Tags: Java

Similar Questions

  • Add Validation on two fields to check

    Hello, first post here. Hope that someone can help me that my knowledge of XML sucks and I need coding help.

    I have created a form for the process of creating/changing of 'user '.

    I have a field 'DropDownWindowsUser' with the values ' NEWS, CHANGE and DELETE.

    When you select "DropDownWindowsUser" = "NEW", there are two checkboxes that become visible, and ONE of the two need to be selected." the two checkboxes the user: left handed or right handed

    the two check boxes are named:

    -CheckLeftHanded

    -CheckRightHanded

    I would like to add an if statement to validate that field 'DropDownWindowsUser' = 'NEW' then the person must have chosen among the two checkboxes 'CheckLeftHanded' or 'CheckRightHanded' must be set to 1 (selected)

    Anyone who is willing to show how such a statement should be written to check that such a choice was made when creating NEW user and it should give error. "Please select left or right-handed.

    Thank you in advance.

    Johan

    I found another piece of code on the website here linked to something else and since I tried something similar and now it works.

    If (form1. DropDownWindowsUser.rawValue == 'New') {}

    If (form1. CheckLeftHanded.rawValue == 0 & & form1. CheckRightHanded.rawValue == 0) {}

    error = true;

    chaine_erreur = chaine_erreur + ': the article of NEW USER DETAILS, please select Desktop or Notebook Case user. '; "

    }

    }

    Basically, I check if the two box values are zero, then issue a warning.

    If it works that way.

  • Simulating a "Required" conditional on two fields using the field Validation

    I'm trying to 'require' users to fill in the Email address field or the primary phone when you create a Contact record. I had an idea of how do, but couldn't make it work. Any suggestions?

    Thanks in advance,
    Charley


    I working on the screenplay of is as follows:
    The customer wants to check on two fields on a contact record - the main phone and primary e-mail address fields. The envy of their users must complete one or other fields. This kind of conditional required parameters being out of reach for the workflow, I tried to get validation in the field to work. I tried to implement something like the following as the validation rule:
    [example as WorkPhone <>] is Null AND that [< ContactEmail >] is Null
    Then a validation message is displayed informing the user that one or the other needs remaining.

    Check out this thread
    Re: Contact Validation field (e-mail, work phone, Mobile phone #)

  • 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

  • Add two fields

    I have two fields in the query that are created by a case statement. I created a calculated field in my report: Data Type Float, calculation: nothing, perform the calculation on: query. Tuition + query. RoomBoard, first value query. Tuition + query. RoomBoard, reset the field when: evolution, the Reset group: ID

    I get the following error when I run the report: query. Tuition + query. RoomBoard is not a valid expression of ColdFusion.

    What I am doing wrong?

    It appears that you want this amount for each record, right?

    If this is the case, then you may not use a calculated field. Insert a field in your detail band, choose "expression entered manually" and then use "question. Tuition + query. RoomBoard' as the expression.

    See you soon

    Eddie

  • 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

  • Strange behavior of validation with the fields 'user entered - required '.

    I have a situation where I have a form with several 'user entered - required"text fields  Some required fields are pre-populated by a server process before being presented to a user in the workspace.  When the user fills the remaining fields and submits the form (by clicking the button "Done" in the workspace), the of standard validation 'required' message, even if all required fields contain data.

    The shape where I discovered this problem is moderately complex, so I built a form simple and process to try to understand what is happening.  The simple form contains exactly two text fields, both are user entered - required.  A field is filled by a server process when the task of the associated workspace is called, B field must be filled in by the user.  There is no script customized beyond the bridge of form and a Submit button.  It's about as simple as it gets.

    If the field is filled, and then the user fills B field and click on 'Finish', the message appears saying 'at least one required field is empty... "even if the two fields contain data.

    If I return to the form and remove the B field (and redeploy the form and remember the process), to field is pre-filled and the user clicks on 'Finish', no message is displayed and the form is sent.

    As far as I know, the built-in for required fields validation works correctly only if all fields are pre-filled or none of them are pre-filled.

    Can someone explain what is happening?

    EDIT: I forgot to mention, I also created and configured an extract of the data for the simple form.  The data preview only contains a value for the to field.  When displayed in the preview of the Designer tab, everything works as expected.

    After a little work I have a better understanding of what is happening and a solution.  I have scripted several calls to xfa.host.messageBox (...) on different events.  It turns out that the pre-filled fields are not the culprit - they have values as expected.  The problem is with the non-pre-filled fields, and and a subtle behavior of the event model that causes a problem when using the workspace INTERFACE (at least on SS3).  Field values may not be resolved until a field loses focus (for example when a user moves to another field, or click a button).  Form used outside of the workspace, by clicking a "submit" button causes the focus to move to the button, which causes the values to be bound to the fields.

    Solution: Use an indirect Submit on the form button and submit indirect click handler used (in addition to your normal code):

    xfa.host.setFocus(null);
    xfa.resolveNode("[[fully qualified name of the real submit button]]").execEvent("click");
    

    Working space should detect and then make an Indirect button and run the associated click Manager, claiming in turn the form submit true button.

    This is where begins the next bit of fun: there is a bug in the form bridge (at least in the ES3 version) code prevents him from indirect detection submit buttons when you use JavaScript as a language Manager click of the button and

    Here is my hack to solve this issue:

    1. Open the 'ContainerFoundation_JS' script in the Script of Designer Editor
    2. Ignore the warning at the top of the file
    3. Find the named function: isIndirectSubmitEvent (it's on the line 1512 or something)
    4. Change the line that reads:
      • if (script.indexOf(button.name + ".execEvent") != -1) {
        

        TO:

        if (script.indexOf(button.name + ".execEvent") != -1 || script.indexOf(button.name + "\").execEvent") != -1) {
        
    5. Save and deploy the form

    If there is a better way to achieve this, please share.

  • How to make a form field validate that it is the sum of the other two fields?

    Hello

    I'm creating a form, and I'd like one of the fields to validate by making sure that this field is the sum of the other two fields of the form.  Anyone have any ideas on how to go about it?  I know that I need to run a custom validation script, but I don't know where to start - I have never made one for before validation.

    Thanks for any help!

    OK, here's a sample script that I hope will clearly demonstrate the general approach. It is intended to be the validation script custom field that the user enters the value which is supposed to be equal to the sum of the other two.

    Custom validation script

    (function () {}

    Get the value that the user entered

    sVal var = event.value;

    If it is empty, do nothing else

    If (! sVal) {}

    return;

    }

    Converts a string to a number

    nVal = + sVal;

    Get the values of the fields in the form of numbers

    var v1 = + getField("text1").value;

    var v2 = + getField("text2").value;

    Add them together, rounded to two decimals, converting to the number

    var sum = + util.printf ("%.2f", v1 + v2);

    Compare the value of the sum of the other two fields

    Change the user if they do not match

    If (nVal! == $) {}

    App.Alert ("the value entered does not equal to the sum of text1 and text2. Please correct. «, 3) ;

    If you want the value entered was rejected, include the following

    Event.RC = false;

    }

    })();

    Replace "text1" and "text2" with real field names.

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

  • Development is shared by two fields?

    Hello world

    don't have think it was still possible, but take a look at this pic. I am facing a bug with BitmapFields coating - line orange around the button is rendered wrong. As you can see, the development is somehow shared by both two fields. I have change the events onFocus Bitmap and onUnFocus of the buttons.

    And here is the song for one of my buttons:

                 new_game = new BitmapField(new_game_select_img, Field.FOCUSABLE | FIELD_HCENTER) {
                     protected void onFocus(int direction) { this.setBitmap(new_game_select_img);}
                    // protected void drawFocus(Graphics g, boolean on) {}
                     protected void onUnfocus() { this.setBitmap(new_game_img); }
                     protected boolean navigationClick(int status, int time) {
                         UiApplication.getUiApplication().pushScreen(new DiffAndCardsScreen());
                         this.getScreen().close();
                         return true;
                     }
                 };
    

    I use similar code for all other buttons on my screen, and they have made a lot, but here I "just shocked how is this possible?" Is this a bug or what?

    Hey guys,.

    Thanks for the reply. Now it is clear to me, it was a bug. I solved it occasionally by writing:

    setPosition(-18, -18);
    

    in sublayout() in my PopUp screen.  Also, I don't know how it is possible to set the screen on the screen of the device - but if you face made buggy similar to my problem, try this. I tested it on real device, and it worked.

  • Need help to split the string into two fields

    Can someone share your thoughts by dividing the prod_info string below into two fields

    For example:-TABLE of PROD

    SOURCE TABLE

    SNO PROD_INFO
    120 OZ SIMILAC
    2HW PRO 10
    3REX 10 OZ
    4AAA 10
    5BBB 2000
    6CCC 10 LB
    7DDD 2021
    8EE 12 KG
    9KK 11111
    10ZZ ABC FAC 11
    11RKW DD CC 12 OZ
    1212KJ 12 LBS.

    EXPECTED RESULTS

    SNO PROD_INFO PROD_VAL
    1SIMILAC20 OZ
    2HW PDR10
    3REX10 OZ
    4AAA10
    5BBB2000
    6CCC10 LB
    7DDD2021
    8EA12 KG
    9KK11111
    10AEC ABC ZZ11
    11RKW DD CC12 OZ
    1212KJ12 LBS.

    with

    as Prod

    (select 1 sno, "SIMILAC 20 OZ" prod_info of all the double union)

    Select 2, 'HW PDR 10' from dual union all

    Select 3, 'REX 10 OZ' from dual union all

    Select option 4, "AAA 10' from dual union all

    Select 5, "BBB 2000"of the dual union all

    Select 6, 'CCC 10 LBS' double union all

    Select 7, 'DDD 2021' from dual union all

    Select 8, 'EE 12 KG' from dual union all

    Select 9, 'KK 11111' Union double all the

    choose 10, "ZZ ABC FAC 11' from dual union all

    Select 11, 'CC DD RKW 12 OZ' from dual union all

    Order 12, '12KJ LB 12' double

    )

    Select sno,

    (prod_info regexp_substr(prod_info,'^((\d*|\w*)[^[:digit:]].*) \d',1,1,null,1).

    regexp_substr (prod_info,' prod_value (\d+.*)$',1,1,null,1))

    Prod

    SNO PROD_INFO PROD_VALUE
    1 SIMILAC 20 OZ
    2 HW PDR 10
    3 REX 10 OZ
    4 AAA 10
    5 BBB 2000
    6 CCC 10 LB
    7 DDD 2021
    8 EA 12 KG
    9 KK 11111
    10 AEC ABC ZZ 11
    11 RKW DD CC 12 OZ
    12 12KJ 12 LBS.

    Concerning

    Etbin

  • Compare two fields in Eloqua API

    Is it possible to compare two fields Eloqua in the searchQuery of the Eloqua API calls in c# for example. searchQuery = "C_DateModified = C_DateCreated"?

    Unfortunately, this can not be done.

  • I have 3 domains. A field is a constant date mm/dd/yy. The second field is a digital number (1-120) and can be changed. The third field calculates two fields 1 and 2 in the summation and shown in mm/dd/yy. How do I calculate that in the script?

    How do I calculate that in the script? I have 3 domains. A field is a constant date mm/dd/yy. The second field is a digital number (1-120) and can be changed. The third field calculates two fields 1 and 2 in the summation and shown in mm/dd/yy.

    You searched for ' add days?

    You must write a custom for this JavaScript calculation because you cannot add a number any date. Also the date strings are not just a number, even if we can convert a given date in a number for that date that represents the time form a date date (Epoch). Witn this value, we can achieve them all kinds of date calculations and collect a little information about the date. JavaScirpt uses midnight on January 1, 1970 UTC for starting point or the date of the time. Its value is zero, and every millisecond increases the value of 1. When a date string is converted to the date object JavaScirpt we have access to many properties of the date and can use several methods to extract information or adjust the date object.

    Field 1 is in the format "Date" with a format of "mm/dd/yy".

    Field 2 is in «Number» format with 0 decimal.

    Zone 3 is in the format 'None '. The custom calculation script applies to the formatting.

    The custom for JavaScript calculation area 3:

    var cField1 = this.getField("Field_1").valueAsString;

    var cField2 = this.getField("Field_2").valueAsString;

    Event.Value = "";

    If (cField1! = "" & cField2!) = "") {}

    Console.println (cField1 + "" + cField2);

    calculate that if we as no null data;

    var cDateFormat = "mm/dd/yy";

    convert start date date object.

    Kai var = util.scand (cDateFormat, cField1);

    get the date of the month;

    David var = oDate.getDate ();

    Add field 2 number of days;

    David = Number (nDate) + Number (cField2);

    of being updated for the new date.

    oDate.setDate (nDate);

    Set the field to update formatting;

    Event.Value = util.printd (cDateFormat, letter);

    } / / end of data not null;

  • I installed 6 Lightroom on both computers. On one I have Lightroom 6.0 and the other Lightroom 6.3 (same license is valid for two machines). Comment do pay have Lightroom 6.3 on both.

    Hello

    I installed 6 Lightroom on both computers. On one I have Lightroom 6.0 and the other Lightroom 6.3 (same license is valid for two machines). Comment do pay have Lightroom 6.3 on both.

    Thank you

    Try to completely uninstall LR and then install 6.0 and then 6.3 update.

    Download here: https://helpx.adobe.com/lightroom/kb/lightroom-downloads.html

Maybe you are looking for

  • How to merge multiple windows in 1 window with several tabs?

    In Safari, it is possible to merge several windows open in 1 single window, with each window becomes a new tab in this new window, so you can easily switch from tab to tab. I can't find how to do this in Firefox - did someone knows if it is possible?

  • Satellite L850 - Bluetooth never found devices

    Hi all I am having some problems with Bluetooth on this laptop. Windows says that all drivers are installed properly and the Toshiba Bluetooth Stack program says that the bluetooth module is working, however when I search for bluetooth devices it see

  • Installer Windows annoying pop - up sign keeps appearing

    It seems that when I use the computer, the component you are trying to use is on a network unavailable resource.  Click ok to try again or enter a different path to the folder containing the installation package ' Phone Remote Control. MSI' he has ju

  • License key Visual Studio Express MS provided 2012 reports invalid

    I have problems to register the FREE Visual Studio 2012 Express. I registered and I sent my license key but when I enter it, it says "invalid license key" and now I'm on a 30-day trial $for a FREE program of $ nobody knows how to solve this problem?

  • Lightroom trial required Applic.manager update, but Cload Creative faulty download...

    HelloI have a LR trial version installed on my pc. Yesterday, LR was asked to download a new copy of the Application Manager.But the download/installation of Creative Cload fails (download error ".") Please contact customer support) and I'm not able