Help needed in list item...need to display employee of a selected dept

Hi All,
I am very beginner in D2K technology.I am using 10g Forms.
Could you please help me...
I have created a list item which contains dept_id=10,20,30....
My requirement is when i will change the value of dept_id(select dept_id=20),the employees belong to that dept will display(need to display 5 employees of dept 20).
I hav created two block--block2 and block3
In block2,there is a list item
In block3,there is a display item and i changed the properties number of record displayed to 10 of the block.
I atteched a trigger when-list-changed and the code is :
select last_name into :block3.item14 from employees where department_id=:block2.item4;
But It is not working.....
Thanks in Advance,
Tapan.
Edited by: user630863 on Aug 8, 2010 9:20 PM
Edited by: user630863 on Aug 8, 2010 9:55 PM

okk..well still i don't know the purpose of the form on which you are working why not the database block for emp?..but the requirement you are asking can be done through following code...
Trigger - WHEN-LIST-CHANGED
DECLARE
  CURSOR F_Cur IS
    SELECT ename
    FROM emp
    WHERE deptno = :list_item_name;
BEGIN
  GO_BLOCK('BLOCK3');
  FIRST_RECORD;
  CLEAR_BLOCK;
  FOR G_CUR IN F_CUR LOOP
    :block3.item_name:=G_CUR.ename;
    NEXT_RECORD;
  END LOOP;
  FIRST_RECORD;
END;
Note: in the BLOCK3 there should be one item navigable by cursor. I mean if block3 is having only one item which is name item and it is display item then GO_BLOCK built-in will not work. So, you will need to create one more in block3 or make that name item as text item and set update_allowed to NO from the items' property.
-Ammad

Similar Messages

  • Help: set the list item when scrollbar scrolls

    i need help regording how to set the listbox list item to be selected (i.e. item to be highlighted) when the vertical scrollbar scrolls.

    Hi Shreyas,
    You can insert the code below into the NewForm.aspx page of the list via a Script Editor web part:
    <script type="text/javascript">
    _spBodyOnLoadFunctionNames.push("ready");
    function ready()
    //12/04/2015 - 18/04/2015
    var sd = "";
    var ed = "";
    var d = new Date();
    //get start date of the week
    d.setDate(d.getDate() - d.getDay());
    sd = convertDate(d);
    //get end date of the week
    d.setDate(d.getDate() + (6 - d.getDay()));
    ed = convertDate(d);
    //populate the string into the Title field
    var title = document.querySelector("input[title='Title']");
    title.value = sd+" - "+ed;
    function convertDate(inputFormat) {
    function pad(s) { return (s < 10) ? '0' + s : s; }
    var d = new Date(inputFormat);
    return [pad(d.getDate()), pad(d.getMonth()+1), d.getFullYear()].join('/');
    </script>
    It will populate the “Title” field with the text like “12/04/2015 - 18/04/2015” based on current date when adding a new item in this list in the NewForm.aspx page:
    Here are two links about how to add code into page via Content Editor Web Part:
    http://blogs.msdn.com/b/sharepointdev/archive/2011/04/14/using-the-javascript-object-model-in-a-content-editor-web-part.aspx
    http://sharepointadam.com/2010/08/31/insert-javascript-into-a-content-editor-web-part-cewp/
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to download list item attachment from display.aspx

    Im uploading documents
    to list item in list by
    using file upload control. Now I should download that file. I can able to insert documents into list item in attachment column which is predefined but am how can I download the attachments by clicking on the link in display.aspx.
    I have written this for uploadFile controller.
    SPSite site = SPContext.Current.Site;
    SPWeb web = site.OpenWeb();
    SPList list = web.Lists["list2"];
    //SPListItem itemId = list.GetItemById(5);
    int itemId=3;
    SPListItem newItem = list.GetItemById(itemId);
    byte[] contents = null;
    if (FileUpload1.PostedFile != null && FileUpload1.HasFile)
    using (Stream fileStream = FileUpload1.PostedFile.InputStream)
    contents = new byte[fileStream.Length];
    fileStream.Read(contents, 0, (int)fileStream.Length);
    fileStream.Close();
    SPAttachmentCollection attachments = newItem.Attachments;
    string fileName = Path.GetFileName(FileUpload1.PostedFile.FileName);
    attachments.Add(fileName, contents);
    newItem["CLMSAttachments"] = fileName;
    newItem.Update();
    Thanks in advance.

    Hi ,
    It is your browser that decides to download/open the file.
    If you have compatible client software for the file (word for docx) your computer will by default automatically try to open it.
    But we can force the download. You have to develop a handler/aspx page that will just handle the file download and you have to override the http header "content-disposition" to "attachment;filename=yourfilename"
    Here a sample :
    var fileName = "myfile.sql";
    var r = context.Response;
    r.AddHeader("Content-Disposition", "attachment; filename=" + fileName);
    r.ContentType = "text/plain";
    r.WriteFile(context.Server.MapPath(fileName));
    Hope that will help you
    Moudhafer

  • Help with Multiselect List Item

    Assuming one employee can work for multiple departments, I want to display the departments employee 7844 works for preselected in a multiselect list.
    I am using the following query statement in a report region.
    select htmldb_item.select_list_from_query_xl(1, deptno ,'select DEPTNO,DNAME from scott.dept ','MULTIPLE HEIGHT=25', 'Y',null,null,null,'Department',null) a from scott.emp where empno = 7844
    The result I am seeing is a multiple multiselect lists with one department selected in each list.
    How should I modify the query to get what I want?
    Thanks
    Mina

    Hi Carlos,
    I set up a test case in exactly the same way and it worked fine for me. I created a page item called P1_DA_DEMO and added some static select list values then added some help text. The settings I used are below, I suggest you try again but also make sure you have no other Javascript errors on the page. Use a tool like firebug to check.
    Name : Dynamic Action Demo
    Sequence: 10
    Even: Click
    Selection type: Item(s)
    Item(s): P1_DA_DEMO <- a selection list item
    Condtion: - No Condition -
    True Actions
    Sequence: 10
    Action : Execute JavaScript Code
    Fire when event result is :True
    Fire on page load: Not Ticked
    Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')
    Event Scope set a s Bind.
    Thanks
    Paul

  • Help with copy list item workflow in SPD 2013

    Hello
    i just can't find anywhere to help me on the web with workflows, I am very new to this.
    I have 2 custom lists.
    First list, 3 columns:
    'date received' (date)
    'student name' (text field)
    'hearing' (yes/no)
    When a new item is added, I enter text for student name and the date. Then I set 'hearing' to yes or no. 
    If yes, I would like a workflow to copy the student name for to the second list.
    In the second list, I have 2 columns (so far):
    'student name' (text field)
    'student number' (text field)
    I just have no idea where to start to do this. Could someone please help?
    Thanks.
    Mel

    Hi ,
    If you mean that you don't want to create duplicate items in list2 when you edit the item in list1 mutiple time, you can try adding another "if" condition contained within your above "if" block to determin if the current
    item "student name" equals to "student name" from list2, if yes then update the that item in list2, if no, then crate a new item in list2.
    Thanks
    Daniel Yang
    TechNet Community Support

  • Help me update list item by workflow

    The First My boss make an mission ( example: Titel is Mission 1 ) in Mission List with Status
    is not started
    - Title: Mission 1
    - Status: Not Started
    After I finish this mission, I must go to Report List and make a report
    - Title: Report 1
    - Status: Completed
    - Mission: Mission 1 ( lookup Title Column in Mission List )
    and then I want Status of Mission 1 ( in Mission List ) will be auto update from
    not Started to Completed
    Help me please

    <a href="http://www.servimg.com/view/11658996/1195" target="_blank" ><img src="http://i19.servimg.com/u/f19/11/65/89/96/work11.png" border="0" alt="Image hosted by servimg.com" /></a>
    This is html code to get my screenshot
    I can't upload image direct to this post.
    Help me please

  • How can we allow over 103,718 list of values to display in webi report selection?

    I know, why would we want to?
    Our business users would like to see the list ordered and first select from a range and drill down.
    Any query in information design tool already does this as well as the preview values for the LOV object.
    Is there a way to make large LOV function this way in webi query/report?
    If not, is there a way to move beyond the warning of 'Partial list'?

    These are all dependent parameters for LOV
    At BO Server level
    Web Intelligence Processing Server-> Maximum List Of Values Size (entries) - 50000 (default)
    Web Intelligence Processing Server-> List of Values Batch Size (entries) -1000 (default)
    At Universe level
    Array Fetch parameter at database.PRM file.
    Limit size of result set to --  parameter
    Query Level
    Max rows retrieved ( Click Query Properties to display the "Query Properties" dialog box.)
    You can try below steps
    Follow these steps to change the maximum size for a list of values:
    Log in to Central Management Console.
    Click Servers.
    Right click Web Intelligence Processing Server and select Properties.
    Increase the value of Maximum List Of Values Size (entries).
    Save and restart the Web Intelligence Processing Server.  Note: Setting large number for Maximum List Of Values Size (entries) may affect the performance of Web Intelligence. It is recommended to set the appropriate number according to the system performance.

  • Populating List Item From View

    I have two data blocks in my form, one named USERS which contains updateable fields to a table from the view and another data block called CONTROL which are all list items that currently populate on a WHEN-MOUSE-CLICK trigger. The list items work as expected for the WHEN-MOUSE-CLICK trigger. However, my problem is trying to populate the list items based on a selection previously chosen and saved to the table (yes, the values are in the table and are selectable through the view). I have a seperate population for this occurrance in the WHEN-NEW-FORM-INSTANCE at the form level, as well as on KEY-SCRUP, KEY-SCRDOWN, WHEN-NEW-RECORD-INSTANCE, and POST-QUERY at the USERS data block level. The only way the list items populate on a previously chosen and saved value is if you choose (WHEN-MOUSE-CLICK trigger) the list of values and save. From then on, as I scroll through the data retrieved in the USERS data block the corresponding data in the users view shows up in the CONTROL block list items. How do I get my form to initially show the corresponding list item data on form load when it is already in a WHEN-NEW-FORM-INSTANCE and POST-QUERY trigger on form load?
    Thanks in advance for any clue to point me in the right direction.
    Kyle
    Edited by: Kyle Miller on Sep 29, 2008 3:09 PM

    The form is for editing a current student information system user who we will be extracting data for an OBIEE IDM import. All of the fields displayed in the OBIEE_USERS data block can be edited. For the CONTROL block list items I would like them to display the current value chosen for the user displayed in the OBIEE_USERS data block. When the CONTROL block list items are clicked on then a list of values are displayed in which the logged in form user can chose another value which ultimately changes the choice for the user displayed in the OBIEE_USERS data block. This all works fine in my current form except the list items do not display the current user selected in the OBIEE_USERS data block's saved value until the list item is selected, a value chosen, and a save is committed to the table tied to the OBIEE_USERS data block. From that point I can scroll through the OBIEE_USERS block and the list item displays the correct value for the selected user, if there are values (some users have NULL values). I have currently worked around this issue by displaying the fields in the OBIEE_USERS block and only use the list items for the changing selection. I did this because I needed a proof of concept for the pilot roll-out and could no longer wait to figure this issue out (it should be more simple it seems). I am still interested in resolving this as I feel it is a great functionality for the form.

  • Need to do conditional processing based on just-selected list item

    hi -- I have a vertical, unordered list. Each list item branches to a different page when selected.
    When the list item is selected, and before the branch happens, I need to do some conditional processing
    that depends on which list item was just selected.
    How can I get information about which list item was just selected?
    Thanks,
    Carol

    Carol - List items get rendered as links on the page so as soon as you click the link the browser goes there. You can't normally run a process on the current page by clicking that link. I suppose you could build each list item target (defined in the list item definition) to use javascript that submits the page, perhaps passing the item name as the "request" value. Then when the page is submitted, an after-submit process could do whatever you need it to and similarly a branch could be defined for each list item that would take the user to the intended page.
    Scott

  • List item display in Oracle forms 10g

    hi,
    I have created the list item with pop-list in forms.When i retrieve the data using record group in the list item ,i need to display two column data in single list item i.e emp id , emp name .
    select emp_id,emp_name from emp where mgr_id = 100;
    i tried this query in record group but its coming emp id only, not name .
    Can u tell the solution as soon as possible

    Hi,
    In List Item, the First column will show in the list, and the Second column will be stored. To show both columns in list, u have to concatenate both fields and make it as first column. And i think you have to save the EMP_CODE, not EMP_NAME in database.
    So the record group will be
    SELECT EMP_ID || ' - ' || EMP_NAME EMP_NAME, EMP_ID FROM EMP WHERE MGR_ID = 100; Or you can use LOV to display multiple columns.
    Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • Unable to select the value from a list item in forms 6i

    Hi ,
    I'am using forms 6i. I have created a list item in my form as below.
    Item_type = list item
    list style - popup list
    elements in list - A, B, C,D
    When I open the form all the above values are displayed for the list item. But I'am unable to select the item( either A,B,C,D).
    Please let me know if I need to add any thing else programatically to acheive this. The block on whixh these values are diplayed is a datablock.
    This is very urgent. Any suggestions would be of great help.
    Thanks
    Deepthi

    If you have a list item where you have:
    Display A value 1
    Display B value 2
    Display C value 3
    Display D value 4
    If want to initial the value of the item to be A, you can set the initial value of the item to 1 in the property pane.
    Otherwise in an initialisation triger have
    :block.list_item := 1;
    HTH
    Tony

  • List item in multiblock

    Hi,
    I've a multiblock with 3 columns, office_no, office_name, user_name. I populate office_no and office_name by using refcursor. After populating the first 2 columns i need to populate the 3rd column (user_name) which is the list item and its not database column. In other words the list item needs to display all the "user_name" in each "office_no"
    I tried post-query trigger of the multiblock but no luck. I don't see errors but its not populating the list items
    DECLARE
    l_rgrpid RECORDGROUP;
    l_status NUMBER;
    list_id ITEM;
    BEGIN
    l_rgrpid := find_group('rgrp_m_id');
    IF NOT Id_Null(l_rgrpid) THEN
    delete_group(l_rgrpid);
    END IF;
    l_rgrpid := create_group_from_query('rgrp_m_id','SELECT user_name FROM user_office where office_no = ' ||:block1.office_no);
    list_id := find_item('block1.user_name');
    clear_List(list_id);
    l_status := populate_group(l_rgrpid);
    populate_list(list_id,l_status);
    END;
    please advise or any other way to do this? i'll appreciate your help. Thank you.
    Message was edited by:
    user576352

    It looks like you want one list item to containt different elements for each record of a block. This is not possible in forms. The best you can hope for is to have a single list item on the form, in a control block, and populate it (and set its value) in the when-new-record-instance trigger of the data block, making sure you set the value of the appropriate field in the data block when the list is changed.
    An LOV would be the best solution in a forms environment so if the requirement asks for something different you should find out why. Given a choice between 2 options which are technically possible, the LOV might be the preferred option.

  • Square brackets around list items

    I'm seeing a square bracket after each list item that is displayed inline-block. How can I remove this? It's only happening in Firefox.

    Could you provide the URL to the site? Is this your website? Can you try safe mode:
    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings and disables most add-ons (extensions and themes).
    ''(If you're using an added theme, switch to the Default theme.)''
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu by clicking on the '''Restart with Add-ons Disabled...''' menu item:<br>
    [[Image:FirefoxSafeMode|width=520]]<br><br>
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.
    Thank you.

  • Dynamically changing the list item based on another list item

    Hi all,
    I have two fields that are list items.
    First list item contain two list values: Regular and One-time
    In second list item if user select the Regular then below values should appear:
    Daily wages
    Activity Linked
    Fixed Contracts.
    Contract Staff
    Outsourced
    if user select the one-time then below values should appear:
    Projects
    Repairs & Maint.
    Please do the needful.

    First list item contain two list values: Regular and One-timeYou simply need to add a conditional check to the When-List-Changed (WLC) trigger to see which value was selected. Then, as Manu suggests, you will populate the Poplist based on the selected value.
    For an example of how to dynamically populate a Poplist item, take a look at: Forms: How to Dynamically Populate a Poplist.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Create List Item using SharePoint 2010 Workflow

    Hello everyone.
    I found in youtube video using SP Employee Onboarding Web Part, idea is quite simple and powerful. But this web part available only in SP 2013, and I use 2010. So I wanted to develop my own version.
    Questions is:
    I have 2 lists Employee OnBoards (list contains data about new employee) and Employee OnBoards Tasks (list contains approval task). Where field Employee Name from Employee OnBoards list is lookup field in Employee OnBoards Tasks list.
    I need emplement next:
    When new Item created in Employee OnBoards list, it should copy Employee Name value to the Name field of the Employee OnBoards Tasks list.
    I hope I explained understandable.
    Thanks.

    Hi Azamat,
    This you can do by using SharePoint Designer workflow.
    Create a sharepoint designer workflow and invoke that when new item will create in the list Employee
    OnBoards.
    then use Copy List item action to copy employee name to employee on board task list.
    Below link will help you how to use copy list item action in a workflow.
    http://blogs.salmanghani.info/copy-item-workflow-using-sharepoint-designer-2010/
    Hope this will help you.
    Regards
    Soni K

Maybe you are looking for

  • How do i find the airplay icon on my ipad.

    I have the same network registered to the same network. Software is the latest on both IPAD and Apple TV. I have a IPAD 3. I have tried youtube, safari, TV-play station and find no airplay icon nowhere. I double click on meny button and swipe accross

  • Repairing Permissions Warning: Remote Management

    I'm not sure what discussion forum to place this, but since upgrading to Leopard when I run Repairing Permisssions on my HD I get his message: "Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" ha

  • IDVD 08 crashes right before burning

    I installed this overtop of iDVD5, and ever since, I haven't been able to make a DVD. As it is encoding, the program abruptly turns off, no error messages, nothing. I've read some other threads about this, and I have plenty of hard drive space, I tri

  • SCB Indicator mapping

    Dear friends We have one development, where Invoces are paid by wire transfer, in invoice line items - Additional data we have SCB indicator, which we want that needs to be updated in payment document (payment medium file)  at the time of automatic p

  • Call a program of another  system from one system

    Hello Gurus, I have a module pool in R/3 in which i have a tab  which call a progam of another system. Actaully a screen is call, as the user which i hav to use is a system user i can not use call transtion. its gives me a error. Dynpro_send_in_backg