test the two fields at once

I have a form that updates patch_host and patch_hmc
on a page... How can I add a check that tests
if P56_patch_host IS NOT NULL or P56_hmc IS NOT NULL

Seth,

Create a type page-level validation exist and put it in the body:

SELECT 1
  FROM DUAL
 WHERE :P56_patch_host IS NOT NULL
    OR :P56_hmc IS NOT NULL

Good luck

Janet Tyson

Published by: Tyson Janet on April 10, 2009 10:51

Tags: Database

Similar Questions

  • Receive error message when calculating the two fields with different date format

    I'm more familiar with SQL Server and Oracle, then after a search online without success, I ask here.

    I use developer PL/SQL with DB Oracle 11g Release 11.2.0.2.0 Enterprise 64-bit

    MyTable:

    ID_Number VarChar2

    Date of Date_Received

    Select ID_Number,

    Date_Received,

    To_Date (substr (ID_Number, 1.6), "YYMMDD") SentDate,.

    Date_Received - NumDays To_Date (substr (ID_Number, 1.6), "YYMMDD")

    FROM MyTable

    Where substr (ID_Number, 7.3) in ('ABC', 'ABD')

    and length (Trim (translate ((substr (ID_Number, 1,6)), '0123456789',' '))) a null value

    ID_Number Date_Received SentDate NumDays

    131002ABC1654106 10/16/10/2013-2013 14 2

    131004ABD8813899 4/12/2013-4/8/2013 4

    131014ABD1844832 10/16/10/14 OF 2013-2013 2

    Sometimes the first 6 characters in the ID_Number aren't the numbers and length (Trim (translate deletes records))

    I want just the records where NumDays > 2

    I tried to put the request in a subquery and using where NumDays > 2 outside.  I also tried using the calculation directly in the Where clause.  Without it in Where clause it works very well, with him in a place, I get the following error:

    ORA-01931: Date format picture ends before converting all of the input string


    I don't know how to put the two dates in the same format.  I tried to declare the format without result.  I don't understand how I can calculate in the selection, but do not use the same calculation in Where clause.

    Thank you for your help.

    Hello

    SQL is a language to describe the desired results.  How the system gets these results belongs to you don't have much say about which conditions will be applied when.

    One place where you can control the order of things is a CASE expression.  When you say

    CASE

    WHEN condition_1

    THEN expression_1

    END

    You can be sure that expression_1 will be evaluated only when cond_1 is set to TRUE.

    Try something like this:

    WITH got_sent_date AS

    (

    SELECT id_number, date_received

    CASE

    WHEN the TRANSLATION (SUBSTR (id_number, 1, 6)

    , 'x' 0123456789 '.

    , 'x'

    ) IS NULL

    THEN TO_DATE (SUBSTR (id_number, 1-6)

    , "YYMMDD".

    )

    END AS sent_date

    FROM MyTable

    WHERE (id_number, 7, 3) SUBSTR ("ABC", "ABD")

    )

    SELECT id_number

    date_received

    sent_date

    , date_received - sent_date AS num_days

    OF got_sent_date

    WHERE date_received > sent_date + 2

    ;

    If you would care to post some sample data (CREATE TABLE and INSERT statements) and the results desired from this data, I was able to test this.

    Of course, you'll still errors of execution if id_number starts with 6 digits, but they do not have to be valid, for example '131100' or '130229'.  This is one of the reasons why the date information storage in VARCHAR2 columns are a bad idea.  To work around this problem, see

    https://forums.Oracle.com/message/4255051

  • Tweaking of default query so that the two fields are searched equally

    I have a 'Customer Details' data block that contains the field "mobile1" and "mobile2" for customer's cell phone numbers. When a customer enters into a mobile number or a field, I need to check the two mobile fields to see if this number exist as the primary contact number or secondary to any client of the query.
    I've tried to set a default_where clause, but oracle automatically adds to him whenever a number is entered in the field, making me a little trouble at the head!

    For example, if I say something like, WHERE MOB1 =: BLOCK. MOB1 OR = MOB1: BLOCK. Mob 2 (do not question true, just one example)
    And I took #-# in the field of mobile2,.
    Forms adds to this "AND mob 2 =: 1'"

    which causes the query to return nothing, since there is no entry mob 2 is equal to the registered number, even if there is an entry MOB1 bearing the same number.

    Is there a way to change the AND a RC for the query?

    If not, can anyone suggest how I can get the result, I'm looking for without having to change my block to a block not DB and duplicate me all the default features of Oracle Forms manually?

    Thanks in advance,

    A

    Do something like this in the PRE-QUERY-trigger:

    IF :BLOCK.MOBILE1 IS NOT NULL THEN
         SET_BLOCK_PROPERTY('BLOCK', ONETIME_WHERE, 'MOBILE1 LIKE ''' || :BLOCK.MOBILE1 ||  ''' OR ' ||
                                                    'MOBILE2 LIKE ''' || :BLOCK.MOBILE1 ||  '''');
    
    END IF;
    :BLOCK.MOBILE1:=NULL;
    
  • In an Adobe form I need the value of Field3 to display the higher of the two fields, Field1 value or Field2 (compare the value of Field1 and Field2 and display the highest amount in field3) can someone please tell me the script to run this simple comparis

    I have 2 fields that are calculated fields and I need display the higher value of the 2 fields in a third field

    The field names must be in double - quotes. And if you change the value of any field, now, you will see error messages in the console.

  • linking two fields and fill in the two field based on the list drop-down selection box 1

    I work for a small social service agency VERY small non-profit and I try to get our paperwork until the twentieth century. I hope someone here can help me. I have adobe acrobat, but not of other adobe products. I converted our word document that we use for client notes in fillable pdf format and so far everyone is excited to try it. I have a huge problem that I can't understand. I have a customer named created drop-down list box that contains a list of 300 customers. Box 2 is named customer ID and will contain a unique identification code assigned to each customer.

    For example:

    CUSTOMER ID customer JANE DOE 12345678

    So here is my question how can I ensure that when Unetelle is selected 12345678 is already filled in the second field?

    I fill the drop-down list with the names of customer and then enter the customer ID as the value of exports. Note You must have a unique name for each client.

    If your customer ID starts at zero, then you must use a custom JavaScript, so you can keep the zero non significant.

    For the customer ID field, you can use the following custom JavaScript code:

    Event.Value = this.getField("DropBoxFieldName').valueAsString;

    You will need to change DropBoxFieldName name of the drop-down list.

    You will need a mechanism for updating the new customer form and IDs names.

  • FormCalc - how to calculate the difference between the two fields datetime in hh: mm?

    Hello!

    I am building a form of time sheet in which I need to calculate the difference between the start and end times and present the result.

    I'm trying to do with FormCalc but if it is easier with JS is ok too.

    So that's what I did on the total field, by using the calculate on a NUMERIC field called decimalValue event:

    elapsed = Time2Num (endTime.formattedValue, "HH: mm")-Time2Num (startTime.formattedValue, "HH: mm")

    And then I tried to convert a time field:

    Total = decimalValue.rawValue;

    $.formattedValue = Num2Time (total, "HH: mm")

    Well, it doesn't work, it gives me crazy results in the datetime (total) field. If I type 09:00 and 09:30, the final result is... 22:30. Huh?

    Please, could someone help me understand how this thing works?

    Thanks a lot for the tips!

    Marcos

    Hi Marcos,

    Here are some examples:

    https://Acrobat.com/#d=kCPIgVkd09qrx6h-WRXxbQ

    https://Acrobat.com/#d=EsWqBMBt3sgEXnMSsK5pRA

    Hope that helps,

    Niall

  • RTF - grouping of the two fields to display their unique total

    Hello Experts,

    I have a problem to create a rtf report, I tried to overcome last week. I can't combine two different columns and obtaining the sum of these combinations of unique columns. I hope someone can shed some light on how to on this subject.

    My XML looks like this:

    < ROW >
    < CODE > 1 < CODE INFO > INFO
    B < SEGMENT > < / SEGMENT >
    < RECORD > 254 OUNT_ < / RECORD COUNT >
    < / ROW >
    < ROW >
    < CODE > 1 < CODE INFO > INFO
    B < SEGMENT > < / SEGMENT >
    < RECORD > 300 OUNT_ < / RECORD COUNT >
    < / ROW >
    < ROW >
    < CODE > 1 < CODE INFO > INFO
    S < SEGMENT > < / SEGMENT >
    < RECORD > 95 OUNT_ < / RECORD COUNT >
    < / ROW >
    < ROW >
    < CODE > 2 < CODE INFO > INFO
    B < SEGMENT > < / SEGMENT >
    < RECORD > 745 OUNT_ < / RECORD COUNT >
    < / ROW >
    < ROW >
    < CODE > 2 < CODE INFO > INFO
    S < SEGMENT > < / SEGMENT >
    < RECORD > 15 OUNT_ < / RECORD COUNT >
    < / ROW >
    < ROW >
    < CODE > 2 < CODE INFO > INFO
    S < SEGMENT > < / SEGMENT >
    < RECORD > 85 OUNT_ < / RECORD COUNT >
    < / ROW >

    My desired outcome is to have a table that looks like this:

    INFO CODE / SEGMENT / RECORD COUNT
    1 / B / 554
    1 / S / 95
    2 / B / 745
    2 / S / 100


    I am able to regroup and get the correct record number when I just the INFO CODE and the NUMBER of RECORDS. However, I am having a lot of trouble when I add in the new SEGMENT field which can have several segments for each CODE of INFORMATION. Any help would be appreciated.

    Thank you
    The f

    Use this:

    Thank you
    Bipuser

  • Cannot remove the two records at once in a table

    Hi all

    I have a version in the form of table, here I have a point of delete button where them remove those audited point tabular presentation.  If I have checked for two records continuously one after the other and press the button Delete, remove only the first record I checked only. Whereas, if I chose two records where both of them is not one after the other. Both will get supprim├⌐s.

    Start

    GO_BLOCK ('ACT_QT_TXN');

    PREMIER_ENREGISTREMENT;

    LOOP

    IF: ACT_QT_TXN. CHECK_BOX256 = 1 THEN

    delete_record;

    COMMIT_FORM;

    END IF;

    NEXT_RECORD;

    IF (: System.Last_Record = "TRUE") and: ACT_QT_TXN. CHECK_BOX256 = 1 THEN

    DELETE_RECORD;

    COMMIT_FORM;

    EXIT;

    ON THE OTHER

    IF (: System.Last_Record = 'TRUE') THEN

    EXIT;

    END IF;

    END IF;

    END LOOP;

    PREMIER_ENREGISTREMENT;

    execute_query (no_validate);

    end;

    Something wrong with my script above? Please help me. Thanks /.

    Kind regards

    Lim

    The problem is with Commit_form after every single deletion. What karim gave is smooth, but I like it this way-

    PREMIER_ENREGISTREMENT;

    DECLARE

    BEGIN
    LOOP

    WHEN THE OUTPUT: SYSTEM. RECORD_STATUS = "NEW";

    If: CHECK_BOX = 'Y' then

    delete_record;
    end if;
    NEXT_RECORD;

    END LOOP;

    COMMIT;

    PREMIER_ENREGISTREMENT;

    execute_query (no_validate);

    END;

    Concerning

    Bobin

  • combines the two text fields

    Hello, I've created a form with Adobe pro XI. I want to create a text field that combines the two fields (Field1 and Field2) text. How can I do?

    If the third field does not need to be editable, you can use a calculation script customized to what is something like the following:

    Custom calculation script

    (function () {}

    Get the field values as strings

    var s1 = getField("Text1").valueAsString;

    var S2 = getField("Text2").valueAsString;

    Set the value of this field to the concatenation of two strings

    Event.Value = s1 + s2;

    })();

  • Returns the lowest value of two fields

    Hello

    I have two domains that users manually enter in a form.  Value1 and Value2.

    Someone at - it suggestions on the best way to use JavaScript to return the lowest value of the two fields?

    Thank you

    Natalie

    I think I misunderstood what you mean by any, I thought you wanted the calculated value to be None. The two fields value digital formats and modify the script for:

    Custom calculate script

    (function () {}

    Initialize the array

    aNums var = [];

    Get the field values as strings

    var s1 = getField("Value1").valueAsString;

    var S2 = getField("Value2").valueAsString;

    Convert values to numbers if not empty and add to the table

    If aNums.push(+s1) (s1);

    If aNums.push(+s2) (s2);

    Set the value of this lesser field of entries

    If both are blank, this field blank

    Event.Value = aNums.length? Math.min.Apply (null, aNums);:

    })();

  • artists are to display the window more than once in sync

    iTunes version 12.2.4.   In the timing window on the right side under "Artists" of some artists appear more than once.

    For General and advice on the Organization of the iTunes, see grouping of tracks in albums . In particular, any given artist name should be spelt constantly everywhere where it appears in the two fields artist album and artist, and still have the same sort value.

    TT2

  • JavaScript to concatonate two fields

    Hello

    I try to get output variables of two fields and merge the results into one.

    1. If the two fields are white (CHANNEL_NO_P1 and CHANNEL_NO_P2), the concatonated field is empty.

    2. If the first field has content, but the second field does not work, the concatonated must simply show the contents of the first field (CHANNEL_NO_P1)

    3 otherwise the concatonated field indicates the connection of these two areas.

    I have part 1 and 3 works, but when I add part 2, he saw the script. (see below).

    If

    (RadioDuplexer.RadioDuplexerAssetPage1.RadioDuplexerDetailsSubForm.CHANNEL_NO_P1.isNull |) RadioDuplexer.RadioDuplexerAssetPage1.RadioDuplexerDetailsSubForm.CHANNEL_NO_P2.isNull) {}
    this.rawValue = "";
    }
    else if (!) ((RadioDuplexer.RadioDuplexerAssetPage1.RadioDuplexerDetailsSubForm.CHANNEL_NO_P1.isNull)). {RadioDuplexer.RadioDuplexerAssetPage1.RadioDuplexerDetailsSubForm.CHANNEL_NO_P2.isNull}
    RadioDuplexer.RadioDuplexerAssetPage1.RadioDuplexerDetailsSubForm.CHANNEL_NO_P1;
    }
    else {}
    this.rawValue = RadioDuplexer.RadioDuplexerAssetPage1.RadioDuplexerDetailsSubForm.CHANNEL_NO_P1.rawValue + RadioDuplexer.RadioDuplexerAssetPage1.RadioDuplexerDetailsSubForm.CHANNEL_NO_P2.rawValue;
    }

    I'm sure it's a syntax just around the part "non-zero", but I can't seem to make it work. Can anyone help?


    See you soon

    Rob

    Hi Rob,

    The second if statement does not assign the value of P1 to "this.rawValue.  Also missing the .rawValue after dismissal of the object P1.

    {
         this.rawValue = RadioDuplexer.RadioDuplexerAssetPage1.RadioDuplexerDetailsSubForm.CHA NNEL_NO_P1.rawValue;
    }
    

    I'd be inclined to test each objects .rawValue == null or .rawValue! = null.

    Hope that helps.

    Niall

  • The exact text of the text field to another field read-only

    Is there a way to display the string of exact text in the field of text within other text fields read-only?

    For example. I have fields of name on the first page and I have the same names mentioned in the other pages, but want to fill the other pages with the text name of the 1st page.


    Options tab > Default value doesn't seem to work, so maybe I can use calculate tab > simplified field notation.

    I have a domain called "Client_1_Name_Cover" and "Client_2_Name_Cover", so name to bind these two text fields only reading on other pages.

    You can use the validation script custom following in each of the two fields of name on the first page:

    Copy the value of this field in the field read-only

    getField("Client_1_Name_Readonly").value = event.value;

    but you must replace 'Client_1_Name_Readonly' with the actual name of the field read-only.

  • Check that only one box to advance to the text field

    I work in Acrobat Pro ms, I created a form and I have the following problem. The application form concerning the rental income, either monthly or annual (the format is less).

    What I want to happen, is if possible, if the user clicks on the checkbox monthly (monthly) the cursor goes to the 2 text and the user has entered the monthly amount.

    If the user clicks on the annual check (per year), the cursor goes to Text1, the user enters the annual amount. This amount is automatically divided by 12 and shows in the Text2 text field; and the cursor goes in the following text, Text3 field.

    Naturally, I don't want the user to click on the two boxes, but I don't know that the coding would take care of that, just do not know how come with the coding.

    £ Rental income monthly

    £ Annual if, Yes $ Text1 / Text2 $12

    Thanks for the help.

    You have 3 separate issues here:

    -Exclusive box

    -Jump to another field

    -Calculate the monthly payment

    -Exclusive box: you must give the two fields of the same name (say "times"), but the different export value, say "Monthly" and "annual".

    -Jump to another field: As the MouseUp event of the 'Monthly' box enter this script:

    this.getField("Text2").setFocus();
    

    As the event MouseUp "Annual" box enter this script:

    this.getField("Text1").setFocus();
    

    etc.

    -Calculation of the monthly payment: so you want this value to be entered by the user if the "Monthly" option is enabled, but being calculated if the "Annual" option is selected? It's a little complicated to implement in a single field, but you can try to use something like this as the "Text1": custom validation script

    if (event.value && this.getField("RentalPeriod").value=="Yearly")
         this.getField("Text2").value = Number(event.value)/12;
    
  • How to make a signature of the sender field

    I need to create a field on the library for my own signature model before as I have send the document or sign after signs of customer

    Hello

    If you want to sign the document as the sender, you can define the role of Participant 1 or last (depending on whether you would he sign as first or last) for the signature in the model field. Once the template is saved, you can tie in the Send tab and check "I have need to sign" as first or last as needed.

    -Usman

Maybe you are looking for