Filter a column with the value of another

Hello. Hope someone can help with this... On my search page, I want to use the value of the first list/drop-down menu to filter the values of the second list/menu. I use PHP and DW 8.0.2.

Example: The first column has each of the 50 States. second column has 3 000 counties. If a user selects New Jersey, I want to just 21 NJ counties to appear as options in the second menu downwards rather than 3 000 counties.

First Recordset works very well for the States. But in my second recordset, I say 'select distinct County of the said County WHERE AS var1'... and var1 is $recordset1 [County]. But the 2 column is empty. How can I actively pass the value of the first column in the second while the user is still on the same page?

Sandman

>>
Assuming that your table has a field named "State":
«select County of States WHERE state = "var1""
>>

You can use this solution when the first menu page 1 and the second menu on page 2 (IE passing the value of a query on page 2), but as assumingly, you need to have this functionality within a single page, basic need based on a javascript solution 'drop-down menus of dynamic load' to load the menu2 - options "in situs.

There is an extension for Dreamweaver stand alone for this on the site of Tecnorama , that also wants to work without the relationships between the tables, in other words, with the data in a table, which matches your scenario.

Tags: Dreamweaver

Similar Questions

  • Validation form column against the value of another Table

    Hello

    I'm new to this forum, so please bear with me a bit!  I only have a small amount of writing PL/SQL experience, and I've never written Javascript or JQuery before.  I am an Oracle DBA and I coding experience C and PERL, so I have a strong technical background.  But I need some advice on the best way to approach a problem.

    I have an application of data base in Oracle Apex (version 4.2) with a tabular form on a table: Let's say that #1 with the conditions of licence 1 a, 1 b, and1C.  I have to make sure that the value entered in col B is not greater than the value of a column in another table (for example table #2 pass 2 (a).  From a conceptual point of view, the amount of money available is in the #2 table, and my tabular form lines are an act of spending money (such as orders or invoices), so I have to make sure that we spend more that we have.  Who is?

    Does anyone have tips for the best way to do it?  I'm figuring that the biggest problem here is perhaps to account for people who enter multiple lines in the form of tables at the same time, right?  So, if a person is entered 3/invoices, I need a total to ensure that they do not have spend more than we have in the #2 table.

    I really appreciate your help!

    Best regards

    Laurie Baublitz

    Ah, I was not totally with you on this charge then. My validation works overall, but it totals the amount for each line, regardless of the task. Okay - who was not totally my solution but more a demonstration of the technique that you can use to validate your tabular presentation in this way.

    You could solve this issue with a safe collection, or with a table plsql where you add an entry for each task name and keep the amount stored in there.

    Anyway, it would be better for you to spend a little time on playback on the plsql collections or collections apex!

    Remember, this is a sample and you will need to take stock of it. The best solutions are those where you need to experiment with 8)

    DECLARE
      TYPE tt_taskamount IS TABLE OF NUMBER INDEX BY VARCHAR2(20);
      t_taskamount tt_taskamount;
    
      l_task VARCHAR2(20);
      l_amount NUMBER;
      l_max NUMBER;
    BEGIN
      -- F02 is the taskname
      -- F03 is the amount
      -- adapt to your situation!
      FOR i IN 1..apex_application.g_f02.count
      LOOP
        l_task := apex_application.g_f02(i);
        l_amount := apex_application.g_f03(i);
        IF NOT t_taskamount.exists(l_task) THEN
          t_taskamount(l_task) := l_amount;
        ELSE
          t_taskamount(l_task) := t_taskamount(l_task) + l_amount;
        END IF;
    
        -- it's not the best idea to perform a select each time and could be
        -- done better but for the sake of the example it's fine
        -- not too bad either if the rowcount is small.
        SELECT maxamount
          INTO l_max
          FROM table2
         WHERE taskname = l_task;
    
        IF t_taskamount(l_task) > l_max THEN
          -- returning will stop further processing and throw an error message as soon as a budget has been overrun
          -- it might or might not be required behaviour but that's up to you
          RETURN 'The max amount ('||l_max||') for task ' || l_task ||' has been exceeded. Reduce the total amount on associated tasks!';
        END IF;
      END LOOP;
    END;
    
  • update of NULL in the column with the values of the adjacent column

    Examples of data

    with test_data as
    (select 1 as one, null as two, 2 as three,5 as four, 6 as five, null as six from dual
    union all
    select 1 as one, null as two, 2 as three,5 as four, 6 as five, null as six from dual)
    select * from test_data;
    

    This is one of those cases, the case may be where any value of a column can be null

    or two similar columns can be null. If the column is null then I want to update the adjacent column

    average value of the column, if the first column is null so I want to take the next non-null column and update, if the last column is null

    so I want to take prev not zero column and to update.

    In this case would be my expected output

    Un Two Three Four Five Six
    11.52566
    123566

    Prospects for the future the suggesion or advice.

    Or, using Analytics:

    SQL> with test_data (id, one, two, three, four, five, six) as (
      2    select 1, 1   , null, 2   , 5, 6, null  from dual union all
      3    select 2, 1   , null, 3   , 5, 6, null  from dual union all
      4    select 3, 1   , null, null, 5, 6, null  from dual union all
      5    select 4, null, null, null, 5, 6, null  from dual
      6  )
      7  select *
      8  from (
      9    select id
     10         , cell
     11         , case when next_nn is not null and prev_nn is not null
     12             then (next_nn + prev_nn)/2
     13             else nvl(next_nn, prev_nn)
     14           end val
     15    from (
     16      select id
     17           , cell
     18           , val
     19           , last_value(val) ignore nulls over(partition by id order by cell) as prev_nn
     20           , first_value(val) ignore nulls over(partition by id order by cell range between current row and unbounded following) as next_nn
     21      from test_data
     22      unpivot include nulls (val for cell in (one as 1, two as 2, three as 3, four as 4, five as 5, six as 6) )
     23    )
     24  )
     25  pivot ( min(val) for cell in (1 as "ONE", 2 as "TWO", 3 as "THREE", 4 as "FOUR", 5 as "FIVE", 6 as "SIX") )
     26  ;
    
            ID        ONE        TWO      THREE       FOUR       FIVE        SIX
    ---------- ---------- ---------- ---------- ---------- ---------- ----------
             1          1        1,5          2          5          6          6
             2          1          2          3          5          6          6
             3          1          3          3          5          6          6
             4          5          5          5          5          6          6
    
  • Fill two empty columns with the values in a column (all in the same table)

    Can someone point me in the right direction? I want to fill the column prefix and suffix with the AcctNum data.

    "Prefix is the part of the number before the '-' and the suffix is everything after the '-'. '. Write a SQL command to fill the column prefix and suffix.
    *Accounts* 
    
    AcctNum   Prefix   Suffix
    -------   ------   -------
    123-0097
    X089-056
    123-0097
    123-0098
    F3377-D
    X089-057
    X089-058
    3-009712
    It is supposed to look like this:
    *Accounts* 
    
    AcctNum   Prefix   Suffix
    -------   ------   -------
    123-0097    123     0097
    X089-056
    123-0097
    123-0098
    F3377-D
    X089-057
    X089-058
    3-009712
    That's what I came with, but it does not work because it is basically putting multiple values into a single cell:
    update accounts
         set prefix=(select substr(acctnum, 1, instr(acctnum,'-')-1) from accounts),
         suffix=(select substr(acctnum, instr(acctnum, '-')+1) from accounts)
         where acctnum=(select prefix||'-'||suffix from accounts);
    I want this query is incredibly easy and I have forget something. Any help is greatly appreciated.

    Published by: 885913 on September 18, 2011 12:53
    UPDATE accounts a
    SET    ( prefix, suffix ) = (SELECT Substr(acctnum, 1, Instr(acctnum, '-') - 1),
                                        Substr(acctnum, Instr(acctnum, '-') + 1)
                                 FROM   accounts b
                                 WHERE  a.acctnum = b.acctnum);
    
  • Add column if the value in another column

    How can I add a column as column name 'YES_OR_NO.

    SELECT VALUE_ID IN THE TABLE TABLE_NAME

    VALUE_ID
    ---
    1
    2
    3
    4
    5

    Now, I want to create another column in the sql query called YES_OR_NO and that if there is a value in VALUE_ID then column YES_OR_NO must say 'YES' if there is no value in the column VALUE_ID of this line YES_OR_NO must say 'NO '.

    or just a way for her also to work would be to show this new column or not if a value in another column of table_name_2 (this would be ideal)
    If new column yes_or_no and fill by a Yes or a no if a value is found in another table

    Assuming that you are on a version that supports the CASE expression:

    SELECT VALUE_ID
          , case when VALUE_ID is null then 'NO' else 'YES' end as YES_NO
    FROM TABLE_NAME
    
  • PDF form: fill in the field with the value of another field

    Hello

    I have a PDF form that one of our employees has to be completed on a regular basis.

    There is a 'product' - text field, which is present on the form several times, which will contain the same information.

    From now on, my colleague has fill all these these one by one manually. But with the copy - paste, it doesn't take more than a few seconds.

    However, to facilitate work a little, I want to it to be able to simply fill out one of the fields (can be a specific, must not be dynamic) and all the other 'product' - fields automatically takes the value of the field of this first.

    How can I accomplish this?

    I noted the possibility of JavaScript controls.

    I am familiar with basic JavaScript, however never used it for PDF files.

    Any help and pointers would be appreciated.

    Thank you very much.

    This isn't a problem with script. Just give each field of the same name. Once the field names are the same, a change in one will be to another. For some reason that it does not work with standard HTML forms, probably the reason why you ask.

  • column with the value of inputText update

    Hello

    I use jdev 11g

    I have table with salary of name of column and I called bonus text field entry

    I want to create button when clicking on it

    record everything in the table update (add) salary of which the value in the input text filed

    If you use ADF BC, generate a class of Application Module and to write the code needed to update the View object which is bound to the table.

    public void updateSalary() {}

    creating lines iterator to iterate through your point of view
    Employees of RowSetIterator = this.getEmployees () .createRowSetIterator (null);
    Employees.Reset ();

    iterate through your point of view
    While (employees.hasNext ()) {}
    Retrieves the line
    Employee of EmployeesRowImpl = (EmployeesRowImpl) employees.next ();
    update the salary by adding the bonus
    employee.setSalary (employee.getSalary () .add (employee.getBonus ()));
    }

    cleaning
    employees.closeRowSetIterator ();
    }

    There is the customer service of AOS to interface and create a method to it link in your page links.

    These two steps are declarative in JDeveloper.

    Finally build a listener for the action button and call the AM method you linked in the previous step.

    public static DCBindingContainer getBindingContainer() {}
    return (DCBindingContainer) JSFUtils.resolveExpression("#{bindings}");
    }

    It's the listener of the action that is performed when you click the button
    {} public void updateSalary (ActionEvent actionEvent)
    OperationBinding = operation
    getDCBindingContainer () .getOperationBinding ("updateSalary");
    Operation.Execute ();
    }

  • How to update columns with the value of other lines in the same table

    Hello

    I use Oracle 11.2, I'd use SQL statements to update a column based on values in other rows in the same table. Here are the details:

    create table TB_test (number 4 myId, crtTs date, date of MDPU);

    insert into tb_test (1, to_date ('20110101', 'YYYYMMDD'), null);
    insert into tb_test (1, to_date ('20110201', 'YYYYMMDD'), null);
    insert into tb_test (1, to_date ('20110301', 'YYYYMMDD'), null);
    insert into tb_test (2, to_date ('20110901', 'YYYYMMDD'), null);
    insert into tb_test (2, to_date ('20110902', 'YYYYMMDD'), null);

    After you run the SQL code, I would like to have the following result:

    1, 20110101, 20110201
    1, 20110201, 20110301
    1, 20110301, null
    2, 20110901, 20110902
    2, 20110902, null

    Thanks for your suggestion.

    I guess you need this, otherwise please explain logic correctly:

    SQL> merge into tb_test t
      2  using (
      3    select rowid as rid
      4         , lead(crtts) over(partition by myid order by crtts) as updts
      5    from tb_test
      6  ) v
      7  on (t.rowid = v.rid)
      8  when matched then update
      9   set t.updts = v.updts
     10  ;
    
    5 rows merged.
    
    SQL> select * from tb_test order by 1,2;
    
          MYID CRTTS     UPDTS
    ---------- --------- ---------
             1 01-JAN-11 01-FEB-11
             1 01-FEB-11 01-MAR-11
             1 01-MAR-11
             2 01-SEP-11 02-SEP-11
             2 02-SEP-11
    
  • Documentation about adding column with the DEFAULT value.

    Hello

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/statements_3001.htm#i2198241

    < quote >
    If you add a column, then the initial value of each row in the new column is NULL unless you specify the DEFAULT clause. In this case, Oracle database updates each row in the new column with the value specified for the DEFAULT value. This update operation, in turn, triggers AFTER UPDATE triggers defined on the table.
    < quote >

    I am not able to understand the emphasis on the part AFTER UPDATE while the column with DEFAULT values addition triggers both BEFORE and AFTER triggers defined on UPDATE.

    According to the documents of 11 g

    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28286/statements_3001.htm#i2133105

    n.m. (u) r only changes with the NON NULL columns, but focus on AFTER UPDATE is still there. No trigger defined on the fire of the update in this case.

    This insistence is intended? If not, IMO, it should be changed.

    Kind regards

    Hi Sissi. After further discussion, we have added some information about a change in behavior. Here is what says the next version of the doc:

    When you add a column, the initial value of each row in the new column is null.

    * If you specify the DEFAULT clause for a column NOT NULL, then the default value is stored as metadata, but the column itself is not populated with data. However, the following queries that specify the new column are rewritten so that the default value is returned in the result set.

    This optimized behavior differs from earlier versions, when as part of operation ALTER TABLE Oracle database updated every line in the newly created with the default column and then fired defined update triggers on the table. In this release, no trigger is triggered because the default value is stored only in the form of metadata.

    * If you specify the DEFAULT for a nullable column clause, then the default value is added to existing lines under this ALTER TABLE statement, and any update triggers defined on the table are activated. This behavior also means if you change a NOT NULL column with a default value to be nullable.

    Hope that helps to clarify the matter further.

    Kind regards
    Diana

  • I have a column with two values, separated by a space, in each line. How to create 2 new columns with the first value in a column, and the second value in another column?

    I have a column with two values, separated by a space, in each line. How do I create 2 new columns with the first value in one column and the second value in another column?

    Add two new columns after than the original with space separated values column.

    Select cell B1 and type (or copy and paste it here) the formula:

    = IF (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    shortcut for this is:

    B1 = if (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    C1 = if (Len (a1) > 0, Member SUBSTITUTE (A1, B1 & "", ""), "")

    or

    the formula of the C1 could also be:

    = IF (Len (a1) > 0, RIGHT (A1, LEN (A1) −FIND ("", A1)), "")

    Select cells B1 and C1, copy

    Select cells B1 at the end of the C column, paste

  • An update on an index column with the same value generates an index to the top

    An update on an index column with the same value generates an update of the index?


    Thank you

    In addition to my previous answer, see also

    http://orainternals.WordPress.com/2010/11/04/does-an-update-statement-modify-the-row-if-the-update-modifies-the-column-to-same-value/

    Riyaj Shamsudeen has this to say:
    "+ We have an index on this column v1 and we update this column indexed too." Oracle was updating the indexed column? N ° if the values match the level of the indexed column, then the code of RDBMS isn't up-to-date index, a feature for optimization again. Only the row of table is updated, and the index is not updated. + "

    Hemant K Collette

  • How to take a column of duplicate names and fill a different column with the same names, excluding duplicates?

    How to take a column of duplicate names and fill a different column with the same names, excluding duplicates?

    I find easier to use this copy separate Automator Service (download Dropbox).

    To install in your numbers > Services, double-click menu just the package downloaded .workflow and if necessary give permissions in system preferences > security & privacy.

    To use, just:

    1. Select the cells in the column with duplicate names.
    2. Choose separate copy in numbers > Services menu.
    3. Click once in the upper cell where you want the deduplicated values appear.
    4. Command-v to paste.

    SG

  • How to capture the time entry with the value 'default' as SYSDATE

    Hello

    I created "entry receipt" form by using wizard.

    Hidden CREATED_ON column is defined with the value 'default' as SYSDATE.

    However, it's only complete part of date, but time is not included when I discovered that in the report.

    Format under 'source' mask is defined as "MON-DD-YYYY HH24:MI:SS" during form entry.

    Under the column definition format mask is "HH24:MI:SS MON-DD-YYYY" under the report.

    Need help to fix this problem.

    I use APEX worm 4.2.6

    Thank you

    -Anand

    Is it viable to not include the column in the form of the APEX and have a default value to the column in the table?

    ALTER table my_table change created_on default sysdate;

  • How do I delete an article based on the value of another field


    I have a pdf form that I added to the text fields. My challenge is that of the financial section of the form, if the value of a specific field is empty or null, I blank block of signature financial review.  I've been trying to find a way to cover the area of signature with a white box or have a text box with signature block text appear or disappear depending on whether the value is zero or empty.

    If seen many answers on how to make the field itself disappear based on value, but I did find something that causes another field or shape appear or disappear depending on the value of another field.

    Please try the following script,

    var signid = true;

    If (this.getField("finan").value! = 0) signid = true;

    of another signid = false;

    If (SignID) this.getField("signaturefield").display = display.visible;

    else this.getField("signaturefield").display = display.hidden;

    Please let me know if it solves the problem.

  • Some columns of the values of the selected line returns NULL in the table of the adf.

    Hello..

    My version of jdev 11.1.1.5.0

    I have a vision with some columns. This view is mapped to a table of adf with some of the displayed columns. My task is to get the column values selected line (including the values of the column not displayed).
    But I'm certain values such as null, although there are values present when I run the query from the view.
    My code:
    DCIteratorBinding tableVO = ADFUtils.findIterator ("myVO");
    ViewObject voTableData = tableVO.getViewObject ();
    Line rowSelected = voTableData.getCurrentRow ();


    + / / codeto display column and the values +.
    int x = 0;
    * for (the names of the objects: rowSelected.getAttributeNames ()) {*}

    * for (int i = x; i < rowSelected.getAttributeValues () .length; i ++) {*}
    * System.out.println (x + "." + name + "=" + rowSelected.getAttribute (i)); *
    break;
    *}*
    x ++ ;
    continue;
    *}*


    MY table:
    * < af:table value = "#{bindings.myVO.collectionModel}" *.
    * var = "row" rows = "#{bindings.myVO.rangeSize}" *.
    * EmptyText = "#{Bindings.myVO.Viewable?" "{'No data to display.': 'Access Denied.'}". *
    * fetchSize = "#{Bindings.myVO.rangeSize}" *.
    * rowBandingInterval = "0."
    * filterModel = "#{Bindings.myVO.queryDescriptor}" *.
    * queryListener = "#{Bindings.myVO.processQuery}" *.
    * filterVisible = "true" varStatus = "vs."
    * selectionListener = "#{myBean.method_onRowSelect}" *.
    * rowSelection = "single" id = "t1" styleClass = "AFStretchWidth."
    "* partialTriggers =": sbcClose: sbcOpen: socWarehouse. "
    * inlineStyle = "height: 217px;" / > *.


    Thank you

    Question: the attributes are not null in the DB?
    The attributes are part of the past of the query select?
    And they are part of the binding of the tree?

    Timo

Maybe you are looking for

  • Global variable control and simulation

    Hello! I have a probem with the export data of the Simulation loop in the graphic form. I have created a global variable, but in the façade is not updated or exported the data necessary, but in the file as a global variable do? I would like to gather

  • Reduction of noise and raw

    I use a rebel T4i, but the model does not really important I think. When Hi ISO and long exposure Noise Reduction has the value applies to RAW? I'm under the impression that RAW get no extra treatment. But I am learning to look at my images in new wa

  • Save file error codes

    Cannot back up my files on a dvd disc, guard fail with 0x80004F3 error code. My system is Windows Vista Home Premium 32-bit with service pack 1. FYI, SP2 will not install.

  • MSOE.dll could not be initalized.

    Remember - this is a public forum so never post private information such as numbers of mail or telephone! Ideas: You have problems with programs Error messages Recent changes to your computer What you have already tried to solve the problem

  • The Media Direct button on the laptop does not

    When I press the Media Direct button on my laptop, nothing happens.  I have an Inspiron 9400. It came with windows xp home, but I've updated the vista home premium operating system.