Comparing data in two text fields

Hi,
I have two text boxes which compares the value in one text box with other. Assume Text Box 1 has value as 1234 and Text Box 2 has value 12345,123,12346. Now I will be greying out the text box 1 by applying rule as If Text Box 2 contains Text Box 1 then do
conditional formatting of greying out. In this scenario Textbox 2 doesn't contain the value of Text Box 1 how ever the condition turns out to be true and then greys out. Its takes 123 which is present in text box 2 and as it finds
relative match with 123(neglecting 4) it is returning true.
Text Box 2 value is obtained by concatenating several text box values with commas. I want to perform exact match and grey out if it contains. Is there a way I can grey out the text box 1 by comparing the value in text box 2 before and after comma of each
value in textbox.
Thanks

Hi  Raju,
I recommend to set the Text Box 2 value by concatenating values with commas like this: “value1,value2,valu3,” (with a comma after each value).
Then we can set the rule like this(Text2 for Text Box 2 field, Text1 for Text Box 1 field):
Best regards.
Thanks
Victoria Xia
TechNet Community Support

Similar Messages

  • How to compare dates between two items

    Hello all,
    I am trying to compare dates in two items.
    The first item is a computation P45_PAGE_LOADED_TIME
    select sysdate from dual;
    This essentially keeps track of when the user opened the form. They are accessing data that may become obsolete while they are in the form.
    So we have a dynamic action that finds the last_update date from a table. This field is of type date. It is placed in a text field called P45_STATUS.
    We then have a notification which we want to fire when P45_PAGE_LOADED_TIME is before P45_STATUS. We tried the following condition
    declare
    least_date date;
    begin
    SELECT LEAST(TO_DATE(:P45_STATUS),TO_DATE(:P45_PAGE_LOADED_TIME)) into least_date
    from dual;
    if least_date = to_date(:P45_STATUS) then
    return false;
    else
    return true;
    end if;
    end;
    Any guidance would be most appreciated.
    Thanks

    Maybe your better off putting your anonymous block into a plsql function.
    A function that you can test. If it works in plsql then you must call it in APEX.
    I kinda get a headache when I see that least, to_date, to_date query (although I've seen worse :p)
    Make it like:
    create or replace function fun_least_date(in_status in varchar2,
                                                               in_page_loaded_time varchar2) return boolean
    is
      l_status date;
      l_page_loaded_time date;
      least_date date;
      l_return boolean;
    begin
      l_status := to_date(in_status, 'FORMAT MASK!!!');
      l_page_loaded_time := to_date(in_page_loaded_time, 'FORMAT MASK!!!!');
      least_date := least(l_status, l_page_loaded_time);
      if least_date = l_status then
        l_return := false;
      else
        l_return := true;
      end if;
      return l_return
    end fun_least_date;If your sure that your function is correct then use it as a condition for your dynamic action.
    Regards
    Nico
    ps: I haven't tested that function. Be aware that you most correctly enter the format mask you use in APEX. Also before APEX may know about these variables you should set a dynamic action on your items to always submit their value to the server when they change!!!

  • Select all the dates between two txt fields. how?

    In a 6i form cursor I need to select all the dates between two provided dates. I have two text fields FLD1 and FLd2 with date datatype. There is no table behind both the fields.
    For example
    :FLD1:='01-MAR-2013';
    :FLD2:='10-MAR-2013';
    Now I have to select all the dates from 01-mar-2013 to '10-mar-2013'. how to do it?

    Gul wrote:
    In a 6i form cursor I need to select all the dates between two provided dates. I have two text fields FLD1 and FLd2 with date datatype. There is no table behind both the fields.
    For example
    :FLD1:='01-MAR-2013';
    :FLD2:='10-MAR-2013';
    Now I have to select all the dates from 01-mar-2013 to '10-mar-2013'. how to do it?As'salamualikum Gul
    Try this
    SELECT TO_DATE('01-MAR-2013', 'DD-MON-RRRR') - 1 + rownum AS d
    FROM ALL_OBJECTS
    WHERE TO_DATE('01-MAR-2013', 'DD-MON-RRRR') - 1 + rownum BETWEEN TO_DATE('01-MAR-2013', 'DD-MON-RRRR') AND TO_DATE('10-MAR-2013', 'DD-MON-RRRR')Hope this helps

  • How to compare data between two tables?

    Hi,
    My team is trying to develop a SAP data migration tool (DMT) using ABAP.
    One of the functionalities in the DMT is to validate the data in the staging area against the loaded SAP data.
    The tables in the stagin area are customer tables (i.e. user-defined tables starting with Y, Z).
    How do I compare the data in the staging area against data that are loaded into SAP tables? Are there some built-in SAP functions to do this? Or, are there some better ways of doing this (e.g. instead of comparing against data in the SAP tables, we compare with some INTERNAL tables)?
    Any help would be greatly appreciated, thanks!

    Hi Kian,
    Use <b>SCMP</b> transaction to compare data between two tables and you can not use this for comparing internal tables.
    Thanks,
    Vinay

  • Question on "text flow" with two text fields:

    Hi Folks,
    I was hoping you could help me to see if this is possible with Livecycle Designer, any assistance would be much appreciated:
    I'm populating a dynamic pdf and have the need to have multiple lines of text composed of two text fields (name and description) where name is bold text followed by description in regular text for example:
    Item 1 Name Sample: This is the item one description, adding some lorem ipsum text to show how it would flow across multiple lines here Lorem ipsum dolor sit amet, defunctam.Lorem ipsum dolor sit amet, ingens ad te ad nomine Hesterna. Pentapoli naves non ait Cumque ego dum. Scelus patrem in rei.
    Item 2 Name Sample: This is the item two description, adding  some lorem ipsum text to show how it would flow across multiple lines  here Lorem ipsum dolor sit amet, defunctam.Lorem ipsum dolor sit amet,  ingens ad te ad nomine Hesterna. Pentapoli naves non ait Cumque ego dum.  Scelus patrem in rei exultant deo apprehendit in fuerat construeret in  rei sensibilium acciperem qui enim est se vero diam ille. Agimus nolo me  testatur sed. Descendi eam ad.
    Item 3 Name Sample: This is the item three description, adding  some lorem ipsum text to show how it would flow across multiple lines  here Lorem ipsum dolor sit amet, defunctam.Lorem ipsum dolor sit amet,  ingens ad te ad nomine Hesterna. Pentapoli naves non ait Cumque ego dum.  Scelus patrem in rei.
    I have a subform for each item that contains two fields [itemName] [itemDescription], is there any way to do this without combining them into one textfield with rich text on?
    Thanks,

    Hi Phill,
    You could use floating fields, where the inputs are hidden and bound to your incoming XML. In the visible {} fields, you can set one of these to bold. The advantage would be that the two displayed floating fields will flow depending on the content.
    Have a look at the second example in this form: http://assure.ly/iuYifq
    Hope that helps,
    Niall

  • Comparing Xml in a Text Field

    We have a Text field which saves Xml data (not too big, 20 to 40 lines usually), in one of the stored procedures, we are receiving the Xml, which needs to be either inserted or updated based on whether that record already exists in table or not. We are doing
    that match based on other non-xml fields but in one case we don't have any other option but to compare xml, so here is my question.
    What's the most performance efficient way to compare Xml (which is passed as input parameter to SP as Text) to the one already saved in Table as Text? We are running Sql 2005.
    Thanks
    Syed

    Hi Syed_Sajid,
    Regarding your description, are you looking for approach to compare xml structured TEXT fields? If so, you can reference the below sample.
    DECLARE @Tab TABLE(id INT, content TEXT)
    INSERT INTO @Tab SELECT 1,'<catalog>
    <book>
    <author>Gambardella, Matthew</author>
    <title>XML Developer''s Guide</title>
    <genre>Computer</genre>
    <price>44.95</price>
    <publish_date>2000-10-01</publish_date>
    <description>An in-depth look at creating applications
    with XML.</description>
    </book>
    </catalog>'
    DECLARE @XML1 XML,@XML2 XML;
    SELECT @XML2= content FROM @Tab WHERE id=1
    SET @XML1 = '<catalog><book>
    <author>Corets, Eva</author>
    <title>Maeve Ascendant</title>
    <genre>Fantasy</genre>
    <price>5.95</price>
    <publish_date>2000-11-17</publish_date>
    <description>After the collapse of a nanotechnology
    society in England, the young survivors lay the
    foundation for a new society.</description>
    <extra>a</extra>
    </book>
    </catalog>'
    ;WITH XML1 AS
    SELECT T.N.value('local-name(.)', 'nvarchar(max)') AS NodeName,
    T.N.value('.', 'nvarchar(max)') AS Value
    FROM @XML1.nodes('/catalog/book/*') AS T(N)
    XML2 AS
    SELECT T.N.value('local-name(.)', 'nvarchar(max)') AS NodeName,
    T.N.value('.', 'nvarchar(max)') AS Value
    FROM @XML2.nodes('/catalog/book/*') AS T(N)
    SELECT ISNULL(XML1.NodeName, XML2.NodeName) AS NodeName,
    XML1.Value AS Value1,
    XML2.Value AS Value2
    FROM XML1
    FULL outer join XML2
    ON XML1.NodeName = XML2.NodeName
    WHERE ISNULL(XML1.Value, '') <> ISNULL(XML2.Value, '')
    The different nodes between two xmls will be listed in the result above.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Data from one text field to another text field on the next page

    Hi all,
    Hi I have a form, which has data coming in from the data binding, the thing is the data is mapped to a certain text field and if that text field is filled up it should be continued on to the other text field which is on the immediate page following it. the reason for using text field instead of  Subform and make it expandable is  the client does not want to change the position and structure of other fields following that field, they are o.k with the amount overflowed in to the next text field .
    is there any script for the same condition in Java script or form calc.
    Thanks in advance.
    de1209

    This is not as simple as it sounds. You will not be able to split the field up during the time of binding. The entire string must go into the field and only after it has completed the biinding can we change it around. A colleage of mine did this for an interactive field and it involved some pretty complicated code. Here is a link to her blog entry that describes what she did:
    http://blogs.adobe.com/lcdesigner/2008/07/an_example_of_splitting_text_a.html
    But that is only part of the problem.....once you split the information across two fields you will need to recombine it back into a single field so that the data that is submitted can represent it correctly again. So you will have to reverse the process in a presubmission step.
    Make sense?
    paul

  • How to place two text fields on the same line in adobe

    I am trying to create a form on adobe and I would like to have two unique text fields on the same line. Is this posible? 

    If you are using FormsCentral it is, the fields can be placed "side by side" in a row.  There is a "+" sign on the right side of the field that brings up a toolbar to add a field adjacent.  You can also right click on a field and select "Insert beside", or you can "drag and drop" fields next to one another or to a new row.
    Thanks,
    Josh
    PS - One note, if you are using the "desktop" application of FormsCentral that comes with Acroat Pro XI make sure the application is up to date by either using the "Help" - "Check for updates" menu item or by signing into the application so that you have the latest features including the side by side layout.

  • How to compare content of two text file using StreamTokenizer

    hi....
    i have two text files...containg field like(name,number,scheme) and(number,date,value)... i want to create a third file containg field like (name,number,date,scheme,value) by using these two table. how to create

    I think this code can solve your problem.
    private static final String DELIM = ",";
    * Compile two files.
    * @param file1 String the input file 1
    * @param file2 String the input file 2
    * @param file3 String the output file
    * @throws IOException error in reading/writing
    public void compileFiles(String file1, String file2, String file3) throws
            IOException {
            BufferedReader reader1 = new BufferedReader(new InputStreamReader(
                new FileInputStream(file1)));
            BufferedReader reader2 = new BufferedReader(new InputStreamReader(
                new FileInputStream(file2)));
            BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(
                new FileOutputStream(file3)));
            String line1 = reader1.readLine();
            String line2 = reader2.readLine();
            while (line1 != null && line2 != null) {
                writer.write(compileLines(line1, line2));
                writer.newLine();
                line1 = reader1.readLine();
                line2 = reader2.readLine();
            reader1.close();
            reader2.close();
            writer.close();
        private String compileLines(String line1, String line2) {
            StringTokenizer tok1 = new StringTokenizer(line1, DELIM);
            StringTokenizer tok2 = new StringTokenizer(line2, DELIM);
            String name = tok1.nextToken();
            String number = tok1.nextToken();
            String scheme = tok1.nextToken();
            // ignore number
            tok2.nextToken();
            String date = tok2.nextToken();
            String value = tok2.nextToken();
            StringBuffer buffer = new StringBuffer();
            buffer.append(name);
            buffer.append(DELIM);
            buffer.append(number);
            buffer.append(DELIM);
            buffer.append(date);
            buffer.append(DELIM);
            buffer.append(scheme);
            buffer.append(DELIM);
            buffer.append(value);
            return buffer.toString();
        }

  • Comparing data  of two elements

    Hi ,
    I have an application in which the user is required to fill up a form or modify an existing entry. When the user clicks on the save button I want to check if the user has made any changes or not. There are 40 odd fields in the form. I'm looking for an option other than the normal If-Then-Else.
    Does someone know a better way of comparing the data in two different elements?
    Are there any API's which do this?
    Thanks in advance
    Pradeep

    Hi  Pradeep,
    I am not sure about my soultion but you can give a try.
    Check the isChanged() and isChangedByClient() API on IWDNodeElement
    https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/progmodel/api/IWDNodeElement.html
    Regards, ANilkumar

  • Compare data between two tables of same schema

    Folks,
    I have one very intresting query which i would like to share with you all and looking forward for the solution asap.
    Scenario
    I have two table say TableA and TableB, both having same structre say as below
    TableA
    Col1 Var(10)
    Col2  INT
    TableB
    Col1 Var(10)
    Col2  INT
    I want to compare data between these two tables and store compared data into third table, let me expalin the whole scenario.
    TableA
    ColA          ColB
    INDIA          1
    PAKistan      2
    TableB
    ColA          ColB
    INDIA          1
    PAK             3
    I want result like
    Difference
    ColA          ColB
    True            0
    False           -1
    I want to store this difference in thrid table.
    i.e. when comparing text, i need TRUE when compare 100% else False, Caption is not considered.
         When comparing numeric value, simple sub is requried , TableA-TableB
    Note - I dont want to use any external tool to compare the table data, i required sql query to do the same.
    Thanks
    Amit Srivastava
    Amit
    Please mark as answer if helpful
    http://fascinatingsql.wordpress.com/

    Whereas the abbreviation of countries that exist in Table2 table are the first three letters of the name of the country*, here's a suggestion:
    -- code #1 v2
    INSERT into [Difference] (Col1, Col2, ACol1, BCol1)
    SELECT case when A.Col1 = B.Col1 then 'true' else 'false' end,
    (IsNull(A.Col2, 0) - IsNull(B.Col2, 0)), A.Col1, B.Col1
    from TableA as A full outer join
    TableB as B on (A.Col1 = B.Col1
    or Left(A.Col1, 3) = B.Col1);
    Is the COLLATE database case insensitive? If not, the code #1 above will have to be modified, using the upper () function or using COLLATE case insensitive in A.Col1 and B.Col1 columns.
    But if the abbreviation of the country follow the
    ISO 3166-1 alpha-3 standard, will require a fourth table containing the symbol and name of countries.
    -- code #2 v2
    ;with
    TableB_2 as (
    SELECT case when Len(Col1) = 3
    then (SELECT Country_name from [ISO 3166-1 a3] where Cod = Col1)
    else Col1 end as Col1, Col2
    from TableB
    INSERT into [Difference] (Col1, Col2, ACol1, BCol1)
    SELECT case when A.Col1 = B.Col1 then 'true' else 'false' end,
    (IsNull(A.Col2, 0) - IsNull(B.Col2, 0)), A.Col1, B.Col1
    from TableA as A full outer join
    TableB_2 as B on A.Col1 = B.Col1;
    Structure and data to test:
    use tempdb;
    CREATE TABLE TableA (Col1 varchar(10), Col2 int);
    CREATE TABLE TableB (Col1 varchar(10), Col2 int);
    CREATE TABLE [Difference] (Col1 varchar(10), Col2 int, ACol1 varchar(10), BCol1 varchar(10));
    INSERT into TableA values ('INDIA', 1), ('PAKistan', 2), ('China', 12);
    INSERT into TableB values ('INDIA', 1), ('PAK', 3), ('Bhutan', 3);
    go
    CREATE TABLE [ISO 3166-1 a3] (Cod char(3) primary key, [Country_name] varchar(30));
    INSERT into [ISO 3166-1 a3] values
    ('IND', 'India'), ('PAK', 'Pakistan'), ('CHN', 'China'), ('BGD', 'Bangladesh'),
    ('BTN', 'Bhutan'), ('MMR', 'Myanmar'), ('NPL', 'Nepal');
    go
    (*) If the short form of the country name using the first three letters of the country name,
    false positives can occur. For example,
    Mali and Malta or
    Angola and Anguilla.
    José Diz     Belo Horizonte, MG - Brasil

  • Data in One Text Field or the Other

    I have two numeric fields and there need to be a value in either one or the other not both, is there a way to make this happen.
    Thanks

    Steve,
    What I was look for was if the user inputs data in the "SSN" field with would be unable to put data in the "Passport#" field and visa-versa.
    Thanks

  • How to "encapsulate" a data from a text field in a JSP form

    Hi. I'm trying to make a user's registration jsp page and I'm not sure how I could get the data from a JSP form from the user and store that into some variable that I could later pass to a query to modify the database. I've been using a JavaBean, but I get null values for all the fields of the jsp page. That's logical, since I cannot find a method that will read the user's input and store that into some variable. In my JavaBean, I have get and set methods that will return a String for each of the form fields such as first name and email. The set method will have in a String as a parameter to set that field value (whichever field it is) to the value of the input parameter, but I don't know if there is a method or a way to read and store the values entered by the user into the jsp form. This is a code snippet of the jsp form:
    <TR><TD>First Name: </TD>
    <TD><INPUT TYPE="TEXT" NAME="fname"
                   VALUE="<%= newUser.getFirstName() %>"></TD></TR>
    Here, the getFirstName() method simply returns the value of a String value related to the user's first name, which is initialized as null in the JavaBean. newUser is the name of the JavaBean that I'm using.
    Any suggestions? Thanks.

    haha...nevermind this question also guys...I found out that I could use the request.getParameter("some_String") method with my JavaBean to read and store data entered by the user in a text field.

  • Auto date entry in text field not working

    I have a text field named tdate, which is read-only and visible. I want Acrobat XI Pro to insert today's date when the form is opened. Here's what I have:
    javascript code:
    var f = this.getField("tdate");
    if (!f.value) f.value = util.printd ("mmmm d, yyyy", new Date());
    This code is inserted in Page properties / Actions /Page Open / run a JavaScript
    nothing happens when the page is opened.
    I have also tried, unsuccessfully, to enter this JavaScript code within the form field actions (mouse up), and nothing happens. I see from the forum comments that apparently this is successful for other users, but nothing seems to fill this text field. What am I doing wrong?
    Bill

    Thanks for your reply. I started to wonder whether or not the current field
    that I created had somehow been corrupted due to my fooling around so I
    deleted the field re-created it (and also randomly JavaScript debugger and
    deleted the code there) and now the current date appears in the text field.
    I wonder why Adobe doesn't simply allow the user to insert fields where the
    field is filled with either the current date or the current time instead of
    forcing the user to enter some JavaScript code. Not all users of Acrobat
    professional want to get that involved.
    Regards,
      Bill
    Bill McLachlan

  • How to display date in a text field when a calendar is clicked

    hi
    I have a button i placed a calendar image in that button.when i click that button it displaying a calendar,when i click that calendar it is displaying the specific date .
    what i want is,when i click the calendar the specific date must display in a text field.
    please help me.
    thanks in advance

    Hi Arch,
    Go to the following link and check JCalendar API (needs to create a login for downloading JAR)
    [JCalendar API @ dev.java.net|https://jcalendar.dev.java.net/]
    it is a nice JCalendar with lot of options. Also it is working. You can download the JAR file and use it in ur program.
    From this component, you can read out the Date value and then set the text of JTextFiled using this value.
    or go for another implementation
    [Another JCalendar|http://www.gimlisys.com/articles-jdatechooser.html]
    Sunil

Maybe you are looking for

  • External hard drive used to be recognised in iTunes but has stopped...

    I moved my itunes library onto an external HD a while ago. All was well. Mac went into repairers. Now the HD is recognised but not in iTunes. I've done the preferences thing to try to "move" the location but no good. Any suggestions?

  • Sub templates with Locale - BIP 10G

    Hi, Does BI Publisher and desktop 10G support use of sub templates with locale information being passed while calling them ? Many thanks Rohit

  • How do I get my old library back after installing iTunes 7.0.2 ?

    After windows died, I reinstalled XP and iTunes stopped working (v6.x). I installed v7.0.2, but now my library is empty, my playlists missing and I can't update my ipod mini. Nothing suggested by the help files seems to work. (I keep my library/song

  • Find Script/Smart form

    Hi, I have been given the program name. How do I find out which form/script is attached to that program?

  • Release Strategy De-Commissiono

    Hi Guru's Please can you give me the best advice on how to de-commission an existing Release Strategy. We have a Release Strategy in place which is not suppose to be effective in the new process orders being created. Since the previous consultant rem