Dynamic LOV on form in update mode

I have a link to a portal form that specifies the primary key as below:
Portal30.wwv_user_utilities.get_url(
'application.form_link',
'primary_id',to_char(id),
'_primary_id_cond','=');
This works well. I can access the form in update mode for the specified row. However, on the form I have 2 combo boxes: one is for make of vehicle and the other for model. The make combo box uses an lov derived from a simple table query. The model combo box is a dynamic lov using a query based upon the value of the model. When entering the form in update mode, it fails to set the make bind variable to anything, so the model is left blank with no options. How can I set the value of the make bind variable on the link so I can get the dynamic lov for the model to be populated correctly?
(I have already tried to add the model to the url link, to no avail).
null

Hi noor,
When I click the link button I am opening the userdefined form and filling the corresponding document number details manually.
Do you mean, you're filling the form, field by field???
If so you're doing it wrong. That way the form has no connection to the correct Database record and cannot update it.
The correct way is as follows:
Put a DocEntry field in your form and bind it to the DocEntry database field.
Set this field to NOT Visible by default.
When a user clicks the LinkButton, you change the form mode to FindMode, make the DocEntry field visible use the oForm.Items.Item("DocEntry").Specific.Value = "" method to set the correct value to the field (use the DocEntry number NOT the DocNum) and use the oForm.Items.Item("1").Click() to open the correct record.
Then the user can change the value it needs without errors.
Best Regards,
Vítor Vieira

Similar Messages

  • Report to Form (in Update mode), update, "Close" back to report (just like QBE).

    Alright, I have been through the entire board and found bit and pieces here and there on how to do this, but I am not satisfied with the results. Answers to these questions will dictate whether we use this product or not.
    1) The QBE solution is great for the above EXCEPT I am unable (it seems) to make updates to the form portion of the Report/Form combination. I need to be able to lock off certain fields and disallow certain functions. Other's have asked whether this can be done. No answers issued forth.
    Is there some way short of hacking into the PL/SQL code of updating the form on a wizard created QBE?
    2) I was able to create my own report, link (via link object) to a custom form (update the form as I needed). Now I would like my users not to have to hit the query button (which is absurd in this case because they already have the proper record displayed). So I need to open the form in "update" mode. I have seen some different approaches to this on the board, and all kinds of code, but is there a simple way to do this (preferably from the tool, not hacking code)?
    I see the code in the various posting (including the FAQ), the question is where I put in in the context of my link from report to form (if it is in the native pl/sql, this is not an answer because we will not go that route; having code blown away by the tool and have to be reentered. It goes in in the context of the tool or we don't use the tool).
    Also, is there a way to utilize the "close" button from the QBE that so nicely takes you back to the report and does a refresh?
    This is the simplest app I could dream up to test this product and it looks like it falls short.
    In summation:
    1) Generate a report. (yes)
    2) Link to form (yes)
    2a) Link direct to record (no query click) (no, without hacking)
    3) update the form (yes, if after query click)
    4) Jump back to report at spot where you left, do automatic refresh (just like QBE) (No, without hacking)
    Again, this is the simplest and most common of apps, I cannot understand why it would be so hard to accomplish. What am I missing? Anybody on the board, please advise.
    null

    If your report is created using ‘Reports From SQL Query’ then you can modify it using the following to achieve this:
    1. Remove the link from ‘Column Formatting’ section of the report object.
    2. In the SQL of the report , use custom link to the column where you want to provide link using the syntax
    select a.empno,’‘||a.ename||’‘ ename_link,a.deptno
    from scott.emp a
    Order by a.empno
    and the form will always open in ‘INSERT’ mode with passed values filled in.
    Thanks
    Krishnamurthy

  • Using Dynamic LOV in Forms

    Hi Everybody,
    I am making forms based on procedures in 9iAS Portal. I am using two parameters for the form. One is Item Code for which I am having a simple LOV with sql statement. Other LOV has a dynamic Sql statement which accepts the Item_code as parameter and displays records containing the item_code. When I run the Lov seperately through navigaror it runs properly but when I used the lov through form and passed the item_code to it, on runtime it says that the lov is based on dynamic sql and unable to show results.
    Can anybody please help me out of this problem.
    Thanks in advance
    Warm Regards
    Vivek Bajaj

    When I tried to compile the following code in Forms, the compiler error I got was Encountered the symbol "STMT_STR" when expecting one of the following: select. However, when I run it in SQLPlus, it creates the function without any errors.
    FUNCTION my_func
    return number
    is
    TYPE DiaryCurTyp IS REF CURSOR;
    cur DiaryCurTyp;
    stmt_str VARCHAR2(200);
    dmonth NUMBER;
    dday NUMBER;
    BEGIN
    stmt_str := 'SELECT dmonth, dday FROM p2_diary
    WHERE dmonth = :1';
    OPEN cur FOR stmt_str USING '12';
    LOOP
    FETCH cur INTO dmonth, dday;
    EXIT WHEN cur%NOTFOUND;
    -- <process data>
    END LOOP;
    CLOSE cur;
    END;

  • Creating dynamic LOV in form builder 6i

    Hi All,
    I am new to form builder.
    I want to create dynamic lov, means
    Project type
    Client
    Work_type(thsi is also lov) ->> 1) Billable
    Reason (this is also lov) ->> 1) Billable
    Work_type(thsi is also lov) ->> 2) Non-Billable
    Reason (this is also lov) ->> 1) Fresher
    2) Project Manager
    As shown above, Suppose the project type is client then I will select either "Billable" or "Non-Billable" value.
    If I am selecting Work_type LOV as "Billable" then it should display "Billable" value in reason LOV
    or if I am selecting Non-Billable value from Work_type LOV then reason LOV will display the list of value as Fresher and Project Manager.
    Please help me, its very urgent.
    Thanks in advance.
    Regards,
    Bluetooth

    Bluetooth,
    This can be accomplished by creating two seperate record groups; one for Billable and one for Non-Billable. Then - in the WORK_TYPE When-Validate-Item (WVI)trigger - when the value is "Billable" you assign the Billable Record Group to your LOV or if the value is Non-Billable, then you assign the Non-Billable record group to your LOV. Your Record Group queries must return the same number of columns and the column names must match. If your record groups need to have a different number of columns and column names, then I would just use two seperate LOV's and assign them to the item accordingly. For example:
    /* Sample WVI trigger */
    DECLARE
      lov_id    LOV;
      item_id   ITEM;
    BEGIN
      lov_id := Find_LOV('YOUR_LOV_NAME');
      /* Option 1: Change Record Group of LOV */
      IF ( :YOUR_BLOCK.WORK_TYPE = 'BILLABLE' ) THEN
        IF ( Get_LOV_Property(lov_id, GROUP_NAME) != 'BILLABLE_RG' ) THEN
          Set_LOV_Property(lov_id, GROUP_NAME, 'BILLABLE_RG');
        END IF;
      ELSIF ( :YOUR_BLOCK.WORK_TYPE = 'NONBILLABLE' ) THEN
        IF ( Get_LOV_Property(lov_id, GROUP_NAME) != 'NONBILLABLE_RG' ) THEN
          Set_LOV_Property(lov_id, GROUP_NAME, 'NONBILLABLE_RG');
        END IF;
      END IF;
      item_id := Find_Item('YOUR_BLOCK.REASON');
      /* Option 2: Seperate LOV's */
      IF ( :YOUR_BLOCK.WORK_TYPE = 'BILLABLE' ) THEN
        IF ( Get_Item_Property(item_id, LOV_NAME) != 'BILLABLE_LOV' ) THEN
          Set_Item_Property(item_id, LOV_NAME, 'BILLABLE_LOV');
        END IF;
      ELSIF ( :YOUR_BLOCK.WORK_TYPE = 'NONBILLABLE' ) THEN
        IF ( Get_Item_Property(item_id, LOV_NAME) != 'NONBILLABLE_LOV' ) THEN
          Set_Item_Property(item_id, LOV_NAME, 'NONBILLABLE_LOV');
        END IF;
      END IF;Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Problem in Updating data in  userdefined form in update mode

    Dear All,
    I have a userdefined  form of type Document. In another report form I have a link to this userdefined form through document number. When I click the link button I am opening the userdefined form  and filling  the corresponding document number details manually. But when I am changing some field values and trying to update, I am getting a error as cannot insert null into DocEntry, Insert fails. I am using UDO for database operations. Any help is appreciated.
    Regards,
    Noor hussain
    Edited by: noor_023 on Jun 5, 2010 10:56 AM

    Hi noor,
    When I click the link button I am opening the userdefined form and filling the corresponding document number details manually.
    Do you mean, you're filling the form, field by field???
    If so you're doing it wrong. That way the form has no connection to the correct Database record and cannot update it.
    The correct way is as follows:
    Put a DocEntry field in your form and bind it to the DocEntry database field.
    Set this field to NOT Visible by default.
    When a user clicks the LinkButton, you change the form mode to FindMode, make the DocEntry field visible use the oForm.Items.Item("DocEntry").Specific.Value = "" method to set the correct value to the field (use the DocEntry number NOT the DocNum) and use the oForm.Items.Item("1").Click() to open the correct record.
    Then the user can change the value it needs without errors.
    Best Regards,
    Vítor Vieira

  • Link Parameters from Report to Form in Insert Mode

    It seems like it should be possible to use the Report wizard to add a link to a form, select some link parameters using the Edit Link function, and then when one clicks on the link it would open the form in insert mode with the link parameters filled in as defaults. Instead what happens is it tries to open the form in update mode with a row that matches the link parameters, and if it can't find a match it opens in insert mode with no parameters filled in. I want it to always open in insert mode and with the passed parameters filled in.
    I've looked through all the documentation I have access to and have been through all the Portal FAQ's on OTN and can find nothing on this. There were a few questions in the FAQ's that told how to do it in PL/SQL, but I don't know how to get access to which instance of the link was selected by the user through PL/SQL, and it seems like there should be a way to do this from within the report wizard.
    Any help you can give me would be greatly appreciated.
    Best Regards,
    Jim Bladen

    If your report is created using ‘Reports From SQL Query’ then you can modify it using the following to achieve this:
    1. Remove the link from ‘Column Formatting’ section of the report object.
    2. In the SQL of the report , use custom link to the column where you want to provide link using the syntax
    select a.empno,’‘||a.ename||’‘ ename_link,a.deptno
    from scott.emp a
    Order by a.empno
    and the form will always open in ‘INSERT’ mode with passed values filled in.
    Thanks
    Krishnamurthy

  • Dynamic LOV in a Tabular Form

    Can somebody please tell me if there is a easy way to code a
    dynamic LOV in a Tabular Form?
    I need the ability to access a column value in the table row, to use in the WHERE clause of LOV query for another column in the row? Seems
    like that should be easy , but not finding an answer.
    Thanks for any help.
    Carol

    Hi Carol,
    You can add the select list's definition directly into your SQL statement using APEX_ITEM.SELECT_LIST_FROM_QUERY - see: [http://download.oracle.com/docs/cd/E10513_01/doc/apirefs.310/e12855/apex_item.htm#CHDIDGDA]
    If you first run your page with your existing select list on it, then do a View Source and look for the select list, you will see a "name" attribute of something like "f01" or "f02" etc. Make a note of the number part of this.
    Then update your SQL statement to include the above and using the number you noted as the Index value (say, 4):
    SELECT EMPNO,
    ENAME,
    DEPTNO,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(4,MGR,'SELECT ENAME d, EMPNO r FROM EMP WHERE DEPTNO = ' || DEPTNO || ' AND EMPNO &lt;&gt; ' || EMPNO) MGR
    FROM EMPThat would give you a select list of employees in the same department as the current employee (excluding that employee themself)
    Andy

  • Select item on a Tabular form with a different dynamic LOV on each row

    I would like to use a tabular form where one of the columns is a dynamic LOV based Select, and where that dynamic LOV refers to one of the column values on each row.
    So if the tabular form represented a list of teams and the LOV-based Select column was the current team leader, I would want that select list to be populated only with the members of that team (different for each row). Since the list of team members is in some other table (all_players or something) I would want to populate the LOV with a query with a where clause that selected only those players records with a team-membership equal to the current tabular form's team id. So, on each row that select list's contents would be different.
    -- Justin

    I'm beating a dead horse here but I did get something to work with "less" code. My current needs do not require me to cascade drop downs, I only want 1. You can use the query like the in the first reply (but I don't have a table with joins) I created a simple two column table dept_emp with 4 records 10,null 20,null .... I want to fill the nulls with an employee but ONLY an employee that matches the dept. (Same concept of team leader and members).
    Here's the query:
    select apex_item.display_and_save(1,dept) dept,
    apex_item.select_list_from_query(2, name, 'select ename from emp where deptno='||dept) name
    from dept_emp
    I removed the code that was there already (ApplyMRU) and just put in this code:
    BEGIN
    FOR i IN 1..HTMLDB_APPLICATION.G_F01.COUNT LOOP
    UPDATE dept_emp
    SET
    name=HTMLDB_APPLICATION.G_F02(i)
    WHERE dept=to_number(HTMLDB_APPLICATION.G_F01(i));
    END LOOP;
    END;
    The G_F01 matches the column 1 and so forth. There's more documentation but little explanation at:
    http://download.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/api.htm#sthref2171
    The thing I could not get to work was a dynamic message
    #MRU_COUNT# row(s) updated, #MRI_COUNT# row(s) inserted.
    Not sure when the MRU_COUNT gets populated (probably in the routine I removed ;))
    You're probably way past me by now but I like to have as little code as possible when it comes to maintaining an app. That's why I liked oracle forms so much. This kind of stuff was pretty easy to do.
    Thanks again everybody!

  • Default value of combobox using dynamic LOV in Oracle Portal form

    We are trying to specify the deafult value of a combobox on a form that derives it options from a dynamic LOV. The option value is a number and the display is text.
    E.g.
    <Option value="1">Books
    <Option value="2">CDs
    We have tried various ways of setting the default option to be selected on the Combobox. First, we tried using a sql query to return a number from a table (sql query returns number -> in the default value type field). Next, we tried to use a constant number (default value: 2, default value type: constant). In neither case, did the Oracle Portal form pre-select our default choice in the drop-down list.
    Any suggestions? I browsed the other forum articles on this topic and noticed several folks believed it was a bug in Portal. We are using Portal version 3.0.9 (latest App Server for the Ebusiness Suite). Thanks in advance.

    You can manually add the select list (or for that matter anything else) to a wizard created form. If the select list is for an existing item, simply change the "Display As" setting from Text to a Select List based on the LOV you create. Any changes made will then be applied by the update process.
    cheers,
    Ron

  • Dynamic LOV buttons in Forms

    Hello:
    The dynamic LOV button (app.ui.lovButtons=true) in Registry.dat setup is showing the LOV button in NORMAT Mode ONLY.
    This does NOT get displayed when the form is in QUERY mode. Is there a way to display the LOV buttons irrespective of Query/Normal Mode?
    Thanks
    Bala

    Anyone faced this issue before?
    Please help
    Edited by: kart on Jun 16, 2010 3:58 PM
    Edited by: kart on Jun 17, 2010 12:30 PM

  • Dynamic lovs in parameter forms ... Is this possible?

    Hi
    I am using report developer 10g on windows xp.
    I need a cascading prompt style dynamic LOVs in my report parameter form.
    The first LOV displays a set of values (say for eg. dept list). The second LOV will display another list, based on the value chosen by the user in the first LOV (Eg. List of employee names in that dept).
    My first LOV select statement may look like below for the user parameter say P_DEPT
    select deptno from dept;
    My sencod LOV select stmnt may look like below for the user parameter P_EMP
    select ename from emp where deptno = :P_DEPT
    Each time I try to set the second LOV, report developer complains "Bind variables not allowed in select statement"
    Same error msg comes if I reference the first user parameter(P_DEPT) as a lexical parmaeter.
    How do I acheive the above in report parameter form? Any help is appreciated greatly...
    Thanks
    Suma
    Message was edited by: suma
    user519129

    Hi Brad,
    Thanks for the reply. I had almost given up hope on receiving replies to this message.
    I do agree that it is simpler (and a lot striaght forward) to just use forms to develop dynamic LOVs of cascading prompt style, that is required in my app. But in our shop, we have integrated forms and reports in such a way, that all the report parameters are handled by report developer's own parameter form, rather than coding a separate logic on the forms side to handle the report parameters(as this has to be done on the forms side for every report that we generate, We thought it would be better to use the reports developer to handle the parameter input and then pass the .rdf to forms app). Currently in all our app, the parameter form generated by the report developer is rendered as HTML form on the browser (when the concerned rdf file is called within the forms app) and by submitting this we get the report output)
    Hence I am very keen to get this done somehow on the report developer side.
    I do hope I get some input on this. Also, its a little surprising that such a simple feature is not readily avalibale in the report parameter form. I hope oracle report developer team is reading this message...:)
    Thanks
    Suma

  • Dynamic lov on a apex page parameter form

    I'm trying to create a dynamic lov on a apex page parameter form. I read another post to look at metalink note. 292521. I asked our DBA to review the note but he claims he can't find the article. he's also been unable to find the last 2 metalink requests i've made. can someone verify metalink note 292521 exists so i can inform the DBA?
    Thanks,
    Brian

    Brian, I cannot find that note either, try posting your question in the APEX forum, this forum is for Oracle Portal questions.
    Cheers,
    Mick.

  • Running an Update form in Query mode from the MENU

    Could any one explain how to run the same Form from the same Menu with two different options, One in QUERY ONLY MODE and one in Update mode. We are using Designer 6i and Headstart 6.5.
    Thanks
    David Short

    Is webutil supported in 9iAS? I think it is supported only in 10gAS.
    Thanks,
    Sujoy

  • Form mode changes in update mode while clicking on folders

    On user defined form
    While navigate last record form mode is "Ok"
    when i click on further folders form mode going to change in update mode
    How to resolve this problm?

    Hello,
    I experienced this yesterday as I was creating new form with ScreenPainter.
    I solved it by directly editing the resulting srf file (xml syntax).
    The folders can easily be identified from their type (type="99") and I changed the AffectsFormMode attribute from 1 to 0 in both the "item" element and the included "specific".
    Regards,
    Eric

  • Dynamic LOV FOR TABULAR FORM 6i

    Hi,
    I have tabular form of two Items(ID,DESC) and I want to Populate LOV for item(ID) every record
    and record_Group & SQL statments are stored in DB.
    ACTION: when query in POST-QUERY Trigger get for every record in tabular form -- the stored SQL-Statment from table then put it into dynamic record_group and populate the dynamic LOV.
    Please advice,
    Thanks in Advance.

    OK daniel
    This form used for get reports
    then header get the name of Report (Table-A) (report_ID),(report_desc).
    then details for get the Parameters will send to report builder (Table-B) (detail_id),(report_id),(sql_stm).
    so parameters may be need for example stock code so this record need to query from stocks table to get stock code and stock name.
    next record for item Code so need to query from Items table to get the Item code and Item name
    another report for employees so the user enter report code then when query and get in details block employee code and employee name.
    so the lov will check if this record have query sql-statment or not if have execute it in the record_group then in lov
    then go to the next record if sql_stm is null then no lov in this record and so on.
    thanks..

Maybe you are looking for

  • Time Machine won't back up to new hard drive

    I have been using Time Machine for over a year on a few different hard drives, most recently a Lacie Rugged (500 gb). It has almost always worked perfectly. But now, I got a Lacie Rugged XL (1000 gb) and it has been working haphazardly. It worked at

  • Export to CSV - order is now by alphabetical column

    I was using 1.2, and exporting to CSV, and the file was in table-layout order, so another app is able to import. Now with 1.5 the export is in alphabetical column-name order - and the other app can't handle it. Is there some setting to change the exp

  • Download to app.server

    Hi frinds, I have a internal table with records, i want to download this internal table into application server using opendataset command. how to i do?? my internal table name is i_tab. can any one plz advise point will be sure. Gowri

  • Zen Coding in Dreamweaver CC

    How Can i Do to use zen coding extension for dreamweaver CC?

  • My applet does not show in ie.

    I did the creating your first applet: (HelloWorld!) http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html#3 I have done everything here, http://support.microsoft.com/default.aspx?scid=kb;en-us;Q168806 with no luck. I have selected "J