[b][Solved][/b]Setting Text item property in pl/sql editor

Hello, I'm using Oracle 9i both as Ids and database
This is what I'm having-
2 data blocks 1st is database block and 2nd is control block.
database block named EMP is associated with EMP table and Control block named CTRLB have 2 item 1st is a text item and 2nd is a Push button.
This is what i wanted-
At first i wish to show the CTRLB items when user provide an input in "Text item" say a number and press the button the Values from "Text Item " is placed in Emp blocks Department_id item and a query is executed (act as where filter) and return only the employees records within that Department_id
This is what i done so far-
i write a trigger" when button press" on push button item and entered the following code
NEXT_BLOCK;
ENTER_QUERY;
:EMP.DEPART_ID:=:CTRLB.PBT;
EXECUTE_QUERY;
but it donot make any query.
but when i use the execute query from the menu(the built in provided by oracle in applet) it works. i mean there is no problem in database connection or mapping. only the button is not working.
So what i'm doing wrong or 'What i should do now to have it worked
thank you
Message was edited by:
Rainbow
Message was edited by:
Rainbow

Hello,
You could use the DEFAULT_WHERE clause of the based block, so that you just have to execute the query:
Set_Block_Property( 'EMP', DEFAULT_WHERE, 'DEPART_ID = :CTRLB.PBT' ) ;
Go_Block('EMP');
Execute_Query ;Francois

Similar Messages

  • Setting text item delimiters in Cocoa-Applescript App

    Does anyone know of a problem with text item delimiters in a Cocoa-Applescript App.  This is in Xcode 4.5.2 and  Mountain Lion
    the following code seems to fail  to set the text item delimeter  to + when I run it in Coca-AppleScript
    --  TSTAppDelegate.applescript
    --  Test Text item Delimiters
    --  Created by Frank Caggiano on 12/22/12.
    --  Copyright (c) 2012 Frank Caggiano. All rights reserved.
    script TSTAppDelegate
      property parent : class "NSObject"
              on applicationWillFinishLaunching_(aNotification)
      -- Insert code here to initialize your application before any files are opened
            tstTxtDel()
              end applicationWillFinishLaunching_
              on applicationShouldTerminate_(sender)
      -- Insert code here to do any housekeeping before your application quits
                        return current application's NSTerminateNow
              end applicationShouldTerminate_
        on tstTxtDel()
            set text item delimiters to "+"
            set d to "-s http://www.nietzschefamilycircus.com"
            set r to do shell script "curl  " & d & " | ~/Desktop/try.pl"
            display dialog "r is " & r
            set rr to every text item of r
            display dialog "rr " & rr
            display dialog "curl " & first text item of rr & " -o "
    end
    end script
    However if you put the tstTstDel() function in the Applescript editor it works as expected.
    The try.pl script is
    #!/usr/bin/perl
    $s ="";
    while (<>) {
        $s .= $_;
    $s =~ m{class="comic"(.*)<div class="footer">}si;
    ($link, $caption,$jj) = ($1 =~ m{<img src="(.*)" alt=.*class="quote">(.*)(</div>.*</div>)}si);
    print $link, "+", $caption, "\n";
    I know this worked in the past. The Coca-Applescript app was written at least as far back as Snow Leopard. The site I am parsing changed their format and I was updating the app as a means to learn the new Coca-Applescript environment.
    Any help appreciated

    OK found it, I needed to use
    set Applescript's text item delimiters to "+"
    instead of just
    set text item delimiters to "+"
    I suppose it is a scoping thing.

  • Set Text Item To SQL Query Result

    I am trying to set a text item to a SQL query result. Something like the following:
    (I am trying to accomplish this in the SOURCE portion, set to 'SQL Query' source type, of the text item properties)
    SELECT empno FROM emp WHERE empno = :SEARCH_EMPNO;
    This only displays as the literal text when the application renders and not the value from the SQL query.
    I apologize if this has already been posted but I could not find what I am looking for. I have seen posts that reference a pre-region computation but do not know the exact steps to accomplish the results I want.
    Thanks in advance for anyone's time to help me with my issue.
    Kyle

    Scott,
    The literal that displayed (I have fixed it) was the actual SQL statement: SELECT empno FROM emp WHERE empno = :SEARCH_EMPNO;
    I have resolved the issue, using SQL Query as the "Source Type" and Always, replacing any existing value in session state as the "Source Used" for the properties of the item.
    What I was trying to accomplish is a search text item that would return the data for that record in a table into other text items, for each column in that record, for update; based on the search text item as a unique SQL query search for that record.
    Thank you for your quick reply!
    Kyle

  • How to set the item property to restrict the user to not to copy from above

    Hi Guru's,
    I have a requirement like, There were two items on the form name email Id, Confirm email Id.
    I have to ristrict the user to not to copy from email Id item.. make him/her to enter the value into confirm email id item field manually.
    How to set the item property to restrict the user to not to copy from above item and paste it in this item.
    Please help.
    Thanks!!

    Just an opinion here, but that is about the dumbest requirement I have ever seen.
    I am always annoyed by web sites that ask me to enter my email twice. I ALWAYS copy the email address from the original entry and paste it into the second one.
    People enter their email addresses so often, it takes a real klutz to not get it right. And what makes you think that if they enter it twice, that they won't enter it wrong both times anyway???

  • How to set Lov item property (Action type,event,parameter etc) in PR when page load

    Hi gurus
    I am new to OAF, First I need to explain my scenerio.
    I need to make some field mandatory or non mandatory based on one LOV item (Pick list or message choice list).
    for this i extended the controler and apply the changes, but in this case what heppen, It will effect only when i open the list (pop list) and click on more (Available in poplist) and it will open a new form and i select value from that form. But when I open the poplist and select the value from the same list rather going to more option (it does not open new form), then there are no effect. I though the issue with refreshing when selecting value from the same list.
    To resolving this issue what i did
    1. go to page == > the same LOV
    2. Change the Client Action properties (
         Action type  = fireAction
         event          = xxevent
        submit = true.
    After doing this when i run the page from my OAF enviroement , every thing is OK. Then I transfer the Controler to Server machine and change the controller and run the same page from the server, it has the same refreshing issue, Then I thought because I did not transfer LOV such properties so this is hepening,
    Now I want to initilize such properties in Page load or what I need to do, Please advise me.
    Regards,
    Haq

    Edward,
    Thank you for the suggestion! It directly lead to my solution wherein I used CASE statements for the column in my Region SELECT such as the following:
    WHEN (:P2_GRADING_METHOD = 'CR/NC' OR scs.scs_pass_audit = 'P') AND GET_GRADE_B93 (sac.stc_final_grade, sac.stc_verified_grade) IS NULL THEN htmldb_item.select_list_from_lov (5, 'Enter Grade', 'GRADE_LOV_CRNC','onBlur="return validate_grade(this,''FW_DATE_'||ROWNUM||''')"','NO',NULL,NULL,'GRADE_'||ROWNUM)
    When the column is NULL, the Select List (LOV) contains the entry 'Enter Grade' and that is the value displayed on page load. I bypass the value 'Enter Grade' during Submit Processing where database updating occurs.
    I did not find the need to enter values for p_null_value and p_null_text since I don't believe that it would cause the 'Enter Grade' value to display on page load for null value columns but rather would enable the user to select 'Enter Grade' from the list and have a specified return value stored in htmldb_item array.
    Again, thank you for the help!

  • Why SAP B1 set all form item property of "Enabled" to true automatically?

    When I set some items property of "Enabled" to false in a user define form in the form load event.
    But now I click some editable item and type some thing in the edit text bar, I see all of uneditble item suddenly can be edit. It's not convenient, means we need to more coding work about this.

    Hi Alan,
    you may set the Form Property
    oForm.AutoManaged =False
    If it's True all item visible/enabled-propertys are dependent to form mode and they're always switching back to their defined state when the mode changes.
    If you want to use the oForm.AutoManaged =True then you can define exactly the behavior of the items in each mode:
                Dim modeMaskFind As Integer
                Dim modeMaskOk As Integer
                Dim modeMaskAdd As Integer
                Dim colUid As String
                Dim oCbx As SAPbouiCOM.ComboBox
                oForm.AutoManaged = True
                oForm.SupportedModes = _
                         SAPbouiCOM.BoAutoFormMode.afm_Ok Or _
                         SAPbouiCOM.BoAutoFormMode.afm_Add Or _
                         SAPbouiCOM.BoAutoFormMode.afm_Find
                modeMaskFind = SAPbouiCOM.BoAutoFormMode.afm_Find
                modeMaskOk = SAPbouiCOM.BoAutoFormMode.afm_Ok
                modeMaskAdd = SAPbouiCOM.BoAutoFormMode.afm_Add
               With oForm.Items
                    .Item("CBX_YEAR").SetAutoManagedAttribute( _
                           SAPbouiCOM.BoAutoManagedAttr.ama_Editable, modeMaskAdd, _
                           SAPbouiCOM.BoModeVisualBehavior.mvb_True _
                    ) ' editable in AddMode
                     .Item("CBX_YEAR").SetAutoManagedAttribute( _
                             SAPbouiCOM.BoAutoManagedAttr.ama_Editable, modeMaskFind, _
                             SAPbouiCOM.BoModeVisualBehavior.mvb_False _
                     ) ' NOT editable in FindMode
                    .Item("CBX_YEAR").SetAutoManagedAttribute( _
                           SAPbouiCOM.BoAutoManagedAttr.ama_Editable, modeMaskOk,  
                           SAPbouiCOM.BoModeVisualBehavior.mvb_True _
                     ) ' editable in OKMode
                    .Item("CBX_YEAR").AffectsFormMode = True
                End With
    Cheers,
    Roland

  • Dreamweaver Help | Set text properties in the Property inspector

    This question was posted in response to the following article: http://helpx.adobe.com/dreamweaver/using/set-text-properties-property-inspector.html

    The note at the bottom of the first section (About formatting text (CSS versus HTML)) says -
    "You can combine CSS and HTML 3.2 formatting within the same page. Formatting is applied in a hierarchical manner: HTML 3.2 formatting overrides formatting applied by external CSS style sheets, and CSS embedded in a document overrides external CSS."
    Please be aware that embedded CSS will ONLY override external CSS if the external CSS link is closer to the  tag than the embedded CSS (i.e., it comes earlier in the flow of the document).  If the embedded CSS comes first in the flow of the document, it will be overridden by the external CSS instead.

  • How to display database records in text item

    hello friends,
    I'm using forms6i..
    I have text item named "username" in layout editor.I created this text item from data block wizard..I set Number of items displayed=3 in that wizard..
    In property palette of of "username" i have following changes
    Number of items displayed =3;
    When i click the button named "list_user" it should shows all user names in text item..
    my when-button-pressed trigger code is:
    declare
    cursor c1 is
    select Logid from log1 where logout_date is null;
    begin
    open c1;
    fetch c1 into :username;
    end;
    But my problem is when i run the form only one user displayed in text item..Remaining two text items are having no data..
    The result of the cursor query is :
    SQL> ed
    Wrote file afiedt.buf
    1 select logid from log1 where logout_date is null
    SQL> /
    LOGID
    104
    105
    106
    pls help me
    Edited by: Balraj on Feb 23, 2011 1:45 AM

    I have text item named "username" in layout editor.I created this text item from data block wizard..I set Number of items displayed=3 in that wizard..
    In property palette of of "username" i have following changes
    Number of items displayed =3;Its great that it is working fine, but seems your block is database block based on the same table log1, then why do you want to loop when form has better way.
    Secondly if you have set No of Records for a block then there is no need to set the No of Items displayed for the Item if it is the same as Records displayed for block.
    You can use No of Items displayed for an Item if you need to display no different then no of records else no need to change the default that is 0
    No of items displayed is usually used to display Summary Columns in a multi record block so that you will be able to display just 1 Item rather then as many as the No of records.
    Best Regards
    Arif Khadas

  • Item property : Update allowed: No

    I have created a tabular form. Due to the fact that it is not possible to record the primary key manually, i have create a fake primary key on field 'ID'. The field 'StatusID' has now a unique constraint in the database. Also the foreign keys refer to the field 'StatusID'.
    I want to prevent updating the field 'StatusID'. In Oracle Forms this was very easy.
    You can set the item property Update allowed : NO.
    But how can I implement this in an APEX tabular form?
    Regards,
    Johan Brouwer

    Leo,
    It's a tabular form. The field StatusID can be recorded manual.
    When a StatusID has been created, it's not allowed to change it anymore.
    If you use "display as text, save state", you are also not able to insert the data in that field.
    So if a record has been created, then it's not allowed to change the field anymore.
    In oracle forms, this was very easy. You could set the insert_allowed property on YES and the update_allowed property on NO. I'll want to built the same functionality in the tabular form.
    Regards,
    Johan

  • How do you write UNDO for a text item?? examples? or a REDO??

    How do you write UNDO for a text item?? examples? or a REDO??
    I created a pop-up menu with CUT, COPY, PASTE, UNDO, CLEAR for my text items.
    Using MAGIC menu type works great but there is no MAGIC for UNDO or REDO.....
    How do you write UNDO for a text item?? examples? or a REDO??
    I have Oracle Forms 6i...
    Lets say I highlight all the text in the text item, and start typing over it... then I realize OH NO it is the wrong text field...
    Now I want to UNDO the typing and get back to the previous text.
    I'd use the initial value that was populate right? How do I access that if that is correct?
    Thanks, Bill

    You can use;
    <ITEM> := Get_Item_Property(<ITEM>,DATABASE_VALUE);
    Or you will have to write a pre-text-item trigger;
    PRE-TEXT-ITEM:
    :CTRL.CURRENT_VAL := :<BLOCK>.<ITEM>
    MENU (PL/SQL):
    :<BLOCK>.<ITEM> := :CTRL.CURRENT_VAL;
    You may also want to set the item property back to ITEM_IS_VALID so that item validation does not fire again.

  • Blink Text Item

    Hello
    I am still not able to solve this blinking text item for my forms.
    I once again request anyone who can give me the sample code.
    I have a text item say mv_msg. Initially there is a welcome message in the text item
    say with red font.
    Now when I move the mouse this text should change with different message with
    different color say by moving the mouse over the form.
    Also this should be done without using any timer .
    Please suggest.Thanks in advance.

    I'm found it from metalink
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:6497061713474016232::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,112864.1,1,1,1,helvetica
    Solution Description
    There is no default functionality in forms that allows you to do this. You can
    simulate a blinking font by creating and using a timer within your form:
    1) Create the timer in the WHEN-NEW-FORM-INSTANCE trigger:
    DECLARE
    sec_timer TIMER;
    one_sec NUMBER(7):=1000;
    BEGIN
    :global.blob := 1;
    sec_timer:= CREATE_TIMER('alarm',one_sec,REPEAT);
    END;
    2) Create a WHEN-TIMER-EXPIRED trigger:
    BEGIN
    if :global.blob =1 then
    set_item_property('text_item4',background_color, 'r400g0b0');
    :global.blob:=2;
    elsif :global.blob = 2 then
    set_item_property('text_item4',background_color, 'r999g999b999');
    :global.blob:=1;
    end if;
    END;
    The above will cause the font to "blink" every second.

  • 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

  • [svn:fx-trunk] 8024: Fixed an injection where setting the 'content' property of Spark text component to a TextFlow would cause you to get a TextFlow nested inside a TextFlow .

    Revision: 8024
    Author:   [email protected]
    Date:     2009-06-19 16:59:25 -0700 (Fri, 19 Jun 2009)
    Log Message:
    Fixed an injection where setting the 'content' property of Spark text component to a TextFlow would cause you to get a TextFlow nested inside a TextFlow.
    QE Notes: None
    Doc Notes: None
    Bugs: SDK-21906
    Reviewer: Carol to review
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21906
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as
        flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as

    Well, I've already solved one of the two issues
    In order to display the icons on my buttonbar buttons, I just needed to point at {hostComponent.data.data} instead of {hostComponent.data}. I'm not sure why, but {hostComponent.data} in my skin class is a handle on my instance of ButtonBarButton, not its "data" property. Any explanation is welcomed
    I still have got the first issue though. Oddly enough my design works if I put an mx Image instead of the spark BitmapImage for the client logo. That will do the trick for the moment but I'd prefer to deliver a 100% pure spark component in my prototype, and I can see no reason why BitmapImage works inside my ButtonBarButtons and doesn't otherwise...

  • Set Synchronize with Item property at runtime in Forms

    Hi,
    We have a requirement to set the "sychronize with item" property to null for one of the fields of seeded form during run time (this is to avoid modifying the seeded form which has the synchronize property of field A set to field B. We are planning to do this change in CUSTOM.PLL). I couldn't find any property in "APP_ITEM_PROPERTY2.set_property" which can suffice my requirement. I am working on Forms 10g.
    Please let me know if anybody has worked on similar requirement.
    Thanks,
    Shree

    Hello.
    You can perform this by using:
    set_tab_page_property('Tab_page_name', label,'your_desire_label');
    and for item set_item_property.
    More details on these built-ins and also some example can be found in Forms Builder Help.
    Regards,
    Alex
    If someone's answer is helpful or correct please mark it accordingly.

  • Set item property to false and true

    when i set item to false and then set item property to true. The item is displayed but its gray out and not enabled. Am i missing something
    Set_Item_Property('PUSH_BUTTON_SAVE',VISIBLE,PROPERTY_FALSE);
    and then
              Set_Item_Property('PUSH_BUTTON_SAVE',VISIBLE,PROPERTY_TRUE);

    Check the Forms online help on Set_Item_Property, near the bottom in the usage notes. Lots of things happen when you set visible to False:
    Setting DISPLAYED to False:
      sets the Enabled and Navigable item properties to False
      sets the Updateable item property to False
      sets the Update_Null item property to False
      sets the Required item property to False
      sets the Queryable item property to False
    So you may need to set more of them back to true in your code when you want to make it re-display.

Maybe you are looking for

  • GROUP_PO_BACKEND in BAdI BBP_BS_GROUP_BE

    Hi' We want to further split our SC into more POs. Using Method GROUP_PO_BACKEND in BAdI BBP_BS_GROUP_BE. How to split into more POs? I cannot see which data to change, in order for the split to occur. Please provide a coding example. Regards, Karin.

  • HT2090 iSight not working neither after resetting SMC? What other to do?

    Hello, I don't know how to solve this problem with my builtin iSight camera on a MacBook. I tried several times resetting the SMC and at the begginning it worked, but lately this procedure is giving no results any more. I checked the System Profiler

  • Pagestream

    I am using pagestream in my htmlcss to generate buttons to view pages one at a time. But I am not being able to prevent the buttons from appearing when the output is only one page. Any idea how to avoid the buttons when the output is only one page? t

  • Db is sudden down....

    hii What will be ur initial step u take when a database is suddenly down in 24/7 ? i was asked this question in my interview....pls pals help me to get rid of such cunning questions thanks in advance...

  • TS1398 Connections..Wifi/Ethernet

    So, in order to stream effectively, I have had to connect AppleTV via ethernet, but now, I can't play items selected within Appletv, from 'Computers' as they are connected via WIFi. Seemingly, my ethernet and wifi connectins are different - despite b