Need to set attribute of current record based on value in next record

Using Forms 6, I have a form showing a list of records. There can be multiple records with the same ID but having different expiration dates. I need to set attributes to hilite only the record with the latest expiration date. The current list hilites the records with future expiration dates-but we've found that sometimes the subscription is renewed before the old expiration date has been reached, resulting in two records with the same ID having expiration dates in the future.
I can (and do) sort the records by ID & expiration date so the record with the latest expiration date is always the last one for that ID, so what I want to do is check the next record to see whether or not it has a different ID. If it does then the current record has the latest expiration date & should be hilited. Since I might need to hilite the current record I can't simply navigate to the next record which, from the description I've found, is what the next_record builtin does. Does anybody know how I can check a value in the next record without making it the current record?
Thanks.

The database is 10g but I've never heard of the LEAD function before. Now that I've read about it it sounds like I can check the next record using the following:
LEAD(ID,1,0) OVER (ORDER BY ID ASC) NEXT_ID
But I'm not sure where to put this. Maybe create a control item & load the value in the POST-QUERY trigger? I'll give this a try but if you have a suggestion I'd be glad to hear it. Thanks. On second thought I don't think selecting the next ID in the POST-QUERY trigger would work as that would require a complete select statement which would start at the top of the list each time, I think.
Bugger. I can do it in SQL-Plus but I can't see how to incorporate it into the form.
Edited by: user6931915 on May 18, 2011 11:09 AM

Similar Messages

  • Question on charges to set up a Skype number based...

    I need to set up a skype number based in Mexioc (i.e. a Mexican number) but when I go thought the process, Skype tells me that they set their numbers in Mexico using a Mexican Partner (a cable company)  and they ask you to read the partner's Terms of Agreement, which I did and .... I was not clear on the following.... 
    The skype number is $5 / month paid to Skype but the Mexican partner's agreement talks about a cost / THEIR service...  Is this in adition to the $5 dollars charged by Skype?   
    Solved!
    Go to Solution.

    Tylersito wrote:
    I need to set up a skype number based in Mexioc (i.e. a Mexican number) but when I go thought the process, Skype tells me that they set their numbers in Mexico using a Mexican Partner (a cable company)  and they ask you to read the partner's Terms of Agreement, which I did and .... I was not clear on the following.... 
    The skype number is $5 / month paid to Skype but the Mexican partner's agreement talks about a cost / THEIR service...  Is this in adition to the $5 dollars charged by Skype?   
    You don't pay the Mexican provider, you will only pay Skype.  I have had a Mexico City number for several years through Skype, and have only paid Skype for that number.  There are some requirements in the terms of service for the Mexican Skype Numbers where Skype forces everyone to see that agreement. Other parts of that agreement forbid the use of the Mexican number as Caller ID, so that's why Skype never allows the use of a Mexican Skype number as Caller ID when calling from Skype. 
    Good luck!
    Patrick
    Location/Ubicacion: Arizona USA
    Time Zone/Hora Local: UTC/GMT -7
    If this message has adequately addressed your issue, please click on the “Accept as Solution” button. If you found a post useful then please "Give Kudos" at the bottom of my post, so that this information can benefit others.
    Si esto mensaje le ha ayudado, por favor haga clic en "Aceptar como solución". Si encuentra un mensaje útil, por favor "Da Kudos" al final del mensaje, por lo que esta información puede beneficiar a otros.
    I am not a Skype employee. No soy un empleado de Skype.

  • Need to add row and set attribute value on pageload

    Guys,
    On my page based on the pageflowscope variable value, i need to add a row for master and one row for detail viewobject and set attribute values. (Some of the attribute are LOV and Checkboxes as well)
    I am using following code to create records.....records are being added but i am not able to set the attributes
    OperationBinding ob;
    ob = ADFUtil.findOperationBinding("Create");
    ob.execute();
    ob = ADFUtil.findOperationBinding("CreateInsert3");
    ob.execute();
    I am using following code to set the attributes value
    DCIteratorBinding dc1 = ADFUtil.getBindingIterator("firstiterator");
    DCIteratorBinding dc = ADFUtil.getBindingIterator("seconditerator");
    row1=dc1.getCurrentRow();
    row=dc.getCurrentRow();
    row.setAttribute("activest","A");
    row1.setAttribute("type","dc14");
    Anything i am doing wrong here or any suggestion to try is greatly appreciated....

    Vinod,
    Yes commit button is there and yes its also has entry in pagedef...
    When I open the same page on edit mode and i can edit regular record and save them
    Problem is that when i open the page on new mode and try to add rows on page load..... and setting values as described above.... save button somehow doesn't work...
    seems like after i add the rows on the fly, i need to refresh the binding?
    any help is greatly appreciated....
    thank you guys

  • In base component when user change the serial number we need to set date time in Extra attribute filed

    HI Team,
    In ibase component when user change the serial number we need to set date time in Extra attribute filed..if we click edit ,User change serial number after save we need to set date time in  Extra Attribute 4 field .
    Component - PRDGENSET
    In this component there is no attributes,so where we need to implement and how to implement please help.
    Thanks
    kalpana

    Hi Abi,
    Thanks for your reply..see i debugged..i have put break point in method SET_S_STRUCT method if press enter in serial number ,debuggeris triggered..in SET_S_STRUCT method value getting serial number..so how to write the logic here...
    In GET_S_STRUCT method iam getting all attributes  but serial number is not filled..So could you please help here what to do..
    in set_S_STRCUT method value iam gettin serial number...in collection wrapper iam geting zrealtions if i open attributes_ref -if i pass Attribute value in run time its getting displayed.so how to write the logic based on serial  number please help some coding.
    Thanks
    kalpana

  • Current Record Visual Attribute

    Hallo,
    In a Dev.2.1 Form I have defined a Visual attribute (VA01 - black on yellow) and then in a Data Base block I have assigned VA01 to the 'current record' property.
    One item of that block is not a Data Base one. When I scroll the rows of the Base Table only this item isn't affected by the current record visual attribute, i.e. it remains "black on white".
    Anyone kwnows why ?
    Thanks in advance.
    Dino.

    The 'Current record Visual attribute' property of that block is already set to VA01. The point is that all of the items of that block iherit the attribute, except the one I said, which doesn't belong to the base table. I ask if this behaviour is normal, and how to do to have also this item to be affected by the same visual attribute !
    Thanks.

  • EVMNU to set current view based on a cell

    Hi,
    I am trying to set the current view based on an attribute of another dimension.
    If I use EVMNU("SETCV","Set Value","Profit_Center=1220") that works fine but if I point to a cell (this cell contains the attribute value) instead of hardcoding the profit center value, it does not work:
    EVMNU("SETCV","Set Value","Profit_Center=G24")
    Can't you set the current view based on a cell value?
    Thanks
    David

    Nilanjan, I think that's the right idea, but I'm also not sure it will work. It would be better to have your function look like
    =EVMNU("SETCV","Set Value",A1)
    And then in the A1 cell have
    ="Profit_Center="&G24
    Cheers,
    Ethan

  • Web GUI new feature - creating a new record based on the current record

    Vincent,
    We need new feature in Web GUI:
    creating a new record based on the current record with data
    from Moscow with money

    It is already enabled, in the next release.
    If you joint TAB program, the march preview build contains it. User can select 1 or multiple users and make a copy.

  • I need help setting Win7 Advanced attributes for the USB drive connected to my EA4500 router

    I can drill down to the Permission Entry for [foldername] window for a folder on the USB drive. There I learn that user group Everyone does not have the Full Control permission box checked. When I check the box and then click Apply, I get an Error Applying Security window. If I click Continue there, I get a Windows Security window that says "Unable to save permission changes on [foldername]. Access is denied." with no way out but an OK button.
    I have Administrative authority in Win7, but maybe I need to know some Unix voodoo to come to terms with my router-mounted drive. I put the drive on the router to make always available, and I'd like to get it to work. For example, I can't turn the archive bit off for any file or folder on that drive when it's mounted on the router. Not with ATTRIB -A and not with XCOPY /M.
    Just to stuff it in my face, XCOPY /M returns a two-line error message for every sub-folder that exists in the target folder:
    Access denied
    Unable to create directory - foldername
    Help! And thanks in advance.
    :+)
    Solved!
    Go to Solution.

    Bill Dennes,
    (Solutions/Work-Arounds below this paragraph, but sets up some useful information.)
    As for the Security tab, I'm unsure of exactly why it doesn't appear on the tab itself for folders; however, clicking "Advanced -> Change Permissions -> Edit" will display the permissions; although, this doesn't appear to be a part of the problem in a sense. Additionally, “Everyone” always only has read & execute and is also not a part of the issue. To go further with this, the only users that have delete permission are “0” and “root” and since we can delete, we “should” be logged in as one of them and as such have “Full Control.”
    As for the drive type, I'm unsure of why it "changes" it from FAT32 to NTFS (probably something to do with how it handles permissions); however, this is also not a part of the issue.
    I have a flash drive formatted to FAT32, albeit only a 4GB and on an EA6500 with secure sharing enabled, that it does these both to and "xcopy testfolder Y:\ /e /m" works on it when all files and folders have the A attribute; however, disabling secure sharing makes it fail.
    I’ve looked further into this and there are three ways I know of, as of right now, to make copying files with the bat file work for you:
    The first way is to enable secure sharing and map the drives using it, once that is done you won’t need to enter the password again and your script will work as you currently have it coded. Given you have no need for the secure sharing, but it’s a simple solution. This is also the only way to be able to modify any attributes, although the only ones I know of that it will accept are R and A.
    The second way is to instead use ROBOCOPY with the options /e, /m, and /copy:dt.
    For example: "robocopy testfolder Y:\ /e /m /copy:dt"
    /e = Copy subdirectories, including empty ones. (or use /S which will not copy empty folders)
    /m = Copy only files with the Archive attribute and reset it.
    /copy:dt = Copy data and timestamps, does not copy attributes, security, owner info, or auditing info.
    The only important option to use is /copy:dt, the others can be replaced with whatever you need. Note that things like Song Author will still get copied as they are a part of the data section. I don’t believe XCOPY supports doing this, and in either case robocopy is a better solution that comes with Windows Vista and up, and can be gotten for those below Vista.
    The third way is to add a section to the script to remove attributes from all folders before using xcopy to copy to the NAS, or modify the section that is causing the folders to have the A attribute as xcopy will gladly still copy them with /E or /S enabled.
    The issue seems to be that when secure sharing is off, the server refuses attribute changing of folders, which is what is causing XCOPY to fail, as I suspect it attempts to change the attributes on the folders. Similarly, using robocopy without /copy:dt will also fail but gives you “Error 5 … changing file attributes [folder/path] Access is denied”. This is why I suspect that when XCOPY says “unable to create directory” that it is actually trying to change the attributes of the directory. Furthermore, it seems that the reason this works while secure sharing is on is that while it is on, the server pretends to accept the attributes but in reality ignores all attributes besides R. The server then adds the A attribute to all files put onto it, which you can only modify when secure sharing is enabled for some reason. The exception to this is that in either case, any file with the “H” (hidden) attribute, will not be copied, even if explicitly told to copy it. (This is true for both robocopy and xcopy; you also cannot manually add it afterwards.)
    Is there an issue with the files on the NAS having the A attribute? If so the only way I currently know of to get rid of it is to enable secure sharing and have the script remove the attribute after copying. For example, when you look at the permissions, the user "0" and “root” have full control as I've previously stated. You can tell Windows to specifically use one of them when mapping the drive, which in turn should give you full control; however, the server still refuses modifying attributes without secure sharing on for some strange unknown reason. Although, I am no "UNIX gearhead," so there may in fact be another way that I do not know of. The only time they are not listed as “Full Control” on my end is when a file was previously marked Read-Only, in which case they all share the same limited control. When I said in the beginning that the permissions are not a part of the problem in a sense, it’s more of that for the general case of what you need to do, they aren’t the problem as long as you don't need the R attribute and having the A isn't an issue, as it seems to be more of the server is refusing attributes even though we should have permission; however, they do appear to be a bit weird and are possibly displaying incorrect when secure sharing is disabled.
    I'd like to apologize in advance for any unclear, weirdly stated, or just plain odd things said in this post as I was pulled away to do a bunch of things and ended up editing, adding things, and finishing it late into the night and hope that one of the above is an acceptable resolution to your issue.

  • Help to set value of an attribute based on value selected in another field

    Hi all,
    I want to set the value of an attribute STRUCT.ITM_TYPE to a default value whenever i select one of the value from dropdown list in LC_STATUS.
    I tried to add an event in the get_p method of the lc_status but there i cant able to access the context of the ITM_TYPE as the fields are in different views.
    Please Help,
    Rewards will be awarded.
    Naveenn

    Hi Vineet,
    Thanks for the suggestion.
    Please chech my code and suggest me for any corrections.
    In the Get_P_LCSTATUS method of Context Node BTADMINH in View1.
    METHOD GET_P_LCSTATUS.
      CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
        WHEN if_bsp_wd_model_setter_getter=>fp_server_event.
          rv_value = 'ACT_STATUS_SELECTED'.
      ENDCASE.
    ENDMETHOD.
    In event handler method in Context Node BTADMINI in View2
    method EH_ONACT_STATUS_SELECTED.
    * Added by wizard: Handler for event 'ACT_STATUS_SELECTED'
    data: lr_ent1 type ref to cl_crm_bol_entity,
             lr_ent2 type ref to cl_crm_bol_entity.
    lr_ent1 = me->typed_context->BTADMINH->collection_wrapper->get_current( ).
    check lr_ent1 is bound.
    * To Get Value of First Attribute
    lv_attr1 = lr_ent1->get_property_as_string( 'LC_STATUS' ).
    * To Set Value of 2nd Input Field now based upon this value
    lr_ent2 = me->typed_context->BTADMINI->collection_wrapper->get_current( ).
    *lr_ent2->lock( ).
    lr_ent2->set_property_as_string( iv_attr_name = 'ITM.TYPE'  iv_value = 'RREQ' ).
    endif.
    endmethod.
    but during syntax check its showing error messge as BTADMINH is unknown.
    2) How and where to bind the context node in custom controller.
    Please help.

  • Set current record to uppercase

    Hi,
    How can i set a particular item in the current record to uppercase at runtime.
    Set_item_property is setting the item
    in all the records to uppercase.
    Thanks in advance.
    Phebe

    If you just want the value to be in upper case you can code a trigger to do this for you in when-validate-item or post-change.
    Just do it manually without a builtin .

  • I just got my daughter a new macbook pro. She currently shares my wires apple id for iTunes on her iTouch. I need to set up an email account for her. Is there any way to set up a new iCloud email account but still use my wires apple id for iTunes?

    I just got my daughter a new macbook pro. She currently shares my wifes apple id for iTunes on her iTouch. I need to set up an email account for her. Is there any way to set up a new iCloud email account but still use my wifes apple id for iTunes?

    No it's not stealing. They have an allowance that you can share with so many computers/devices. You'll have to authorize her computer to play/use anything bought on your acct. You can do this under the Store menu at top when iTunes is open on her computer.
    As far as getting it all on her computer....I think but I am not sure (because I don't use the feature) but I think if you turn on Home Sharing in iTunes it may copy the music to her computer. I don't know maybe it just streams it. If nothing else you can sign into your acct on her computer and download it all to her computer from the cloud. Not sure exactly how to go about that, I haven't had to do that yet. I wonder if once you authorize her computer and then set it up for automatic downloads (under Edit>Preferences>Store) if everything would download. Sorry I'm not much help on that.

  • Is there any way we can set default value for a Date Attribute to current date in Master Data Services

    Is there any way we can set default value for a Date Attribute to current date in Master Data Services.
    I as well wants to know that is there any posibility to show Calendar control while input data into respective date attributes.
    Thanks.

    Hi Anagha,
    So far i havent found any way to set todays date by default from MMI, but i guess this flow should work as workaroud
    1. Add buisness rule which can set a default value when Date = NULL/Blank
    2.get the entity table ,use -select EntityTable from mdm.tblEntity where Name = '<enter entity name>'
    3.Go to that table and add a after update trigger like
    if uda_<entityid>_<attributeid(Date attribute)> = default value
    update uda_<entityid>_<attributeid(Date attribute)> =getdate() where id = <LastUpdatedRow>
    I will check on this too from my side.
    By the way AFAIK i dont think so calendar control integration is possible .

  • I lost my iphone4 and replaced it with a 4s. It's been a year since my last sync. Do I set up my phone as "new" or "restore from backup?" Im hoping game center will automatically have a current record of game data...please help or advise.thx

    I lost my iphone4 and replaced it with a 4s. It's been a year since my last sync. Do I set up my phone as "new" or "restore from backup?" Im hoping game center will automatically have a current record of game data...please help or advise.thx

    Restore from backup.

  • Set current record after dataset filter or sort

    How do you set the current record as the first record after a
    filter or sort? I have multiple dataset filters and sorts on the
    page and the current record always remains the first record after
    using them. Is there a way to force the current(viewed product,
    picture or whatever) to the first record after the Filter has been
    completed?

    thanks for your help,
    I was wanting the latter, "Or were you asking how to make the
    first row of the filtered data selected?" After the filter runs I
    want the current record set (to be displayed) to the first record
    in the filtered data.
    I am using the non-destructive filter method filter(), so I
    dont have to reload the data to bring the dataset back to original
    data, I can provide a reset button or set back to all records
    button.
    What I am using this for is a Home/Standard Plan Catalog. I
    want to filter our plans by square footage, number of bedrooms or
    baths, garage size, etc. so initalally it loads the complete
    catalog. the user selects the square footage range they want or any
    combination of specs and the filter works to narrow the dataset to
    the appropriate records. The filter works fine it returns the
    correct records from the dataset but after the filter I want the
    current (displayed) record to change after the filter, to the first
    record in the newly filtered data.
    Eventually we are going to have all 200 or so standard plans
    we have in the dataset and giving the user the ability to filter by
    these specs is the ultimate goal to help our customers make
    decisions. The page loads thumbnails of the exterior renderings for
    each standard plan. they click the thumbnail and it opens. With 200
    or so eventully I will have to page the results of the dataset or
    something else eventually, but I will cross that bridge when I get
    too it.
    here is my filter:
    >>>>>>>>
    function StartFilterTimerALL(){
    if (StartFilterTimerALL.timerID)
    clearTimeout(StartFilterTimerALL.timerID);
    StartFilterTimerALL.timerID = setTimeout(function() {
    StartFilterTimerALL.timerID = null; FilterDataALL(); }, 100);
    function FilterDataALL(){
    var SqFtVal = document.getElementById("sqft").value;
    if (!SqFtVal){
    dsStandards.filter(null);
    return;
    // for each value get the matching records sqftage
    if (SqFtVal == 1){
    var filterFunc = function(ds, row, rowNumber){
    var str = row["sqftage"];
    if (str < 1000)
    return row;
    return null;
    dsStandards.filter(filterFunc);
    if (SqFtVal == 2){
    var filterFunc2 = function(ds, row, rowNumber){
    var str = row["sqftage"];
    if ((str > 1000) && (str < 1501))
    return row;
    return null;
    dsStandards.filter(filterFunc2);
    if (SqFtVal == 3){
    var filterFunc3 = function(ds, row, rowNumber){
    var str = row["sqftage"];
    if ((str > 1500) && (str < 2001))
    return row;
    return null;
    dsStandards.filter(filterFunc3);
    if (SqFtVal == 4){
    var filterFunc4 = function(ds, row, rowNumber){
    var str = row["sqftage"];
    if ((str > 2000) && (str < 2501))
    return row;
    return null;
    dsStandards.filter(filterFunc4);
    if (SqFtVal == 5){
    var filterFunc5 = function(ds, row, rowNumber){
    var str = row["sqftage"];
    if ((str > 2500))
    return row;
    return null;
    dsStandards.filter(filterFunc5);
    thanks Jim

  • I have a Steinberg MI4 and a Roland Fantom X7, and am trying to use my Fantom in Logic to record audio. Need help setting it all up using MIDI cables. Please help !

    I have a Steinberg MI4 and a Roland Fantom X7, and am trying to use my Fantom in Logic to record audio. Need help setting it all up using MIDI cables. Please help !

    Encryption wouldn't matter except for Wifi.
    While 10.2 might help, there's not much you can do on the Internet these days with less than 10.4.11
    Tiger Requirements...
    To use Mac OS X 10.4 Tiger, your Macintosh needs:
        * A PowerPC G3, G4, or G5 processor
        * Built-in FireWire
        * At least 256 MB of RAM (I recommend 1GB minimum)
        * DVD drive (DVD-ROM), Combo (CD-RW/DVD-ROM) or SuperDrive (DVD-R) for installation
        * At least 3 GB of free disk space; 4 GB if you install the XCode 2 Developer Tools  (I recommend 20GB minimum)
    http://support.apple.com/kb/HT1514
    http://www.ebay.com/sch/i.html?_nkw=mac+os+x+tiger+retail+10.4
    See Tom's, (Texas Mac Man), great info on where/how to find/get Tiger...
    https://discussions.apple.com/message/15305521#15305521
    Or Ali Brown's great info on where/how to find/get Tiger...
    http://discussions.apple.com/thread.jspa?messageID=10381710#10381710
    As far as Memory, that's sort of easy, find your eMac here...
    http://eshop.macsales.com/MyOWC/Models.cfm?Family=emac&sType=Memory
    As far as Hard Drive, it's not easy to replace the Internal drive, I'd maybe suggest an external Firewire drive to boot from...
    http://eshop.macsales.com/item/Other%20World%20Computing/MAU4S7500G16/

Maybe you are looking for

  • HOW DO I TRANSFER PC ITUNES FILES FROM WESTERN DIGITAL EXTERNAL HARD DRIVE TO NEW MACBOOK PRO?

    I AM VERY EXCITED ABOUT MY NEW MACBOOK PRO AND ITS SUPPOSE TO BE HERE TOMORROW! THERE IS ONE MAJOR CONCERN I HAVE THOUGH, I HAVE ALL MY MUSIC FILES ON MY WESTERN DIGITAL ELEMENTS HARD DRIVE (1TB). THE HD IS FORMATTED FOR WINDOWS THOUGH. I WATCHED YOU

  • ImageIO PNG Writing Slow With Alpha Channel

    I'm writing a project that generates images with alpha channels, which I want to save in PNG format. Currently I'm using javax.ImageIO to do this, using statements such as: ImageIO.write(image, "png", file); I'm using JDK 1.5.0_06, on Windows XP. The

  • SWT Error occured in OSB project

    When I import OSB project in workshop and tried to see params in stage "service callout" a get "SWT Error occured" [img src=http://f3.s.qip.ru/56TNXCPS.jpg] and can't see params. If to create in workshop new service callout - everything is ok. Any id

  • Conversion mapping is losing time zone data during daylight saving time

    We have a problem with conversion of Calendars to timestamp with timezone for the last hour of Daylight Saving Time (e.g. 01:00 EDT - 01:59 EDT) where it is being interpreted as Standard Time which is in reality 60 minutes later. We've written a JUni

  • I just talked to an apple representativ and.....

    she told me..because i ordered my nano last night...it would come with a pouch that did not protect the nano very well...but she told me that the material that the nano was being made with was replaced with a " new space age " material that would pre