Lookup table with a block based on a view

Hi!
My form contain one module component based on a view, one of the items of my block is a libelle that exist in one
of the tables queried by the view.
my question is :
how can I have a LOV on this item in order that the user select a value for a query???
or, can I make a lookup table with a view ????
Thanks!

You said you copied an existing item in the block, and then copied an existing item in the layout editor - is it possible you actually created 2 separate items? Remove the one in the layout editor, and set the canvas of the one in the block so it is displayed in the layout editor. That could be the problem.

Similar Messages

  • Is it possible to delete data from a block based on a view?

    I have a data block based on a view. I have set the delete allowed property to 'yes' using the object navigator, have set the database permission to allow delete, done a search through all the code to see where the delete_allowed property on the block may be reset in some trigger yet cannot delete records from the block.
    Any ideas?

    There are at least two/three ways to do this...
    Put an on-delete trigger on the block of the view with code something like this...
    delete from mytable where mytable_id = :myblock.mytable_id;
    ...or...
    dont do the above and add an instead of trigger to the view in the database. The instead of trigger intercepts the delete statement that would fail and executes code that you write in the trigger to go delete in mytable "instead of" the view.
    ... or...
    if you want to base a block on a procedure.. See this thread... Notice the metalink id in the thread..
    Re: Data block based on a procedure..
    Message was edited by:
    Mark Reichman

  • Sort a table with two columns based on the first

    I have a powershell table with the columns 'Used Perc' and 'ID'.
    This was formed from the following 
    $a = @{Expression={[System.Math]::Round(($_.nUsed_Avg/$_.nSize)*100,1)};Label="Used Perc";width=25}, @{Expression={$_.nStatisticalDiskIdentificationID};Label="ID";width=15}
    $GLOBAL:CSV2 = Import-CSV $STATDISKOUT | Format-Table $a
    Before this, the file $STATDISKOUT had the columns 'nUsed_Avg', 'nSize', and 'nStatisticalIdentificationID'.
    My question is, how would I sort the new table based on 'Used Perc' but keeping the corresponding 'ID' column lined up to the right value?

    We use a select statement to reorder columns and recalculate,  The formatters just go at the end to adjust the display.
    Import-Csv <file> | select <column order format> | Format-Table
    or you can do it in the table:
    Import-Csv <file | Format-Table -Properties ,f1.,f2.,,f3....Here is how to inset a sort inline:
    $a=@{
    L='ID';
    E={$_.nStatisticalDiskIdentificationID};
    L='Used Perc';
    E={[System.Math]::Round(($_.nUsed_Avg/$_.nSize)*100,1)}
    Import-CSV $STATDISKOUT | Select $a | Sort 'Used Perc' | Format-Table -Auto
    ¯\_(ツ)_/¯

  • Using Color Lookup Tables with cwgraph3d

    Hi,
    When searching old forums and other references, I can only find information regarding using color lookup tables in labview and I am using VB6.
    I want to let the user to pick a given amount of colors, have this turned into a gradiant over a table of size 256, and then using the custom colormaptstyle in my 3d graph. I want to be able to change the palette in real time to change my image. Basically I want to have the color palette screen to show up all the time and that gradiant that appears on the right side(vertically) to be my new color lookup table for the image(if that makes any sense).
    Thanks. Any help would be greatly appreciated.
    Kevin
    [email protected]

    Hello Kevin,
    Attached is a small VB6 example that uses the CWGraph3D's ColorMap properties. I think this will demonstrate the color lookup table capability that you're asking about, and you'll be able to use this as a building block for your own application.
    David Mc.
    NI Applications Engineer
    Attachments:
    colormap.zip ‏5 KB

  • Master-Detail with 2 blocks based in stored procedure doesn't work.

    Hi. I'm Oscar and I'm new for here.
    I have a problem that i can't find the correct answer to solve it.
    Well. I've created a form with 2 blocks. Both of them have the Query Data Source Type Property to "Procedure", and both procedures on database returns one ref cursor of a record type each one.
    BLOCK BL_COMPETICIONES --> query data source: p_get_competiciones (p_Cursor is cursor of record (CODIGO NUMBER,
    NOMBRE VARCHAR2(50),
    SETCRICKETSN VARCHAR2(1),
    SET01SN VARCHAR2(1),
    FECHAINICIO DATE,
    FECHAFIN DATE).
    On triggers (on-lock, on-insert, on-delete and on-update) I have the call to the corresponding stored procedure to lock, insert, delete or update.
    Well, when i've only this block in form, the form works correctly.
    But when I added a second block (which is suppossed to be a detailed data from the first one), and after I've assigned the query procedure and created the relation between both blocks, then run the form and try to execute query on first block, returning records correctly, but then, when execution goes to the program unit "query_master_details", the sentence "execute query" doesn't do anything (and the cursor is in the detailed block), so detailed block continues to be without records.
    I don't know how to solve this. Someone can help me, please?. Thanks.
    Edited by: user5067020 on 09-abr-2009 16:38

    It could be that there is something screwy with LV, but given that it uses standard interfaces for comm with the DBMS, I would not expect that. A much more realistic possibility is that the toolkit is mucking things up. (A fairly common occurrence.)
    Try bypassing the toolbox -- which you don't really need anyway -- an talk directly to the ActiveX or .net interface.
    Also, what DBMS? What drivers are you using?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Block based on a view

    We have a block which is based on a view. When using Forms 6i 6.0.8.8.0 (no patch), querying from this block cause no problem. However, after applying patch 1 (6.0.8.10.3), the form crashes or take forever to retrieve the data.
    Anyone has run into this problem ?
    Is there a work-around other than installing a full patch ?
    Is this a known bug ?
    Thank you.

    you create the view based on the tables first, then you use form design wizrad to create the form based on the view like a table.
    If you want to allow user to edit the fields, then you may either to create a INSTEAD OF trigger on that view in database, or in form block, using ON-LOCK, ON-UPDATE/INSERT/DELETE triggers to do it.

  • Opening of tables with non english names in Smart View

    Hi All,
    I can't open tables with russian names with Smart View. English named tables works fine, and Russian names opens in wrong encoding as a name of Excel worksheets like this - #1087;&#1086;&#1080;&#1089;. So no table opens. What's wrong and how to fix it?
    Thanks in advance,
    Mary

    Smart View Version is 11.1.2.5.000 (Build 111)
    Enterprise Performance Management Architect - 11.1.2.3.000.1954
    Financial Management - 11.1.2.3.100.4261

  • Help with Data Block Based on Procedure--getting compilation error

    I am trying to create a datablock based on a procedure , but im getting errors in compilation:
    Errors are :
    1) identifier 'HSM_WSH_DEL_UTIL.DEL_TBL' must be declared
    2)PL/SQL ERROR 320 at line 7, column 27
    the declaration of the type of this expression is incomplete or malformed
    ANy Help would be appreciated !
    Heres my pkg spec and body for the data block:
    CREATE OR REPLACE PACKAGE hsm_wsh_del_util IS
    TYPE del_record is record
    (delivery_id number);
    TYPE del_tbl is table of del_record INDEX BY BINARY_INTEGER;
    procedure do_query(p_del IN OUT del_tbl);
    END hsm_wsh_del_util ;
    CREATE OR REPLACE PACKAGE BODY hsm_wsh_del_util IS
    procedure do_query(p_del IN OUT del_tbl)
    IS
    idx number :=1;
    CURSOR DELIVERY IS
    SELECT DELIVERY_ID
    FROM abc_deliveries;
    begin
    FOR CUR IN DELIVERY LOOP
    p_del(idx).delivery_id :=cur.delivery_id;
    idx:= idx+1;
    END LOOP;
    end do_query;
    END hsm_wsh_del_util;
    Edited by: 981170 on Mar 13, 2013 1:08 PM

    Hi,
    Yes I did use the wizard,
    I agve it the package.proc name for query.
    it pulled up the field delivery ID,
    Hit finish, because I do not need update/delete/inserts.
    the query data source columns and arguments was defaulted correctly.
    THe QUERY-PROCEDURE was built by default.
    It is giving me an error though: wrong number or types of arguments in call to POPULATE_BLOCK..
    DECLARE
    bk_data HSM_WSH_DEL_UTIL.DEL_TBL;
    BEGIN
    hsm_wsh_del_util.do_query(bk_data);
    PLSQL_TABLE.POPULATE_BLOCK(bk_data, 'NEW_DELIVERIES');
    END;

  • ORA-00904 on CREATE TABLE with virtual column based on XMLTYPE content

    Hello,
    this is another one for the syntax gurus...
    Trying the following, fails with ORA-00904: "MESSAGE"."GETROOTELEMENT": invalid identifier
    CREATE TABLE XML_TEST_VIRT
       MSG_TYPE         GENERATED ALWAYS AS (MESSAGE.GETROOTELEMENT()) VIRTUAL,
       MESSAGE  XMLTYPE             NOT     NULL,
       IE906    XMLTYPE             DEFAULT NULL
       XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML
       XMLTYPE COLUMN IE906   STORE AS SECUREFILE BINARY XML
    /while this one succeeds
    CREATE TABLE XML_TEST_VIRT
       MSG_TYPE         GENERATED ALWAYS AS (EXTRACT(MESSAGE, '/*').GETROOTELEMENT()) VIRTUAL,
       MESSAGE  XMLTYPE             NOT     NULL,
       IE906    XMLTYPE             DEFAULT NULL
       XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML
       XMLTYPE COLUMN IE906   STORE AS SECUREFILE BINARY XML
    /The GETROOTELEMENT member function of SYS.XMLTYPE is declared as "DETERMINISTIC PARALLEL_ENABLE" so the method getting called is not the problem as the 2nd case proves.
    Using the column MESSAGE which is of type XMLTYPE directly seems to be the problem. But the question is "why". The EXTRACT function result is of type XMLTYPE and calling its member works, the column is also of type XMLTYPE yet calling its member fails...
    Thanks in advance for any insights on this.
    Best Regards
    Philip

    Hmmmm ... I don't know if I should smile or frown with the implication that I am an OO guy :D :D
    Most of my colleagues when I started working as a software engineer, treated me as too low-level because of my C background (started doing C in 1985).
    In my last job, my colleagues hated my guts because I was asking them to squeeze every bit of performance out of C++ by using STL which is definitely not OO (although C++ is).
    My current colleagues treat me as a DB guru (which I most definitely am not) and they overlook/forget the fact that most of them use Java libraries in their projects, that I wrote for them !
    I am inclined to believe that I do not fall into any category in the end...
    The only thing I am for sure - and I am proud of it - is inquisitive. I want to know everything there is about the tools I use, and so I end up spending hours and hours investigating... (Microsoft found that out the hard way when I filed 16 bug reports in 8 days when Visual C++ 6 came out ! Not that it hurt them though...)
    This is where my confession ends (and my working on the XML validator starts...)
    Καληνύχτα Marco
    Philip (Φίλιππος in Greek)
    PS: I did not follow the last solution anyway. I just wanted to verify its operability ;)

  • Dynamic read from table  with DBMS_SQL Block

    Hi,
    In the orcale8 Application developer's Guide is this example:
    -- To select everything from this table and move it into four PL/SQL tables, you could use the following simple program:
    c number;
    d number;
    n_tab dbms_sql.Number_Table;
    d_tab1 dbms_sql.Date_Table;
    v_tab dbms_sql.Varchar2_Table;
    d_tab2 dbms_sql.Date_Table;
    indx number := 10;
    begin
    c := dbms_sql.open_cursor;
    dbms_sql.parse(c, 'select * from multi_tab order by 1', EXEC_sql.V7);
    dbms_sql.define_array(c, 1, n_tab, 5, indx);
    dbms_sql.define_array(c, 2, d_tab1, 5, indx);
    dbms_sql.define_array(c, 3, v_tab, 5, indx);
    dbms_sql.define_array(c, 4, d_tab2, 5, indx);
    d := dbms_sql.execute(c);
    loop
    d := dbms_sql.fetch_rows(c);
    dbms_sql.column_value(c, 1, n_tab);
    dbms_sql.column_value(c, 2, d_tab1);
    dbms_sql.column_value(c, 3, v_tab);
    dbms_sql.column_value(c, 4, d_tab2);
    exit when d != 5;
    end loop;
    dbms_sql.close_cursor(c);
    Here the four tables can be used for anything at all. One usage might be to use BIND_ARRAY to move the rows to another table by using a query such as 'INSERT into SOME_T values(:a, :b, :c, :d);
    exception when others then
    if dbms_sql.is_open(c) then
    dbms_sql.close_cursor(c);
    end if;
    raise;
    at the second 'dbms_sql.define_array' comes an ORA-0600 error.
    What's wrong ?

    Some solutions posted here : {message:id=9689485}

  • Problem updating data block based on a view

    Hi,
    I have a data block that is based on a fairly complex view, which I want to make update-able. The default Forms behavior, of course, is to not allow this.
    In an attempt to get around this, I defined an 'ON-LOCK' trigger, where I specified a single statement 'LOCK_RECORD;'. I also defined an ON-UPDATE trigger that will later call some stored PL/SQL procedures to effect the actual update (using INSTEAD-OF triggers and such). For now, I just display a message saying 'updation not currently supported'.
    However, a problem occurs when I make a change to an item in the data block, don't attempt to save it, yet try to navigate to the next record. The form simply hangs and the only thing I can do is kill the process.
    I'm deploying this form as within Oracle Apps 11i. I suspect this has something to do with the lock record but don't know how to get around this.
    Does any one have any suggestions?
    Thanks,
    Niranjan Ramakrishnan

    Your lock will be removed whenever the forms does a commit or rollback. In 'normal' forms processing the on-update trigger will fire as part of the commit form processing, which also includes a database commit which will remove any locks that have been taken out. Should the user clear the form a database rollback will be performed which will also remove any locks. You should not need to do any explicit removal of locks yourself.
    I would not recommend not having any kind of lock processing, as Sudha says, as this could easily lead to changes to record's being lost. As long as the locking of table(s) is always done in the same order deadlocking should not occur.
    You may make want to make the locking process a SELECT ... FOR UPDATE NOWAIT so if the record is already locked the user is informed and can try again later, rather than an unknown wait until the record becomes available.

  • 9i Forms Challenge! Query records from a data block based on this view

    According to Oracle Support, it is not unusual that complicated views like the one shown below fail to work in Forms. They recommend that I "try using a When-validate trigger" to solve the problem. I would be grateful if someone could show me how. It would also be helpful if someone could explain why Forms would have a problem querying such a view in the first place.
    Thanks very much!
    CREATE TABLE t (
    id NUMBER,
    property VARCHAR2(2),
    val NUMBER
    INSERT INTO t VALUES ( 1, 'A', 10 );
    INSERT INTO t VALUES ( 1, 'B', 11 );
    INSERT INTO t VALUES ( 2, 'A', 12 );
    INSERT INTO t VALUES ( 2, 'B', 13 );
    INSERT INTO t VALUES ( 3, 'A', 14 );
    || This view produces an ORA-01403 no data found error
    || in Oracle Forms 9i.
    CREATE OR REPLACE VIEW t_v
    AS
    SELECT id,
    MAX( DECODE( property, 'A', val, NULL ) ) AS a_val,
    MAX( DECODE( property, 'B', val, NULL ) ) AS b_val
    FROM t
    GROUP BY id;

    Steve,
    Your suggestion to put the view definition into the tablename field of the forms properties sheet was fruitful.
    Instead of the ORA-01403 error (No data found), I get ORA-24347 (Warning of a NULL column in an aggregate function). This error led me to discover bug 2457121, filed 11-Jul-2002, through Metalink. This bug is reported to only be a problem in Forms 9.0.2.7. It is reported to be fixed in Forms version 9.0.2.12.
    Thanks for your interest and help.
    - Doug

  • One block based on two table when update/insert result in FRM-40654

    Hi,
    I ahve a multi line block based on two tables.
    Customers - AFCUSTOMER
    Maintenance - AFMAINT
    Some customers exist when maintenance doesnt so in my where clause i have
    AFCUSTOMER.CUSTID=AFMAINT.MAINT_CUSTID(+) AND AFCUSTOMER.CUSTBRANCHID=1 AND AFCUSTOMER.CUSTSTATUSID=2
    I have primary key set as the AFMAINT table primary key and have set DML data targetr name as AFMAINT.
    I am displaying customer name (from AFCUSTOMER) and type of payment (from AFMAINT) on screen and i want to change the type of payment which then uses pre update trigger to fil in the primary key of AFMAINT.
    Querying works fine and displays all records. But when i try to insert a record into the AFMAINT table by changing the type of payment list item i get FRM-40654 Record updated by another user. I have checked and block status is QUERY right before the list item is changed.
    Any ideas on where i am going wrong.

    But when i try to insert a record into the AFMAINT table by changing the type of payment list item i get FRM-40654 Record updated by another userWhen you start editing a record which is already stores in the database forms "rereads" the record from the database and check id all values in the database are the same as in the form. If there is some difference, forms assumes that someone else changed the record after you did the query.
    The main causes for that are:
    -Some database-trigger which changes the value of a column which is included in the form
    -numeric column with a higher precision in forms, than in the database
    -a block based on a view or "select from clause" which does not return the same values as inserted/updated through forms.
    I guess you run into the third issue. Check all the values in the forms-items after your dml and compare them to the values saved to the database, there will be some difference. If you find it, correct the error, if one, or re-read the data in the POST-UPDATE-trigger.

  • How to fill Lookup table run time with desired values in project server 2010.

    HI,
    is this possible to fill LookUp Table with some Desired Values at Runtime ??
    Or How to bind a LookUp table with DataBase  Table??

    Dear Rohan,
    You need to do this via PSI script for lookup table.
    Follow this blog Chris Boyd:
    http://blogs.msdn.com/b/project_programmability/archive/2006/11/08/adding-a-project-to-a-category.aspx
    Regards,
    Avinash kumar | Blog:http://avigr8.wordpress.com | If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.

  • Inserting/updating data in control block based on view

    Hi!
    I`ve created a block based on a view to display data.
    I want this block to be insertable and updateable, that is I will use a on-insert/update trigger to call an insert/update procedure located in the database.
    When trying to change/insert a value in the block, the error message "Error: Can not insert into or update data in a view" pops up. I`ve tried to get rid of this error, without success.
    How can I make a data block based on a view insertable and updateable?
    My guess is that this have something to do with locking the records(there is no rowid in the view)... but I'm not sure.
    Pls advise!!

    Morten
    As well as on-update, on-insert, on-delete triggers you also need an on-lock,
    (even though it might just contain null;) otherwise the form will try to lock the view and fail.
    Actually your terminology is wrong, the block being based on a table or view is not a control block. A control block is not based on anything and has no default functionality for communicating with the database. If it was a control block, the on- triggers would not fire.

Maybe you are looking for

  • How to use an UNIX shell variable in sql where clause

    Hi , In my shell script first I get the Date and time from the system into the shell variable.At the end of the shell script I need to run a sql script in which I want to use the variable value in the where clause . Is there any way we can use a shel

  • SAP template authorization

    Hi,   Does anybody know where I can go to check what all the auth objects exists in SAP delivered templates like S_RS_RREPU BW role: Reporting user S_RS_RREDE BW role: Reporting developer S_RS_ROPAD BW role: BW Administrator etc..... I want to base m

  • Importing outline using the load utility

    Hi all, I have extracted my outline using the EPMA file generator and the file is a csv file. I'm trying to load it using the load utility and I'm getting this error "Unable to obtain dimension information and or perform a data load: Unrecognized col

  • About burying a superior software ...

    We are designers, producers, nerds, geeks. We aren’t interested in share holder value. We always just wanted to work with the VERY BEST software for vector drawing. We had it for many years. It was called Freehand. We need not understand why ADOBE bu

  • RAW support for Olympus OMD EM5

    Outfitting for a year long back pack trip. My MacBook Pro is going. Am in processof purchasing an Olympus OMD EM5 micro 4/3 camera for the trip. I use Aperture for photo processing. Any idea when or if  Aperture will add support for developing the RA