How to make item references dynamic in my trigger [SOLVED]

Hi. I have a Key-List-Item trigger on my form for a date item named bundle_exceptions.actual_dt. This trigger code is displaying a calendar when the user performs a key-list-item action on this date item. Throughout this code there are hardcoded references to my item in two different ways:
1) :bundle_exceptions.actual_dt
2) 'bundle_exceptions.actual_dt'
Since I have multiple date items on my application I would like to know if I can make this code more dynamic. Since the cursor is sitting on the item at the time, I thought I could reference :system.current_block and :system.current_item. But I can't seem to get the syntax correct. And to complicate things, I'm even more confused as to how I could get these system variables to match the two difference ways the item is referenced in the code (see above).
I would love some help or advice on solving this issue. I really don't like the idea of copying and pasting this code to every date item I have on my form. Thanks in advance.
========= CODE =============
date_lov.get_date (nvl(:bundle_exceptions.actual_dt,sysdate),
'bundle_exceptions.actual_dt',
(get_item_property('bundle_exceptions.actual_dt',x_pos) - x_adjust),
(get_item_property('bundle_exceptions.actual_dt',y_pos) - y_adjust),
'Calendar',
'OK',
'Cancel',
TRUE,
FALSE,
FALSE);

Here's what I ended up with. I never could get the Name_In and Copy built-ins to compile because of syntax errors. I'm sure this was my own doing...but I just couldn't do it.
Anyhow, this code is working for me know. Thanks so much for all the input.
========= CODE =========
PROCEDURE Call_Calendar_Popup (for_this_item in varchar2) IS
     y_adjust number := 1.6; -- this is the height of the popup box
     x_adjust number := 1.8; -- this is the width of the popup box
begin
-- Depending on whether this proc is called from the item itself (say a key-list-item trigger) or
-- from another item (say a when-button-pressed trigger) the cursor may first need to be moved to the
-- item we want to populate from the calendar
if upper(:system.current_block||'.'||:system.current_item) <> upper(for_this_item) then
     go_item(for_this_item);
end if;
-- if the items xpos (horizontal) is closer to the edge than the pop ups width push it over to the right.
if get_item_property(:system.current_block||'.'||:system.current_item,x_pos) < x_adjust then
     x_adjust := to_number(get_item_property(:system.current_block||'.'||:system.current_item,x_pos));
end if;
-- if the items ypos (vertical) is closer to the edge than the pop ups height push it down.
if get_item_property(:system.current_block||'.'||:system.current_item,y_pos) < y_adjust then
     y_adjust := to_number(get_item_property(:system.current_block||'.'||:system.current_item,y_pos));
end if ;
-- popup the calendar so the user can populate the date text-item
date_lov.get_date (nvl(Name_In(':'||:system.current_block||'.'||:system.current_item),sysdate),
'bundle_exceptions.actual_dt',
(get_item_property(:system.current_block||'.'||:system.current_item,x_pos) - x_adjust),
(get_item_property(:system.current_block||'.'||:system.current_item,y_pos) - y_adjust),
'Calendar',
'OK',
'Cancel',
TRUE,
FALSE,
FALSE);
end;

Similar Messages

  • How to make items in ForEach issues partial trigger

    I have a list of command links, from which i want to partial trigger other parts of the page. is it possible?
    How does the receiving component know which id to use?
    Thanks,
    Josh

    Hi,
    I tried accesing the Lotus Notes Portlets with some Calendar entries which have different event start datetime values and duration values. And, the Calendar Portlet displays the entries in the order of the event start datetime.
    Please check, if the Calendar items are shown as sorted in the standard Lotus Domino Web Client because, the display in the portlets is as per the Lotus Domino Web client display.
    regards,
    Geeta

  • How to make External Reference number and Ref Date Mandatory in Complaints

    Dear Experts,
    Greetings!!!.
    How to make External Reference number (EXT_REF_NUMBER ) and Ref Date ( EXT_REF_DATE ) Mandatory in Complaints.
    Regards,
    Sany

    HI,
    You can use Incompleteness Procedure to make those fields mandatory in complaint transaction.
    Regards,
    PP

  • How to make links in dynamic text?

    Hi All,
    I need to know how to make links in dynamic text. I have
    created a
    table to hold the dynamic copy, and the copy is added through
    a CMS page
    that I created. This Admin page is accessed through a
    browser, and I
    don't know how to attach a link to selected text within a
    browser. Can
    anyone point the way? It's probably so easy I'll feel dumb.
    Thanks,
    Brett

    "Brett" <[email protected]> wrote in message
    news:fpf7j6$23m$[email protected]..
    > Thanks Hunter,
    >
    > Yes, I suppose a legend on the admin page would provide
    a solution. And
    > ultimately, if the client doesn't feel confident doing
    writing the HTML
    > they would have to pay me to do it for them. OK, that
    works for me.
    The only other thing might be to use something like FCK (or
    one of the many
    others... ContentSeed, I think is one Murray mentions often)
    for the CMS,
    that would give an easier option for the end user. WebAssist
    has an
    FCK-based plug-in called iRite that can give a more
    wordprocessing-like feel
    to the field (i.e., they could just highlight the text and
    then click a
    button to add the link).

  • How to make a form Dynamic(Serious Issue)

    Hi,
    I have a problem.
    How to make an Interactive form Dynamic while saving it in NWDS(NetweaverDeveloperStudio).
    Helpful answer is highly rewarded and Highly Appreciated.

    Hello Sankar,
    Do the following:
    1) In your Adobe Livecycle Designer, Select, Edit > Form Properties, in the Default tab, set u201CPreview Typeu201D to u201CInteractive formu201D
    2)
    Assuming you are using Web Dynpro application, then do the following also:
    Place the following code in the wdDoModifyView method of the View where the form is placed.
              IWDInteractiveForm iForm1 = (IWDInteractiveForm) view.getElement("<name of your form here");
              iForm1.setDynamicPDF(true);
    Hope this helps,
    Harman

  • [AS] How to make cross reference at insertion point

    Hi,
    I have a book ("indb") including several documents with several "anchors"
    (german translation: "Textanker") where cross references from different documents are linked to.
    What I already got is to reference all anchors and collect them in a list.
    Now I would like to make a new cross reference at the insertion point
    in a text frame of the active document - can't get it to run :-(
    Is anybody out there who can post a AS-sample doing this?
    Thanks in advance!
    Here is the reference to an already existing anchor:
    {hyperlink text destination id 44155 of document "kapitel 2.indd" of application "Adobe InDesign CS4"}
    The code I tried to make a new cross reference looks like this - but of course doesn't work:
    tell application "Adobe InDesign CS4"
    tell active document
    make new hyperlink with properties {name:"new hyperlink", destination:hyperlink text destination id 44155 of document "kapitel 2.indd"}
    end tell
    end tell

    Thanks a lot - got it now!
    Maybe it could be helpful for others to look at your answer  
    with the placeholders replaced by "real" strings as it was hard for me
    to figure out the right form:
    tell document 1
    set theDest to make hyperlink text destination with properties {name:"Some name", destination text:<a reference to the relevant text>}
    this line for example looks like this =>
    set theDest to make hyperlink text destination with properties {name:"Some name", destination text:insertion point 902 of story id 44083 of document "kapitel 3.indd" of application "Adobe InDesign CS4"}
    set theSource to make cross reference source with properties {name:"Some name",source text:< reference to the relevant text>}
    this line for example looks like this =>
    set theSource to make cross reference source with properties {name:"Some name", source text:cursorPosition, applied format:cross reference format id 44305 of document "kapitel 1.indd" of application "Adobe InDesign CS4"}
    where "cursorPosition" was defined before by
    set cursorPosition to object reference of selection
    (the cross reference source needs the applied format reference too)
    make hyperlink with properties {source:theSource, destination:theDest, visible:true, highlight:invert, width:thick, border color:dark green, border style:dashed, name:"Whatever" }
    this line for example looks like this =>
    make hyperlink with properties {source:theSource, destination:hyperlink text destination id 44184 of document "kapitel 3.indd" of application "Adobe InDesign CS4", border color:black, highlight:none, border style:solid, hidden:false, visible:true, width:thin}
    end tell

  • How to make the Reference field in the in Accounting Tab a required field.

    Hi,
    Can i make the REference field in the Accounting tab required. I want to enter contract number from RE in that field.
    Thank you.
    Rachelle

    Hi,
    Goto t.code OVA2 select A-sales header and then click on procedures in the left--> select the procedure in which you want to incolude this field and new entries the table name is VBAK and field is XBLNR for the reference field in the accouting tab and accordingly assign the status 01 or 02 as per your requirement.
    Then you need to assign the incompletion procedure to the sales document type in VOV8.
    Regards,
    Gopal.

  • How to make a form dynamic so that it displays different logos at runtime

    I am working on some assignment wherein I would like to make a form dynamic so that in it's designated image holder it displays different logos/pictures at run time? First of all is there such a possibility?? I am still very new to this forum and also trying to understand the logic/bindings/heirarchy etc. in LCD. Any input would be highly appreciated.
    Thanks in advance

    LC 7 or 8 does not help load logs at runtime. However you can associate all your logs at design time and control their visibility property based on the events. This may help fulfill the requirements you have to an extent however adding number of images at design time will increase the size of the template.

  • How to make a graph dynamic data driven? Plus some XML basics for Illustrator?

    I need to make some graphs that are linked to a series of data through XML files (originally Excel) and create an indvidual document for each data set. They will be used for the web and print. Please advise.

    Tis is what you can do you create say your chart or your data say in Excel and you export ast Tab Delineated Text.You can then import that data for a chart with the import chart feature it is the first icon on top of the chart data window then you can make the chart dynamic asa variable and capture the data set then import another chart's data as txt as you did before then capture that as a data set abnd so on if you have then ten data sets each one will correspond to the one you need you can name the data sets so you can easily call up the one you need.
    I never made a chart in excel or imported such data before a few minutes ago nor have I a=ever made a variable of a chart but this all works pretty reasonably.
    More advance than this I would have to experiement but you can export the variable libraries and open them in Illustrator and figure it out for a way to load or export the excel info so it opens as a chart in Illustratorbut Illustrators charts are kind of primitive so donot expect much without a script to help you.
    Perhaps you can figure out an actiopn toautomate the process?

  • How to make one-option dropdown list partial trigger?

    There are two dependent dropdown lists. when list one is selected, the other one will get the SelectItems according the value of list one. My question is: when there is only one selectiem in list one (and the hint 'Please select one..."), how to make it partial trigger in the second time? e.g. I first login and select the ONLY one choice in List one, and the List two gets the values. but the data in datasource updated, so I want to choose the List one again, and make the List two get the new values.

    Hi,
    create a JSF binding (Bindings property on the list component) to a managed bean. The in the code that would trigger the PPR, call
    AdfFacesContext.getCurrentInstance().addPartialtarget(theListBindingName);
    If you have a refresh button, then you could use declarative PPR
    Frank

  • HOW TO MAKE ITEM UPDATABLE/NON-UPDATABLE DYNAMICALLY

    Hi ,
    I have a form with tabular layout on a multi record lock .
    From shows 20 records at a time and there is a scroll bar to scroll down .There is an item "flag" in the block which is not visible in the form with values "Y" or "N" .
    I need to make some text items in the record updatable when that record has "flag" ="Y" .Documentation say's we need to use set_item_instance_property to do that .
    I tried it in when-new-record-instance,pre-query and key-exeqry triggers with no luck .
    I would really appreciate if you could give me the following info
    1) How to loop through each record in a block to check value of "flag"
    2) Which trigger to use and level form,block etc .
    Thanks,

    Ram,
    Thanks for the update . Now it works . Another problem though ...
    My form displays 20 records at a time and I have a scroll bar .
    I need to change the background of Item to white when it is updatable and gary when it is not updatable .
    I've created a visual attribute and was using it with set_item_instance_property like this ..
    declare
    last_rec number;
    begin
    last_record;
    last_rec := :system.cursor_record;
    first_record;
    for i in 1 .. last_rec
    loop
    if :ANNUAL_FUNDS.flag != 'Y' then
    begin
    Set_Item_Instance_Property( 'EXP_FUNDS', CURRENT_RECORD, UPDATE_ALLOWED , PROPERTY_FALSE);
    Set_Item_Instance_Property( 'EXP_FUNDS', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'VI_UPDATE');
    end;
    end if;
    if :system.last_record = 'TRUE' or i = last_rec then
    exit;
    else
    next_record;
    end if;
    end loop;
    FIRST_RECORD;
    end;
    When I took out the loop the way you've mentioned
    it's changing the background color of the item for the record in which cursor is in . Users want to look at the screen in a glance and go directly to the item which is updatable .
    Is there any way we can loop through all records once and change properties in one shot ?
    Sorry to bother you,
    Asha

  • How to make preceding reference mandatory

    Hi gurus,
    could you please help in the following question.
    It's necessary to make impossible creation of operation (for example Sales order) without reference to a preceding document (another Sales order).
    There are fields in Definition of Item Categories:
    Preceding Ref. Object
    Preceding Ref. Mandatory.
    F1 says that these fields control whether an item must be created with or can be created without a certain preceding reference item.
    Seems like that must help me. But unfortunately these settings change  nothing - it's still possible to create SO without any reference.
    Could you please advise something? May be there are any other settings or is it program bug?
    Thanks in advance, Sunny.

    Sussie
    The config to maintain the preceding reference mandatory can only be maintained on the item category.
    Maintain the following setting for all the item categories used in the Sales order:
    Preceding Ref. Mandatory = Check
    Preceding Ref. Object Type = BUS2000131 (e.g. for Sales item this should match the Object Type of the item category)
    With the above config the user might still be able to create the following sales order document but without any items.
    Points to consider:
    1. Follow-up Sales order (ZTA2) should have different transaction type and item categories
    2. No copy control should be maintained for original sales order (ZTA1) to itself. This means in config "Define Copying Control for Transaction Types" there should not be entry ZTA1 -> ZTA1. So that you cannot create a follow-up to sales order with the same order type.
    I hope this helps.
    Regards
    Rupesh Patil

  • How to make the fields dynamic read only in live cycle designer

    hi folks
    I have created a form in Adove livecycle es. Some fields should be read only from the start. So i have set the property .access 'open'. In versions of Adobe 8 this works, but in the latest version  it won't so i think it should be done via another solution. Does anybody know how?
    kind regards,
    Anton Pierhagen

    May be the below code may help.. It loops thru all the pages in the PDF form and make them protected. So the user can not change any value in the form.
    for (var i = 0; i < xfa.host.numPages; i++)
    var oFields = xfa.layout.pageContent(i, "field");
    var nodesLength = oFields.length;
    //set the access type to be protected for all fields
    for (var j = 0; j < nodesLength; j++)
    var oItem = oFields.item(j);
    oItem.access = "protected";
    Thanks
    Srini

  • CCM - How to make items in one category to be sorted as expected?

    Hi,
    I'm searching for a way to sort items in one category in CCM, so that when end users open Catalog via SRM, click into the category, they can see some items on top of the list automatically.
    I had thought the items should be sorted by Item Valuation and also tried to upload items in CCM in the order I wanted. But when I created shopping cart as an end user to connect to catalog, the order of the items are totally different. And I even could not tell how the items are sorted, it seems it's not by item valuation, not by item description, not by price, not by anything... Is it that in the catalog search engine the items are not sorted at all?
    Can somebody share with me how I can realize that? Many thanks!
    Best Regards,
    Elly

    Hi Elly,
    You can use the information [here |http://help.sap.com/saphelp_ccm20/helpdata/en/3f/3166e98d564c45ba9385187d7cc3cb/content.htm]to determine the sort order of characteristics, this is all that can be effectively maintained.
    Regards,
    Jason

  • How to make items in a list word wrap as needed and be variable heights

    I am trying to build a custom itemrenderer for the List control.  The items in the list are variable lengths of text, some of the text items will have different colors determined at runtime base on some criteria (this works fine now with my custom itemrenderer).  What I need is for the items to word wrap, and therefore for the list to display items of varying heights.  Is this possible to do?  All my attempts seem to have failed.  If I can't do this with an item renderer any suggestions about how to do this?  Thanks very much in advance to any of you gurus who are able to help me.

    Trick here is not to specify any height for the renderer so that Flex will determine the height according to the content. Also set the variableRowHeight="true"
    Here is a simple example
    <mx:ArrayCollection id="dp">
            <mx:Array>
                <mx:Object label="some very long text"/>
                <mx:Object label="some very loooooooooooooooooooooooooooooooooong text"/>
                <mx:Object label="some very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text"/>
                <mx:Object label="some very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text"/>
                <mx:Object label="some very long text"/>
            </mx:Array>
        </mx:ArrayCollection>
        <mx:List dataProvider="{dp}" variableRowHeight="true">
            <mx:itemRenderer>
                <mx:Component>
                    <mx:Canvas width="100%">
                        <mx:Text width="100%" text="{data.label}"/>
                    </mx:Canvas>
                </mx:Component>
            </mx:itemRenderer>
        </mx:List>

Maybe you are looking for

  • Disappearing mailboxes after import from iMac (10.7.5) to MBP (10.8.4)

    I've been using an iMac (OS X 10.7.5, Mail v 5.3) for all mail functions for years and recently bought a refurb MacBook Pro Retina (OS X 10.8.4, Mail v 6.5). I set up the MBP to import all applications, files, accounts, etc., from the iMac. This all

  • Ram not showing up as full ammount.

    Hi, I have the late 2004 ibook (30gb, 1.2ghz) with 1.25 GB ram. However now when I look at the info, only 768MB show up? I have taken out & re-inserted the Ram as well. Also I have been having power issues. I have reset the PMU, however it seems to n

  • Static NAT for FTP access

    NAT overload has been done successfully as follows: 1. ip nat inside and ip nat outside configured on the appropriate interfaces i.e.fa0/0 and fa0/1 2. default route added on the router. 3.additional configuration is added: ip nat inside source list

  • Error in Test Connection through the DQE for my JDBC system

    Hi, I created a JDBC system and I gave DQE properties to connect to the PUBS database. I am getting the below error when I did Test Connection through the DQE. Test Details: The test consists of the following steps: 1. Checks the existence of a backe

  • Problem saving Droplet in CS4

    I created a droplet that works fine. It is specifically for vertical images and saves them as a jpg. In naming the droplet I tried to abbreviate "vertical" with "vert.", and followed that with jpg to reflect the fact that the image would be saved as