Query_data_source_name block property

Hi all.
I want to create a block non-base table in which I want to change dynamically the source of the block. I have thougth to set at runtime the block property query_data_source_name and to pass it a different select at a different value of a parameter.
My questions are:
1) How is the use of this property??? I have seen it on the on line help but it's not clear.
2) Is there another way to obtain the same result??
I'm on devsuite10g.
Thanks in advance for the collaboration.
Fabrizio

I have tried to clear the block; but the result is the same.
Here is my code:
DECLARE
condizione varchar2(5000) := null;     
BEGIN
     condizione := '(select '||:parameter.campo1||', count('||:parameter.campo1||') from '||:parameter.imposta_ricerca||' group by '||:parameter.campo1||')';
     go_block('sag_cong_congiunturali');
     clear_block;
     set_block_property('sag_cong_congiunturali_raggr',query_data_source_name,condizione);
     go_block('sag_cong_congiunturali_raggr');
     execute_query;
END;
When I'm in runtime the select is this:
(select CODICE, count(CODICE) from SAG_CONG_CONGIUNTURALI group by CODICE)
I don't understand where is the error...
Fabrizio

Similar Messages

  • Item property does not overrides block property ?

    I have CURRENT RECORD VISUAL ATTRIBUTE set to SOMETHING for block A. i also have CURRENT RECORD VISUAL ATTRIBUTE for item AA in block A ( A.AA) . but when i run form, it looks like item AA's CURRENT RECORD VISUAL ATTRIBUTE is not in effect ?
    usually item's property should override block property. but it'snot happening here.. can anyone figure out??

    Set_Item_Instance_Property is a more specific control, so Set_Item_Property logically should not change it.
    Create two package variables defined in a package specification in the form, trig_item and trig_record.
    Change your WBP trigger:
    Set_Item_Instance_Property(Pkg1.trig_item,Pkg1.trig_record, VISUAL_ATTRIBUTE,'');
    Pkg1.trig_item := :System.trigger_item;
    Pkg1.trig_record := :system.trigger_record;
    Set_Item_Instance_Property(Pkg1.trig_item,Pkg1.trig_record, VISUAL_ATTRIBUTE,'SET');
    Actually, a When-New-Item-Instance trigger might be better than the WBP trigger, so the same action would occur no matter how the cursor is moved around your form (Using Enter or Tab, or shift-Tab, or scrolling).

  • Block Property (Query Data Source Type)

    Hello Friends
    I am using Forms 6i.oracle 9i.
    in the Block Property Pallete under Query Data Source Type there
    are 4 Type is mentioned.i have used Table,From Clause Query but yet to use Transactional Trigger and Procedure.How to use this two and it will be very kind enough if u give any example about these twos.
    Regards

    There's a whole bunch of explanation about this subject in the online help of Forms. Just select the Query Data Source Type property and press F1. The initial explanation is very limited but there are a number of useful links under "Related topics"

  • Block Property - Update

    Hi,
    I have a problem with forms dev. 6.0 block property. I have only one master block and no details blocks. And I set want user can update the block but not insert. So i set the properties update and insert, true-false properly. But when i want to update a column in the block it wont let me to update. I check the status of the both properties and there was no change. but still cant solve it. Can u help me please. Thanks.

    i've done it already. I've checked the insert and update properties and theres no change of any property but it still dont let me to update. I looked up to the block triggers and item triggers that any changing procedure but i found nothing.

  • What property/preference sets block property "Update changed columns only"

    Hi, we are wondering how Designer (latest version 10.1.2.4) desides when it generates a form with block property "Update changed columns only" set to Yes.
    Under some cricumstances this property is No in the generated .fmb
    We checked the object library, but the .olb has this property set to No, so Designer overrules it.
    Our goal is to generate all blocks with the "Update changed columsn only" set to No, because we ran in a forms bug that it can't handle Insert statements on blocks with this property set to Yes (ORA-01036). This bug only occurs in the latest forms version 10.1.2.3
    Hope anyone can help to force this property to be No when we want to achieve 100% generation from Designer.
    Kind Regards
    Auke Quist
    Edited by: aukequist on Oct 13, 2008 8:49 PM

    I think that's not possible in designer. You could define a block with this property set in the template form or in the object library. The use this block use the template/library object property in designer.
    Regards Erik

  • Change block property to insert mode

    Can i change the status of block property to insert mode while run time.
    Please help me.
    Vikas

    Yes, see the Set_Block_Property() built-in in the online help.
    Francois

  • Problem in block property (delete allowed)

    hi friends,
    i have created a form having two blocks with non-isolated relation in them. i have set the delete allowed property to true for child block and false for master block. But when i run the form it will not allow me to delet the record from the child block as the delete allowed button appears in disabled form in the toolbar...
    please help in enabling the button so that i can delete the record at runtime for the child block

    which kind of toolbar did you use. selfwritten or oracle-standard ?

  • Message when no data found in set block property

    hi,
    ı use oracle forms 10.1. when ı use the code below
    SET_BLOCK_PROPERTY('MY_BLOCK', DEFAULT_WHERE,     'YEAR=2012') ;
    EXECUTE QUERY;
    if there is records for year 2012 it works fine. Bu if there exists no record ı get message saying no data found. And then it clears the block. I want to clear block with no messages.
    is it possible? thanks...

    Yes. you can add your own message on form level. User ON-MESSAGE trigger and write down the given code :-
    DECLARE
      msgnum NUMBER       := MESSAGE_CODE;
      msgtxt VARCHAR2(80) := MESSAGE_TEXT;
      msgtyp VARCHAR2(3)  := MESSAGE_TYPE;
      ALERT_BUTTON Number;
    BEGIN
      IF msgnum = 40301 then
    --HERE YOU CAN WRITE ONLY NULL-------
    /* SET_ALERT_PROPERTY('ALERT_OK',ALERT_MESSAGE_TEXT,'There are No records available for the Query selected by you  !!! ');
             ALERT_BUTTON := SHOW_ALERT('ALERT_OK');
             RAISE FORM_TRIGGER_FAILURE; */
    null;
    Elsif msgnum = 40355 then
              SET_ALERT_PROPERTY('ALERT_OK',ALERT_MESSAGE_TEXT,msgtxt);
             ALERT_BUTTON := SHOW_ALERT('ALERT_OK');
             RAISE FORM_TRIGGER_FAILURE;
    Elsif msgnum = 40657 then
              SET_ALERT_PROPERTY('ALERT_OK',ALERT_MESSAGE_TEXT,msgtxt);
             ALERT_BUTTON := SHOW_ALERT('ALERT_OK');
             RAISE FORM_TRIGGER_FAILURE;
    elsif msgnum = 40400 then
              message('Operation completed Successfully');
      END IF;
    END;

  • Is there any power pivot feature similar to" conditional block " property in cognos reports?

    I have a report with multiple power pivot charts. My requirement is to create a prompt which prompts the user with the list of charts and based on his selection , one of the charts will be displayed at a time. ie, user will have a choice for display
    of the chart. and these charts should have a common filter. I am using excel 2013 and SSAS tabular model.
    Could anyone please help me on this
    Thanks in advance

    Hi BLtechie, 
    If you are ok with using VBA (precluding the workbook from functioning correctly within SharePoint in an Excel Web Access web part) then you should be able to adapt the solution here: 
    http://www.mrexcel.com/forum/excel-questions/525495-conditionally-show-hide-charts.html
    Alternatively, if you have a tabular model and access to SharePoint 2013 with Reporting Services Integrated mode running SQL 2012 SP1 CU 4 or higher you could instead create a power view report that used the pinned filters property and simply presented
    each of the pivot charts on named sheets (forming your user's selection choice). 
    http://blogs.msdn.com/b/riccardomuti/archive/2013/05/24/pinning-filters-in-power-view.aspx
    Hope this helps, 
    Mike

  • Scroll Bar/visibility in Tab canvas/with child blocks property false

    Hi Every one:
    I am working on a Tab Canvas which has a parent block with 2 child Blocks, I am able to hide all items in a child block depend on the value of Parent block but not been able to hide Scroll Bar.
    If any one can give me some ideas. would be a great help.
    Thanx
    null

    perhabs you can create an item which is disabled and no level and not visible and has the same width and heigth of the scrollbar or bigger and if you want to set the toolbar not visible set the item visible.
    (i don't know if you can understand my bad english)
    ~
    pascal

  • Block property pallete question.

    Hi folks,
    Am working on this form, in one of the data blocks, the database data block is set = 'N'. However, the data source is = 'Database table' and the data source name = 'Database Table name'. What is the significant of this. None of the Items is a database item. In another block just like the one above, one item is a database item.
    Kind Regards,
    Ade

    Sourav,
    Data source name is the table name in case of data source type is TABLE.
    Data source name could be 'SELECT EMPNO, ENAME FROM EMP' if data source type was FROM clause.
    Do you understand this relation ?
    anyway you can find explanation in the Forms Builder Online-help (Ctrl+H)
    Francois

  • Using Key-exeqry to populate block, next_record draws FRM-41009

    I am using web forms 6.0.8.18.3 (6i patch9) and 10g database
    I am making a new form from another very similar screen
    but presenting format as child to parent view of data
    (reversing similar screens parent to child format)
    The new screen has 2 t tabs, 2 blocks per tab(not master/detail)
    I want to preserve the prior form’s same
    Query_data_source_name block property selects (if possible)
    (This preserves the enter-query/execute query on the block(works fine)
    I want to populate a tabular(table based) block(query only)
    based on user entering a number (child) returning one or many rows
    (the first field is enterable (control number)and the rest are display)
    goal: so the user can query by number field and get child/parent data.
    I can do a direct ‘select into’ the fields and create one record ok.
    But fails if to_many_records, returns(error)
    That’s why I need the cursor/loop/fetch/next_record set up
    To return many records.
    In a proc called by a key_exeqry trigger to populate the block,
    I am using next_record in my loop but get FRM-41009
    How can I achieve this via a key_exeqry?
    if not
    is there a way to ‘break away from the key_exeqry’,
    do the loop(in a place where I will not draw a error)
    based on passed parameters to populate the block?
    Here is my block/Key-exeqry logic --(not ideal)
    If entered field is null then
    Null; --allows f7/f8 full query usin query data source name(ok)
    Elsif not null
    Do validate select-–validate number with select
    If no data found error message(ok)
    If to many rows then
    Call multi record loop proc
    Do the multi record procedure(program unit)cursor select/loop/fetch(fails /no next_record allowed!)
    I am rotating through the loop and land on last record
    (The problem is the next_record is not allowed.)
    If field not null and a flag not on(=N)
    Call single_record_populate procedure(select into) (works fine-ok)
    End if;
    I saw A. Weiden post that ‘key-exeqry fires only once for the query,
    so you won’t have a chance To do a per-record operation in it’.
    (so there is a better way)
    But Is there any way to do this--do a block populate(with loop) based on a key-exeqry trigger?
    (75% of srcreen requirements work ok so far)
    Thanks.
    here is actual KEY-EXEQRY code
    declare
    v_parent_mode_id number;
    v_ep_num varchar2(4);
    v_ep_description varchar2(120);
    v_cd_Id number;
    v_cd_capture_percent number(6,3);
    dummy_alt number;
    v_error_flag varchar2(1);
    action varchar(80);
    p_out_parent_mode_id number(10) := v_parent_mode_id;
    p_out_cd_Id number(10) := v_cd_Id;
    p_out_ep_num varchar2(4) := v_ep_num;
    p_out_cd_Id_Num varchar2(4) := :emission_points.cd_id_num;
    begin
    v_error_flag     := 'N';
    if (:emission_points.cd_id_num is null) then
    execute_query;
    v_error_flag := 'Y';
    elsif
    (:emission_points.cd_id_num is not null) then --validate check if entry(chld) exists under parent
    begin
         select parent_mode_id, cd_id, cd.capture_percent, ep.num
    into v_parent_mode_id, v_cd_id, :emission_points.capture_percent, v_ep_num
    FROM EMISSION_POINTS EP,
    EP_MODES EPM,
    CAPTURING_DEVICES CD,
    CONTROL_DEVICES CDT
    WHERE EP.ID = EPM.EP_ID AND
    EPM.ID = CD.PARENT_MODE_ID AND
    CD.CD_ID IS NOT NULL AND
    CD.PARENT_MODE_ID IS NOT NULL AND
    CD.STACK_ID IS NULL And
    cd.fac_id = :FACILITIES.ID and
    cd.cd_id = cdt.id and
    cdt.num = :emission_points.cd_id_num;
    exception
    when no_data_found then
    disp_warn('Control number '||:emission_points.cd_id_num||' does not exist under parent points for id_number '
    ||:facilities.scr_fac1);
    raise form_trigger_failure;
    v_parent_mode_id := null;
    v_cd_id := null;
    :emission_points.capture_percent := null;
    v_ep_num := null;
    when too_many_rows then
    v_error_flag := 'Y';
    --process for multiple records returned
    populate_emission_points(p_out_parent_mode_id, p_out_cd_Id, p_out_ep_num, p_out_cd_Id_Num);
    end;
    end if;
    if (:emission_points.cd_id_num is not null) and v_error_flag = 'N' then
         DISP_WARN(':emission_points.cd_id_num=>'||:emission_points.cd_id_num||' v_error_flag=>'||v_error_flag);
    --process for single record returned
    emission_points_record;
    end if;
    end;
    Edited by: Doug Galayda on Apr 16, 2009 12:36 PM

    1. This is really why I did it in pieces:
    2. Whole query does work
    1.The form previously has a existing form-clause-query
    When I put a whold valid select in
    It attaches ‘the new from clause qeury’ on to the select.
    Select item1, item2, item3
    From(select item1, item2 <<my new from clause
    I see this effect in a :system.last_query display.
    I can’t ignore the properties already there.
    They add themselves to(or around) what ever I put into
    A new from clause query statement.
    So since I have a existing from clause query that says
    Select id, fac_id, num, parent_mode_id, cd_id, description, capture_percent
    From
    What ever I put into a SET_BLOCK_PROPERTY becomes this
    Select id, fac_id, num, parent_mode_id, cd_id, description, capture_percent
    From( my new set_block_property here
    In other words if you had a existing select from clause
    And you put a whole select in your substitute from clause query
    And you put a :system.last_query display in your key-exeqry immediately
    After your set_block_property command
    You are in fact replacing the from clause with that statement
    (what you put in the statement will follow a ‘from’.
    I thought I was doing the correct thing:
    The pieces added up to looking correct to, but did not work!
    (I can’t get the real :bind value passed in to the join.)
    2. You are right when I put the whole query in there
    It does work, but only when I use a literal ‘’0031’’ in double quotes,
    but I cannot get the bind variable to be ‘seen’
    In the set_block_property
    I can see my user entered field value as 0031 in a display before the
    Set block property is fired.
    I need a value of 0031 in a bind variable for the query to work.
    And that’s what I am working on.
    SET_BLOCK_PROPERTY('EMISSION_POINTS',QUERY_DATA_SOURCE_NAME,
    '(SELECT C.ID, A.ID EP_ID,A.FAC_ID,A.NUM,A.DESCRIPTION,C.PARENT_MODE_ID,
    C.CD_ID,C.CAPTURE_PERCENT,C.CAPTURE_METHOD,C.DATE_TESTED
    FROM EMISSION_POINTS A,
    EP_MODES B,
    CAPTURING_DEVICES C,
    CONTROL_DEVICES CD
    WHERE A.ID = B.EP_ID AND
    B.ID = C.PARENT_MODE_ID AND
    C.CD_ID = CD.ID AND
    C.CD_ID IS NOT NULL AND
    C.PARENT_MODE_ID IS NOT NULL AND
    C.STACK_ID IS NULL and
    cd.num = ''0031'')');
    Steve Cosner replied to my first post
    How can I pass a variable into a Query Data Source Name select's join?
    Use one of these:
    and cd.num = :Blk_name.Pass_cd_Id_num
    and cd.num = :Parameter.Pass_cd_Id_num
    and cd.num = :Global.Pass_cd_Id_num
    Any one of the above would work. I would use either a hidden item in a control block, or a form parameter.
    The sql select you build in the query-data-source name is passed
    directly to Oracle for execution, and PL/SQL variables cannot be "seen" by the database.
    Instead, you pass a bind variable (note the leading colon),
    and Forms then knows to pass the value or location of the bind variable so Oracle can use it.
    SET_BLOCK_PROPERTY('EMISSION_POINTS',QUERY_DATA_SOURCE_NAME,
    '(SELECT C.ID, A.ID EP_ID,A.FAC_ID,A.NUM,A.DESCRIPTION,C.PARENT_MODE_ID,
    C.CD_ID,C.CAPTURE_PERCENT,C.CAPTURE_METHOD,C.DATE_TESTED
    FROM EMISSION_POINTS A,
    EP_MODES B,
    CAPTURING_DEVICES C,
    CONTROL_DEVICES CD
    WHERE A.ID = B.EP_ID AND
    B.ID = C.PARENT_MODE_ID AND
    C.CD_ID = CD.ID AND
    C.CD_ID IS NOT NULL AND
    C.PARENT_MODE_ID IS NOT NULL AND
    C.STACK_ID IS NULL and
    cd.num = :emission_points.cd_id_num)');
    The bind variable :emission_points.cd_id_num in the above
    set block property statement appears as its :bind variable name :emission_points.cd_id_num
    This fails with frm-40505.
    The key problem now it to get the :bind value to be ‘seen’ in the statement.
    Thank you so much.
    I appreciate your time and help.

  • Key mode property of a  block

    Hi,
    What is the equivalent for :
    the key mode property of a the block ( automatic, NON-UPDATABLE ....) IN DESIGNER6I vs Forms Builder
    THanks!

    In the Designer on-line help you can read:
    - Generated data block properties (explicit) - Enforce Primary Key block property
    - Generate options preferences - KEY-NXTKEY functionality required (NXTKEY)
    In the Form on-line help:
    Enforce Primary Key block property
    Key Mode property
    I hope this will be a little help for you.
    Helena

  • Delete_allowed property on a multi record block

    Hello!
    I need to modify the property "DELETE_ALLOWED" of
    some records of a multi record block according to
    some conditions (conditions on values of some items of the current record)
    My problem is :
    when I do that in a pre-record trigger
    (set_block_property(block name, delete_allowed, property_false),
    it change it for all records of the block even I make an IF condition on this!!!
    my block is a detail block of a another block!
    Any help please!!!

    Delete_Allowed is a block property, so it is the same for all records in a block. But when you set it in a Pre-Record trigger (following some conditions) then you can or cannot delete only that record ...

  • How to change the "name of column" property of an text item in runtime?

    How to change the "name of column" property of an text item in runtime?
    I look the properties of items in help and found nothing about this!
    It's possible?

    Hi,
    an other solution is change the block property QUERY_DATA_SOURCE_TYPE from "Table" to "Sub-query" , than change at run time the property QUERY_DATA_SOURCE_NAME.
    First create block and add items
    The QUERY_DATA_SOURCE_NAME will be for ex. "Select 'A' as col1, 'B' AS col2, 'C' as col3 from dual"
    Set into items the column name property to col1 , col2 ...
    At run time change the query to "Select 'Z' as col1, 'X' as col2 , 'Y' as col3 from dual"
    in this way you can change the source of column value.
    Caution because if you change value type from varchar2 to date you must cast date into varchar2.
    May be that this way is valid only for view data not for insert-update, i don't remember.
    bye
    Message was edited by:
    Killernero

Maybe you are looking for

  • Can anybody send me the interview point of Questions on OO ABAP?.

    Can anybody send me the interview point of Questions on OO ABAP?.

  • Create or replace trigger

    hi i want to create trigger . when insert a row on table , it returns new value and old value . I have many tables and columns . i should to use :new.columntitle and :old.columntitle .Columntitle is refere to name of column in table . but sql develop

  • Apple TV loses purchased content

    My aTV has been losing purchased content - and this is the 2nd time that about five purchased movies (out of twenty) suddenly disappeared. While the ATV was paired with a laptop, I have not synced it for a few months as iTunes stopped showing the aTV

  • System will not reboot

    While using my imac this morning, the screen dimmed and I got a message that I needed to restart by holding down the on/off switch. After doing so, the system will not start. I Get a folder icon with a question mark. Do I have a hardware failure?

  • Create different network share shortcut in desktop for different security groups using GPO

    Hi,  I have an OU named TECH that contains two different security groups ENG and PRESS. When users in ENG group logs in desktop should show a network share \\server1\eng-share and  when users in PRESS group logs in desktop should show a network share