Dynamic forms using dynamic column names

I have a table with columns such as level_1, level_2, etc.
until level_11 and I have another table with level_id and
description, i.e. for level with id = 1 the description could be
'Crawl.' Id 2 could be 'Walk' etc.
I'm trying to make a checklist so people can mark when
they've done things on the checklist, and then upload those values
to the appropriate tables to store the information so it's all
still there when they go back to check off a new skill.
I can't figure out how to make the column names in the form
dynamic.
I've played around with the formatting and still can't quite
get it. I've tried evaluate(queryname.level_#level_id#),
queryname.label, a bunch of other ones, and I can't seem to get it
to work.
Thanks for the help!

Get to know CF's structure / array notation. This comes in
very handy when dealing with queries and form fields.
- Form.myFieldName can also be referenced by
Form["myFieldName"]
- MyQuery.myField can also be referenced by
MyQuery["myField"][rowNumber]
Anything in the above example surrounded by quotation makes
can be made dynamic by just adding in a cf variable surrounded by
pound signs:
get_dealer_completion["level_#level_id#"][1]

Similar Messages

  • With a PDF Dynamic form using show/hide actions, how to ensure that when the completed form is saved, closed and re-opened, the form still show the fields as before it was closed?

    With a PDF Dynamic form using show/hide actions, how to ensure that when the completed form is saved, closed and re-opened, the form still show the fields as before it was closed?
    I have developed a form with fields hidden by default, that become visible based on box ticked or radio button selections.
    My problem is that, when I close the form and re-open it, it comes back to it's default presentation, regardless of the information already recorded in the form (including in the now hidden fields.
    How to correct that
    Thanks in advance for any hint you can provide.

    I've had the same problem. This solved it...
    Go to the "Form properties..." in the File-menu. Select "Run-time" to the left and in the box "Scripting" Preserve scripting changes to form when saved: choose Automatically (Script-based state changes are saved locally in an insecure fashion. This option cannot be used for certified forms).
    Hope it works for you to...

  • How to create a MD form using dynamic page ?

    Rahul and Sharmila,
    You have answered several of my queries earlier and I am thankful for them.
    I have been trying to creating a MD form using dynamic page and I haven't fiqured it out. I need help. You both advised me on creating a simple form using dynamic page. The complexity changes drastically when I have to create a MD form. Has no body ever tried to create a MD form with dynamic page?
    I haven't heard from you anything either. I am stuck with this and I need help urgently. Would you kindly tell me if this is possible and how ? Otherwise, I will stop crying for help on this.
    Thanks for your kind attention.
    Mainak

    Hi,
    I have replied to this in the morning.
    Re: Oracle portal and JSR 168 compliance
    Hope it helps.
    Thanks,
    Sharmila

  • Multi Row Selector using Generic Column Names (parse query at runtime only)

    Hi,
    I created a tabular report which had a multi row select in it - got the deleting working fine.
    Am now creating a second tabular report, but because of the SQL:
    select
    "ID",
    "ID" ID_DISPLAY,
    "RESNUMBER",
    "RESDESCRIPTION",
    decode(RESTYPE,'R','Right Party','W','Wrong Party'),
    decode(DMCFLAG,'Y','Yes','N','No'),
    decode(SALEFLAG,'Y','Yes','N','No')
    from "CALL_RESULTS"
    I have to select the option Use Generic Column Names (parse query at runtime only) otherwise I cannot save the form.
    My problem is I am now unable to add a multi row selector to the tabular form. If I do and run the form I get the following error - failed to parse SQL query: ORA-00904: "COL11": invalid identifier. Also when I go back and edit the form the multi row selector has been removed.
    Can anyone tell me why I can't add a row selector like I previously could?
    Regards
    Simon

    Arie,
    I added aliases and to the decode columns, and I can now add a row selector to the form without any problems.
    Thank you very much for your help.
    Regards
    Simon

  • APEX 4.0 "Use Generic Column Names" not working

    Hi,
    I have a report which is a SQL query (PL/SQL function body returning SQL query) in APEX 4.0. For this region i have selected the option "Use Generic Column Names (parse query at run time only)".
    For some reason when I run the page the browser just shows the error "The requested URL /apex/f was not found on this server". This happens only for the region type "SQL query (PL/SQL function body returning SQL query)" . If I choose the report region as SQL query and select the option "Use Generic Column Names (parse query at run time only)" That works fine. This happens only in APEX 4. Is it an apex 4 bug or am I missing something?
    Thanks
    Sashika.

    Hi,
    Just managed to get it running. The Apex 4.0 SQL query (PL/SQL function returning SQL) works just fine. I had a small error in the query itself. In the PL/SQL function I had a referenced page item whose value in the initial run is set to null which is making the fuzz. Just adding an NVL resolved the problem.

  • Error in nested group function used with column name.

    Hi Team,
    If i used nested group function with column name its not working. Could you please any one suggest me.
    How to use it.
    Regards,
    Venkat.
    Please find Spool ........
    SQL> select user_name,max(max(CNT)) from (select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    2 group by user_name,CNT;
    select user_name,max(max(CNT)) from (select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    ERROR at line 1:
    ORA-00937: not a single-group group function
    SQL> select max(max(CNT)) from(select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    2 group by user_name;
    MAX(MAX(CNT))
    605

    Venkat wrote:
    Hi Sayan
    Its giving output like below, but not given maximum CNT.
    SQL> select user_name,max(CNT)from (select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    2 group by user_name;
    USER_NAME MAX(CNT)
    BANES_LERG 6
    VENE_USER 8
    USER3 339
    DBUS 106
    VEL_USER 37
    SYS 597
    6 rows selected.Check it - Re: Error in nested group function used with column name.
    and previous post

  • How to use the column names generated from Dynamic SQL

    Hi,
    I have a problem with Dynamic SQL.
    I have written an SQL which will dynamically generate the Select statement with from and where clause in it.
    But that select statement when executed will get me hundreds of rows and i want to insert each row separately into one more table.
    For that i have used a ref cursor to open and insert the table.
    In the select list the column names will also be as follows: COLUMN1, COLUMN2, COLUMN3,....COLUMNn
    Please find below the sample code:
    TYPE ref_csr IS REF CURSOR;
    insert_csr ref_csr;
    v_select VARCHAR2 (4000) := NULL;
    v_table VARCHAR2 (4000) := NULL;
    v_where VARCHAR2 (4000) := NULL;
    v_ins_tab VARCHAR2 (4000) := NULL;
    v_insert VARCHAR2 (4000) := NULL;
    v_ins_query VARCHAR2 (4000) := NULL;
    OPEN insert_csr FOR CASE
    WHEN v_where IS NOT NULL
    THEN 'SELECT '
    || v_select
    || ' FROM '
    || v_table
    || v_where
    || ';'
    ELSE 'SELECT ' || v_select || ' FROM ' || v_table || ';'
    END;
    LOOP
    v_ins_query :=
    'INSERT INTO '
    || v_ins_tab
    || '('
    || v_insert
    || ') VALUES ('
    || How to fetch the column names here
    || ');';
    EXECUTE IMMEDIATE v_ins_query;
    END LOOP;
    Please help me out with the above problem.
    Edited by: kumar0828 on Feb 7, 2013 10:40 PM
    Edited by: kumar0828 on Feb 7, 2013 10:42 PM

    >
    I Built the statement as required but i need the column list because the first column value of each row should be inserted into one more table.
    So i was asking how to fetch the column list in a ref cursor so that value can be inserted in one more table.
    >
    Then add a RETURNING INTO clause to the query to have Oracle return the first column values into a collection.
    See the PL/SQL Language doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/returninginto_clause.htm#sthref2307

  • How to Create Dynamic form using table data

    Dear All,
    I have one Table called PRODUCT_MASTER where product details are stored. Say product A,B,C,D are stored in the table. Another table called SUB_PRODUCT_MASTER, which contains sub product details.Say A1,A1,B1,B2, B3,C1, C2, C3, D1,D2,D3.
    Now, I want to create a dynamic form based on product,sub product. for a whole month. For better under standing here is the format.
    PRODUCT A B C D
    SUB_PROD A1 A2 B1 B2 B3 C1 C2 C3 D1 D2 D3
    Days
    1 x x x x x x x x
    2
    3
    4
    5
    6
    7
    Now whenever I add one row in the PRODUCT)MASTER table and SUB_PRODUCT_MASTER table, Form should add one column in the form automatically. e.g. If I add Product E with two Sub product E1 and E2 then form should add ptoduct E column in the form with sub products E1 and E2 as per above format. Here days are fixed to 31. This forms should accept product wise daily despatch entry. For
    storing despatch entry another table is created.
    Please help to create this type od forms.

    You want I believe to create Croos-Table(Matrix) form. Visit Cross-table (matrix) forms layout and add "Please Send me too".

  • Transpose Distinct Date and Use as Column name

    All,
    I am trying to transpose a distinct date and use it as a column name and list the data below it. My version of Oracle does not have the pivot function. Plus I am having trouble with figuring out how to alter the table name to the distinct date. Can someone provide me with logic that will dynamically take the current format (see below) and transpose it to the needed format (see below)?
    Current format:
    WEEK_END_DATE     RD     STORE_NUMBER     RANK
    09-19-2009     R0011     00505     6
    09-19-2009     R0028     00097     97
    09-19-2009     R0057     01801     72
    09-19-2009     R0061     04775     72
    09-19-2009     R0068     03920     66
    09-26-2009     R0011     00505     8
    09-26-2009     R0028     00097     50
    09-26-2009     R0057     01801     120
    09-26-2009     R0061     04775     30
    09-26-2009     R0068     03920     1
    nth date
    The format I need:
    RD     STORE_NUMBER     09-19-2009 09-26-2009 nth date....
    R0011     00505     6 8
    R0028     00097     97 50
    R0057     01801     72 120
    R0061     04775     72 30
    R0068     03920     66 1

    I apprreciate your help. I have tried to implement the dynamic pivot logic. I can create the correct case statement and change the column name to the name I need.
    However, when I try to use @@dynamic_pivot.sql I get the following error:
    ORA-04054: database link ORAEDW@DYNAMIC_PIVOT_SUBSCRIPT does not exist
    I have tried it three ways...
    @@dynamic_pivot
    and @@dynamic_pivot.sql
    and @@c:\dynamic_pivot_subscript.sql
    I don't have direct access to the database. I have to run my queries from toad. When I cut and paste the generated case statements, It works. I am just not able to dynamiclly insert those case statements into a select. Do you have any suggestion?
    -- ***** Start of dynamic_pivot.sql *****
    -- Suppress SQL*Plus features that interfere with raw output
    set feedback off;
    set heading off;
    SPOOL     c:\dynamic_pivot_subscript.sql
    SELECT
    DISTINCT',max(CASE WHEN week_end_date = '''|| week_end_date || ''' THEN rank END) AS '|| 'DATE_AS_OF_' ||
    to_char(week_end_date,'MM_DD_YYYY') AS case
    FROM
    test_ptw_bottom_10;
    SPOOL OFF
    -- Restore SQL*Plus features suppressed earlier
    What I need:
    SELECT     
    rd,
    store_number
    @@c:\dynamic_pivot_subscript.sql
    FROM     
    test_ptw_bottom_10
    where
    week_end_date in ('19-SEP-09','26-sep09')
    group by
    rd,store_number
    ORDER BY     
    rd;
    What works:
    SELECT     
    rd,
    store_number
    ,max(CASE WHEN week_end_date = '26-SEP-09' THEN rank END) AS DATE_AS_OF_09_26_2009
    ,max(CASE WHEN week_end_date = '19-SEP-09' THEN rank END) AS DATE_AS_OF_09_19_2009
    FROM     
    test_ptw_bottom_10
    where
    week_end_date in ('19-SEP-09','26-sep09')
    group by
    rd,store_number
    ORDER BY     
    rd;
    Edited by: user10609947 on Oct 5, 2009 2:36 PM
    Edited by: user10609947 on Oct 5, 2009 2:38 PM

  • Convert dynamic form to dynamic input form

    Hi All,
    I am using Jdeveloper 11.1.2.4.
    As a part of a requirement, I have created a dynamic form built out of a read only view object.
    On a user event (button press), I want to convert the form into an input form to allow the user to make suitable change to data and save to the database.
    At this stage I have programmatic access to the table name which is being used to create the dynamic form.
    Please suggest on how to convert the dynamic form into input form.
    Best Regards,
    Ankit Gupta

    <cfupdate> process data from the form scope. You are
    not putting your
    role datum into the form scope. You need to scope the
    variable in your
    cfset(s).
    <cfset form.roleColumn = form.role=>
    But I am not sure this would work well. It is probably better
    if you
    write your own SQL. <cfinsert> and <cfupdate> are
    for very basic
    database operations. Once you start putting other processing
    requirements in, such as this, they quickly become
    inadequate.
    Try replacing your <cfupdate> with a <cfquery>
    tag something like this.
    <cfquery datasource="my_DSN">
    UPDATE my_table
    SET lastName = '#form.lastName#',
    firstName = '#form.firstName#',
    #form.role# = true
    WHERE key = value
    </cfquery>
    I made my best guesses at how this SQL would look based on
    the examples
    you have provided. You'll have to finish it off based on your
    actual
    requirements.
    Mikelaskowski wrote:
    > Thanks,
    > I really like your solution. It definatly sounds a lot
    easier.
    > I am still having a little trouble though. I am probably
    missing something
    > silly (especially in my cfupdate tag) as I am a little
    new at this stil.
    >
    > When I used your code in my action page I get the
    following error:
    > Error Occurred While Processing Request
    > Variable PRESIDENT is undefined. <--when president is
    selected in the role
    > field. It changes nicely when another is selected.
    >
    > Here is my current code on my action page:
    >
    >
    > Thanks Again!!!
    >
    > <CFSET lastFirst = lastName & ", " &
    firstName>
    > <CFSET roleColumn = Evaluate(role)>
    > <cfupdate datasource="my_DSN"
    tablename="my_table">
    > <html>
    > <head>
    > <title>Title</title>
    > </head>
    > <body>
    > <cfoutput>The role is #roleColumn#<br>
    > The value is #lastFirst#</cfoutput>
    > </body>
    > </html>
    >

  • How to Select data using same column name from 3 remote database

    Hi,
    Can anyone help me on how to get data with same column names from 3 remote database and a single alias.
    Ex.
    SELECT *
    a.name, b.status, SUM(b.qty) qantity, MAX(b.date) date_as_of
    FROM
    *((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)a,*
    *(table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)b)*
    WHERE b.dept = 'finance'
    AND a.position = 'admin'
    AND a.latest = 'Y' AND (b.status <> 'TRM') AND b.qty > 0;
    GROUP BY a.name, b.status ;
    NOTE: the bold statements is just an example of what I want to do but I always gets an error beacause of ambiguous columns.
    Thanks in advnce. :)
    Edited by: user12994685 on Jan 4, 2011 9:42 PM

    user12994685 wrote:
    Can anyone help me on how to get data with same column names from 3 remote database and a single alias.Invalid. This does not make sense and breaks all scope resolution rules. And whether this is in a single database, or uses tables across databases, is irrelevant.
    Each object must be uniquely identified. So you cannot do this:
    select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a3 objects cannot share the same alias. Example:
    SQL> select * from (dual, dual) d;
    select * from (dual, dual) d
    ERROR at line 1:
    ORA-00907: missing right parenthesisYou need to combine the objects - using a join or union or similar. So it will need to be done as follows:
    SQL> select * from (select * from dual d1, dual d2) d;
    select * from (select * from dual d1, dual d2) d
    ERROR at line 1:
    ORA-00918: column ambiguously definedHowever, we need to have unique column names in a SQL projection - so the join of the tables need to project a unique set of columns. Thus:
    SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d;
    DUM DUM
    X   X
    SQL> I suggest that you look closely at what scope is and how it applies in the SQL language - and ignore whether the objects referenced are local or remote as it has no impact to fundamentals of scope resolution.

  • Database Querry error when using # in column name

    I am using the Database toolkit to work with a MySQL database. 
    Some of the columns in the database have names with special characters:
    Batch# and Employee#.  The database tools give me an error when I
    try to write data to those fields.  I have tried square brackets
    around the column name [Batch#] but that doesn't seem to help.  Is
    there a way to update these fields with the Database tools?
    Here is the errror:
    Error -2147217900 occurred at Cmd Execute.vi->DB Tools Insert Data.vi->Move to NCP.vi
    Possible reason(s):
    Exception occured in Microsoft OLE DB Provider for ODBC Drivers,
    [MySQL][ODBC 3.51 Driver][mysqld-3.23.49-log]You have an error in your
    SQL syntax near '' at line 1.  in Rec Create - Command.vi->Cmd
    Execute.vi->DB Tools Insert Data.vi->Move to NCP.vi
    Attachments:
    Move to NCP.vi ‏60 KB

    Hi Anuj,
    Yes i am using SOA Suite 11g and i have chosen the right platform class as i am able to insert into other tables in DB2.The problem is in one table which has # appended in the column name.e.g.
    'abc#'.# charater is not supported in the wizard as the column name and that is why this error.I changed from backend and than tested i got the same error in the em.I need way to handle the columns have names like 'abc#'.
    Thanks

  • Delete command in SQLPLUS by use wrong column name command

    Assume I have three table T1,T2 and T3 shown as follow...
    sql> desc T1 ;
    cusid number
    name varchar2(50)
    sql> select * from T1;
    cusid name
    1) 101 TEST1
    2) 102 TEST2
    3) 103 TEST3
    4) 104 TEST4
    sql>desc T2;
    ref_cusid number
    sql>select * from T2
    cusid
    1) 103
    if I want to delete account in T1 that deleted account is in T2.
    I must use query1 , it will work
    query1::>
    delete from T1 where cusid in (select ref_cusid from T2);
    but if i type wrong by this command
    query2::>
    delete from T1 where cusid in (select cusid from T2);
    in query 2,it should be have warning message because field cusid is not in T2.Right ? But it will delete all account in table T1.
    compare query2 with query 3,
    query3::>
    delete from T1 where cusid in (select field_test from T2);
    it will show warning message like 'ORA-00904: "FIELD_TEST": invalid identifier'
    I noticed that in query2 and query3 , Different Thing is query 2 wrong column name in T2 has same name as column in T1. I wonder why it is.

    I doubt very much if this is really what you did:
    sql>desc T2;
    ref_cusid number
    sql>select * from T2
    cusid
    1) 103The desc command shows a column name ref_cusid. The select command shows a column title cusid, not ref_cusid.
    You start by saying that you have 3 tables, without doing anything with T3. Are you sure you you haven't mixed up a copy and paste somewhere?

  • How to use get column name.vi in SQL toolkit 2.0?

    Due to the vi "get column name.vi" paremeters,no table name has connected to the vi. So, I want to ask how to use this vi for gain one column name of a table. Maybe there are some other ways to solve column name getting.
    Thanks.

    Thanks!
    Error 4101 Description:
    Execute SQL - The connection, statement, or query handle you provided is not valid.
    I don't just used the toolkit in a while,now, I am developing a irrigation system. For the table field names defined by users,column names must be known before any select operations. Do you have any other good idea about drawing out the columnname parameters?
    As you know, a valid DSN and table have been also available. The database I used is Access. The bad thing to me is that there is no any text information gotten. And I think, it may be some problems in connection way which I don't find out.
    Really appreciated by your reply.
    Could you give me some example in the aspect?
    Thank you again.

  • How to get Tablename by using only Column Name in Schema?

    Hi,
    Here I need a small information. I am looking for the TableName based on Column Name.
    I know the Column name but not in which Table that Column belongs? So is there any way to look the Table Name by giving Column Name as an Input parameter in Oracle Schema.
    If anybody have the answer please help me out.I appriciate your help.
    Thanks,
    Srikanth Kondeti

    Srikanth,
    The three data dictionary views:
    <ol>
    <li>USER_TAB_COLUMNS</li>
    <li>ALL_TAB_COLUMNS</li>
    <li>DBA_TAB_COLUMNS</li>
    </ol>
    Contain both the column name and the table name (among other things).
    More information can be found in the Oracle documentation, in particular the Oracle Database Reference.
    All Oracle documentation can be accessed from here:
    http://www.oracle.com/technology/documentation/index.html
    Good Luck,
    Avi.

Maybe you are looking for

  • Upgrade firmware of n73.

    How can i create playlist of video song for real player of n73. No option to create playlist or tracklis in real player n73 (like n80 real player). If the problem solve with firmware upgrade then please help me, How can i upgrade firmware of n73.

  • Multicamera angle's view out to external monitor?

    Hello Forum, Is it possible to have the angle view of multicamera viewable via transmit to my external monitor?  (via Blackmagic Intensity Pro) Currently, it only displays the active angle. Thanks all! - Ryan

  • Blocking user against deleting the payment proposal.

    Hi All, Is there any possible way,where  we can block specific user id for  deleting the payment proposal created. we have tried using authorization but it not working, when we give authorization to edit it is defaulting to delete the proposal. Pleas

  • Xml source

    Hi All I am importing multiple xml files via ftp task in control flow and in the data flow section I am placing xml source. I am using variable as xml source. The source file in variable is *.XML What need some help in completing this package. 1. Get

  • BOXIR3.1- Users, Auditing DB statistics of Report Refresh,users login info

    Hi All, I need to create BOXI R 3.1 DeskI reports for the statistics related to the user login information,Scheduling Reports info,user properties and other statistics . Any suggestion to resolve this issue , It helps me greatly. Thanks in advance..