Poplist and muti-record block navigation

Hi. I have a form with a multi-record block and a poplist on
each record. When a certain item is TRUE on a record, I want the
poplist button to be disabled and enabled when the item is
FALSE. The button is normally enabled and I disable it when
needed in the WHEN-NEW-RECORD-INSTANCE trigger. This normally
works fine except in one likely common scenario: The user
navigates from a record with the poplist button enabled directly
into the poplist button of a record for which the poplist should
be disabled. By clicking directly into the poplist without
clicking on any of the record's regular fields, the WHEN-NEW-
RECORD-INSTANCE trigger hasn't had a chance to fire so they are
allowed in.
How can I ensure a user cannot navigate to a poplist without the
system recorgnizing the record change?
Thanks for any advice.

What I would advise is that you create another item in the block
which mirrors the poplist.
Make this item a text item.
Change the attributes of the poplist to have a Records Displayed
of 1.
What you need to do then is only display the poplist on the
current record. Do this by dynamically repositioning the poplist
on a When-New-Item-Instance trigger.
The information in :system.trigger_record and get_block_property
(<>, TOP_RECORD) will provide enough information to work out the
Y coords of the poplist for each record.
Then at runtime when the user clicks, they will be clicking on
the Text item rather than the Poplist. You can then navigate to
the row and display the poplist in the correct position enabling
or disabling it in the process.

Similar Messages

  • Grey out checkbox in muti-record block

    Using Forms 6i
    I have a multi-record block which has a checkbox on each record. On some records I want to disable the checkbox. I use SET_ITEM_INSTANCE_PROPERTY for this and it works OK. However, when I disable the checkbox I also want to change its appearance and make it look grayed out. How can I do this using SET_ITEM_INSTANCE_PROPERTY (or any other built-in)?
    I've tried SET_ITEM_PROPERTY but that disables and grays out ALL the checkboxes on the block

    Thanks Tony
    Yes, I used INSERT_ALLOWED, UPDATE_ALLOWED and NAVIGABLE all set to Property_False via set_item_instance_property.
    I've set up a named visual attribute and tried various combinations of Foreground/Background colors and Fill Patterns setttings. None of the combinations alter the colour of the 'check' (or tick) or the background behind the 'check' in the checkbox (it still shows black 'check' on white background). The settings only alter the colours of the border surrounding the check box. Presumably the colour of the check/tick is coming from the font setting (in visual attributes) but there's no option to change the font color (or the font background).
    Any ideas??

  • Enabling and disabling the button in the multi record block

    hi all,
    i am using
    Forms [32 Bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    i have a multi record block each block contains a button(button is to approve the record in terms of changing the status)
    i have the items like date,remarks and button
    the button should be enabled if the remarks is not null otherwise it should be disabled.
    for this in pre-record trigger i have written
    if :record is null then
       set_item_property('button',enabled,property_false);
    else
          set_item_property('button',enabled,property_false);
    end if;what problem is enable and disable is impacting on all the buttons in the block. in other words if first record's remarks is null then all the records button is disabled. if first record's remarks column is not null then all the records of the button column is enabled.
    i have to make enable and disable the button for the corresponding record.that means if first record's remarks column is not null then only first records button should be enabled others should be disabled.
    Thanks..

    You need to set the No. of items displayed to 1 as Ammad had said, additionally you can set the X and Y Position (Just Y will do and having fixed X) of the button depending upon the current record.
    can u explain this part alone bit more (setting the position of x and y)You need to calculate the variable Y_POS depending upon the current position of the cursor that is the current record.
    You can find the current record Y_POS using combination of
    V_CURRENT_RECORD := :SYSTEM.CURSOR_RECORD;
    V_TOP_RECORD := GET_BLOCK_PROPERTY ('BLOCK_NAME', TOP_RECORD);
    V_ITEM_Y_POS := GET_ITEM_PROPERTY ('ITEM_NAME', Y_POS);
    -- Also needs to add the Y_POS of the relative other items in the muti-record block
    V_HEIGHT := GET_ITEM_PROPERTY ('BUTTON_NAME', HEIGHT);
    -- Note :- TOP_RECORD  Returns the record number of the topmost visible record in the given block.
    V_Y_POS := V_ITEM_Y_POS + ((V_CURRENT_RECORD - V_TOP_RECORD) * V_HEIGHT);
    -- You will need to add Distance between Items in records if anyThen you can Set the current Y_POS of the button.
    SET_ITEM_PROPERTY ('BUTTON_NAME', Y_POS, V_Y_POS);
    [/code[
    Hope this helps
    Best Regards
    Arif Khadas
    Edited by: Arif Khadas on Feb 24, 2011 4:58 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Another multi-record block question

    I have always struggled with this. I have a muti-record block(10 records displayed). Eventhough my block is a db block, I have not assigned it a table. Hence, it is a non-db block. If I set enabled on a txt box, it
    is enabling the entire column. I need to enable only the text box on which the cursor is/user navigated to.
    How to do it?
    Thanks,
    Chiru
    Edited by: Megastar_Chiru on Sep 21, 2010 2:03 PM

    ok..here is the explanation of the issue
    in my multi-record block, there is a drop down list column with 2 values "Monthly %" and "Half-Rent". So, for example, in record 1, the drop-down could be chosen as "Monthly %" while in rec2, it could be "Half-rent". Right next to this list column, I have a text box. When the user chooses "Monthly %", the text box need to be enabled to allow keying a % value (say 5%). While in rec2, since the user chooses "Half-rent", the text box needs to be disabled for this record. How to accomplish this?
    Thanks,
    Chiru

  • How do I take data from a query sample record and query another block with it?

    I have a master/detail form (6i) that contains a master block (staff), and a detail block (phone). I would like to be able
    to query by phone number, but when I execute the query, I would like a 'search results' box to pop up that contains the
    phone number I queried for, as well as some other staff info. There might be multiple records that match my query,
    and I'd like them all to be listed (or list 10 or so, with a scrollbar). I'd like a push button next to each record that will take
    me back to the master/detail window with that record displayed. So, I created a third block that is based on a joined
    view of the staff and phone tables. It is a multi-record block, with 10 recs displayed and a scrollbar. It is in a separate
    window. I don't want the user to have to navigate to that block, however, to perform their query. I would like them to be
    able to enter the query in the phone number block, then somehow grab the phone number they've entered and use it to
    query my 'search' block. This is the part I'm having trouble with. Can someone please help? THANKS!

    Where do I put that line of code? I see that it goes at the Script part near the top, but how can I use that, I am pretty new to this language. I am not familiar with this line, where does it bind the value from the datagrid to the variable?
    fullXML[myDataGrid.selectedIndex].FIELD_NAME;
    myDataGrid would be the id from the grid I am guessing?
    and selected index would be the channel.description part?
    and FIELD_NAME; is the variable name?
    does this go into a funtion or is it placed at the top where the variables are declared?

  • How to do it in multi-record block

    Hi all,
    i have 1 text items in a multi-record block number of record displayed 10
    and i have values like 100 , 50, 30 in first 3 records and in 5th record i want to put some value like
    20 then i want to calculate all values like 100 + 50 + 30 +20 = 200 and i want to put the total value in a single record block.
    but my problem is i cannot able to calculate all the value because for the totale value i have to
    write a for loop to loop through the record
    but go_block() is not working in post_change .
    if any solution is there plz suggest.......

    Hi zeeshan
    my problem is i cannot able to calculate all the value because for the total value
    put the total value in a single record block.
    First pls the following...
    Guidelines for Working with Calculated Items Calculated items_
    1- They are display-only control items.
    2-Calculated items cannot be database items.
    3.While you can set a calculated item's Enabled, Mouse Navigate, and Keyboard Navigable properties to Yes,
    you cannot set the Insert Allowed or Update Allowed properties to Yes
    Second Keyword: TOTAL is a reserved oracle key word... pls read the Details...
    go_block() is not working in post_change .well u can use timers but no need for it u can reference block item but first u have to accumulate the values per record in WHEN-VALIDATE-ITEM TRIGGER in the last calculated item which is inserted by the user and assign it to the display item in ur current multi-record block :*block_name.total_item*.. as follow...
    :block_name.total_item := :item1 + .... ; Then u create a second display item > no of records property = 1 , named e.g. final_summarized_totals
    In order to summarize this total values accumulated in the multi-record display item named e.g. block_name.total_item
    Finally using PRE-INSERT , PRE-UPDATE,PRE-DELETE Triggers to assign the value calculated into the display item * block_name.total_item* into the db_item into the previously mentioned Trigger Block-Level Off-course.
    :block_name.total_db_tem := :i:block_name.final_summarized_totals ; Hope this helps...
    Regards,
    Amatu Allah

  • How to do validation on multi record block at run time...

    Dear Friends,
    I have to do validation at run time on multi record block.
    If user tries to enter and save two or more records in same multi record block with same data at run time, it should not allow it and display a message like, " error : Records are having same(duplicate) values. "
    I already did validation with the data coming from database table using cursor. But confused about how to do at run time(on one screen only) ??
    Please, give details about how to check duplicate records on form block before saving it to the table ????
    Regarding details would be greatly helpful.
    thanks,

    Hi...Pankaj
    thanx for your reply..
    I already did validation for the data coming from table....
    but I need to do it on form only...at run time...
    exa...
    In one multi record block
    record no : column 1 : column 2 : column 3
    1 abc 123 hi
    2 abc 123 hi
    so it should check on the form itself, here I m not getting data from table...I am just
    navigating from first record to second using down arrow.
    so, may be 2 possibilities.
    1) when user navigates using tab to third record, it should say like two duplicate records.(may be like when validate record or item)
    2) or when user tries to save, it should say two duplicate records.
    so, everyting should take place on form screen only.....
    waiting for your reply,
    thanx...

  • Moving cursor on  multi-record block with pjc components

    Hi, this thread question is updated to a more specific and correct one in the new thread:
    Need help on using navigation function in when-custom-item-event trigger
    Please, follow there...
    I have a pjc on a multi-record block. When I activate the pjc the forms cursor does not navigate to the item.
    The when-custom-item-event is activated. My question is how do I move the cursor to the current record?
    Best regards,
    Constantin
    Edited by: ConstGl on Jan 11, 2011 5:47 AM

    +"... When I activate the pjc the forms cursor does not navigate to the item..."+
    Sorry, but this is not clear for me.
    Francois

  • Poplist and displaying corresponding values from the database table

    Hi
    I have a poplist in a control block, the values of which are populated using a procedure. This is called in when-new-form-instance.
    This part works fine and values are filled in the poplist when form is opened..
    The datablock is based on a view. 3 columns from the view are selected to be displayed.
    Also the databock is filled with all values (for selected columns)
    Now when the poplist value is changed, I need the values in the datablock to be changed as well, but this is not happening.
    In my when-list-changed trigger, I have:
    go_block('datablock');
    execute_query;Please tell , where and what should I add to display the datablock values as per the poplist value.
    i.e, something like,
    select col1,col2,col3 from <view> where col4 =:control.col4
    Note:I tried in the where clause property of the block, but then nothing is displayed in the datablock
    Thanks

    This does not work , either..
    Before, when I changed the values from the list, it was still displaying same data on datablock always(all records)
    Now when I give this code,data is displayed in datablock only once(first time when the form opens)
    I have defined the Query data source type property on data block as "Table" but infact this datablock is based on a view..is this correct?
    Anything else I could try?

  • Editing record items in a multi-record block - 1 record at a time.

    Hello,
    I have the following scenario: Currently in my multi-record block, to edit an item of a record, the user has to double click on the record to enable the 'save changes' button. However, I want to turn the navigation to all other records turned off. The only way the user should be able to edit other records is save changes first, then again double click on the desired record to re-enable the 'save changes' button (at this time navigation to all other records should be turned off). ie., the user should be able to edit 1 record at a time (At any given time, I won't be having many records in the block which the user may have to modify).
    How can this be achieved?
    Thanks,
    Chiru

    That is pretty odd requirement, but this might work:
    When the user double-clicks the record, enable the Save button, and set a value in any column of the record to its current value. This will cause Forms to set the record status to CHANGED, and will not permit navigation away from the record until the When-validate-record trigger runs successfully.
    In the Save button, start a non-repeating timer to run maybe 20 milliseconds, then issue a Validate(Record_Scope); command. Check form_success then commit_form.
    In the when-validate-record trigger: Do any record validation that may be necessary, and Raise Form_Trigger_Failure if anything is wrong. Then check for the existence of your Save button's timer. If it does NOT exist, issue a message like: "You must Save the changes first" and Raise Form_Trigger_Failure; If the timer exists, do not raise the error.

  • How to convert a puch button disabled in a multi record block?

    Hi!
    I have a multi-record block and I need to set some specific item to disabled.
    I tried using set_item_instance_property with the following sentence:
    set_item_instance_property('INAF_ESC.EEAS_TIPO' ,CURRENT_RECORD, ENABLED , PROPERTY_FALSE);
    but it didn´t work.
    Anyone have any idea?
    Thanks
    Vero

    Hi,
    ENABLED is not supported SET_ITEM_INSTANCE_PROPERTY built-in.
    If you are env. has no mouse enabled, you can disable NAVIGABLE property using above builtin.
    There is a way make the end-user to feel like it is disabled.
    Create a visual attribute DISABLE_VA, with colors simillar to disabled buttion and set thie DISABLE_VA when the conditon is failed.
    Inside the button-pressed trigger check whether the conditon is true or false. If the conditon is failed you simply do nothing.
    ~Gouri Sankar
    But we can not stop the click action,

  • How can I create a loop in a multi-record block (on the background)

    I have a multi-record block.
    In one item I change a value.
    Upon this change, in the when-validate-item I would like to
    change other records in the same block.
    I planned to loop the block with go_record and to do my things
    in each record. Unfortunately the go_record built-in is
    restricted and cannot be used in a wvi-trigger.
    Another approach can be to update the records in the database
    and to perform an execute_query after this change. Also this
    procedure cannot be used in a wvi.
    How can I easily loop in a multi-record block???

    You can try to put loop with go_record in KEY-NEXT-ITEM on that
    field.
    Or if you change something and then press KEY-COMMIT you can
    update another records in database and after commit do again
    execute_query. Something like :
    on KEY-COMMIT:
    update_another_records;
    commit_form;
    execute_query;

  • Get next value in a Multi Record Block

    Hi,
    I've a Multi Record block with 2 items like below.
    pos width
    1 7
    8 5
    13 5
    18 2
    ie pos in next item is sum of pos and width of previous item.I've already implemented this.
    The problem is if the user changes width in a particular record,I want to change next records pos automatically.
    To achieve this,I wrote a when-new-record -instance-trigger as follws:
    if :system.cursor_record=1 then
    :pos:=1;
    elsif :system.record_status='changed' then
    :pos:=:pos+:width;
    end if;
    but even Though I change column width of block,:system.record_status still remain 'INSERT'.
    Pls can u pls tell me how can I acheive this?
    Prashanth Deshmukh

    You cannot use Record Status like that.
    You need to create a procedure that loops through your entire block, keeping track of the pos and width of the prior record to calculate the new pos of each record.
    Your procedure would need to do something like this:
    Declare
        v_Pos  pls_integer := 1;
    Begin
      Go_block('B1');
      First_Record;
      Loop
        Exit when :System.record_status='NEW';
        :B1.pos := v_Pos;
        v_Pos := v_Pos + :B1.width;
        Exit when :System.last_record = 'TRUE';
        Next_Record;
      End Loop;
      First_Record;
    End;

  • How to call a report with a bind variable from a multi-record block

    Hi,
    I have created a report using the BI Publisher functionality. I did all the integration, created the SQL Query and uploaded the template. Up till here everythings fine!
    My SQL Query has 2 bind variables.
    I will call my report from a multi record block, at the end of each record an icon is shown which the user can click to open the report.
    I created a column link for this item (PRINT_REPORT=Inschrijvingsformulier) but I do not manage to pass the parameters to my report. The parameters I want to pass are 2 columns in this Multi Record block.
    I created 2 hidden fields on the page P9_PARAMETER1, P9_PARAMETER2 with the same names as my bind variables and fill this in with the values #PARAMETER1#, #PARAMETER2# from the multi record block.
    It seems it does not work as my report stays empty. (also XML file stays empty).
    Am I trying the wrong way?
    Thanks for any advice,
    Kris

    hi khadeer,
         create one report program and write the required code,and call this function module 'SSF_FUNCTION_MODULE_NAME' and give your smartform name  and also when u activate ur smart form u will get one function module call that function module also and specify any tables used...
    i think this solves ur problem...
    any queries revert back..
    pls reward points if helpful,
    shylaja

  • Check box Item property in mutiple record block

    Hi,
    I have migrated a number of forms from 6i to 10g. All seems to be working apart from a problem with the display of check boxes that are part of a multiple record block. The item property for the checkbox has font weight set to bold and this works fine on the 6g version. On the 10g version it is displayed as normal font weight.
    Any other items in the record, text items etc are displayed in bold correctly.
    As this seems to affect a lot of forms is there some patch/fix that I should have applied or is this just the way it is?
    I am trying to use set_item_instance_property to set them manually but that doesn't seem to make any difference.
    Thanks in advance and Happy Christmas/New Year.

    Problem solved following response from Oracle support desk -
    UPDATE
    ======
    Hi Dave,
    When using lookandfeel=generic, the colors for different Windows items (e.g., menu, check
    box, window background ...etc) are taken directly from the Operating System
    (OS) user settings. I tested the issue with lookandfeel=oracle and with
    colorScheme set to different values, and check box tick in this case takes the
    same color as the color scheme used.
    I suggest then using dark color scheme to give you a similar effect as it was in Forms 6i. for example:
    colorScheme=Titanium

Maybe you are looking for

  • Can't see friend on iChat video?

    My friend and I both have new macs, and she is in the northern woods of Wisconsin, but she has internet, and we can connect with video chat, but I can't see her. She can see me though. All I see is myself? Any reason why that would be?

  • Document type issue

    Hi, We use document type SA for multipuspose,customer  to customer balance transfer,adjustment in AR,GL postings e.t.c. Now its requirment to use different document type for customer tranfer posting and related adjustments. I want to know the impacts

  • Finder not working properly, randomly creates a folder called "Name"

    Hello, Finder has all of a sudden started to cause some really odd and sporadic file/folder navigation issues. Whenever I try to access a directory, Finder creates a folder called Name, makes random folders within the directory disappear, or both. It

  • Tree Display

    Hi guys. I want to create a tree display based on the following SAP standard program SAPSIMPLE_TREE_CONTROL_DEMO. Instead of "ROOT" i would like to display all company codes. While clicking the Company Code it should display all the plants under that

  • My Blackberry stop working cause of theme reply ASP PLEASE!!!!!

    Hi! I have a Curve 8520. I installed a new theme today. It was the Beautiful Sunset in motion theme. Since then, when my phone reboots, the theme with its moving water appears, but nothing else works on the phone. None of the keys work and the screen