Apply "WHERE CONDITION" in "MASTER/DETAIL FORM" in "ORACLE APEX

Hi to all respected Gurus of this community.
I have a problem and I hope that there must be solution in this community and I am not aware of that till now.
I have a master/detail form in Oracle Application Express. Now, I want to apply a where condition in master-form to filter the data as per requirement but I cannot do so.
There is an option of "Modify Query" in "Query Definition". According to the instructions I am selecting the desired column (HR_Category) in left and providing text string 'M-9' in the right column to filter the data where HR_Category is M-9, and when I press apply changes, it gives me an error that
"1 error has occurred
   The condition you are adding has caused the query to be invalid."
Please help how to proceed to apply a where condition.
Regards
Muhammad Uzair Awan
Oracle APEX Programmer
Pakistan

uzairmalik wrote:
Hi to all respected Gurus of this community.
I have a problem and I hope that there must be solution in this community and I am not aware of that till now.
I have a master/detail form in Oracle Application Express. Now, I want to apply a where condition in master-form to filter the data as per requirement but I cannot do so.
There is an option of "Modify Query" in "Query Definition". According to the instructions I am selecting the desired column (HR_Category) in left and providing text string 'M-9' in the right column to filter the data where HR_Category is M-9, and when I press apply changes, it gives me an error that
"1 error has occurred
   The condition you are adding has caused the query to be invalid."
Please help how to proceed to apply a where condition.
Regards
Muhammad Uzair Awan
Oracle APEX Programmer
Pakistan
Probably a syntax error.  Check the syntax of the new clause very carefully.
Can you post the query indicating which predicate is the new one?  If you need to change the column and table names for confidentiality

Similar Messages

  • Master details form in Oracle BPM

    Hi All,
    Could anybody please let me know if we can create master details form in Oracle BPM too? If yes kindly help me in this regard. Thanks
    Regards
    Nasir

    Hi,
    I tested it on JDev12c and also works:
    Couple of tips:
    - Try to keep your payload as small as possible. Check this post: http://avioconsulting.com/blog/decoupling-oracle-bpm-process-instance-information If you put all your information on XML is like you have two databases and is annoying to keep them sync.
    - if you decouple your data, you will be able your UIs, so you could create an ADF app with bounded taskflows (e.g.: Master-Detail) and embed it on your ADF-HumanTask app.
    Hope this helps,
    Jorge

  • Master-Detail Form using Oracle XE...

    Hi ,
    Which type of page (blank , form , ....) should i select in order to create a master - detail form (dept - emp tables on SCOTT schema) in one and just one page (no tabs)...????
    And also . . . is it possible the above form to be used for both inserts , updates and deletes...????
    Many thanks ,
    Simon

    Hi Simon,
    Use form then Master Detail Form.
    You can insert, delete, and update rows.
    http://htmldb.oracle.com/pls/otn/f?p=26372
    for example of Master - Details - Details solution (not a form).
    Konstantin

  • Master Detail form on Oracle EBS

    Hello,
    This is on Forms 6i, on Oracle EBS 11.5.10.2
    I have a Master Detail Form, with one master block and several detail blocks(5 detail blocks).
    Each of the detail block is arranged on a tab. That means 5 detail block = 5 tab.
    Now I wan to implement opposite of master less operation meaning, i need to prevent detail less operation.
    To explain in a simple manner, If user enters a new record in master block, and does not bother to even navigate to any of detail tabs, then it should force user to at enter a record in these detail tabs and should prevent user from exiting the form or committing the form without entering detail tabs.
    How can I achieve above functionality?
    Thanks,
    AB
    Edited by: Rich V on Aug 28, 2012 4:26 PM

    Hi Liem,
    Could you please tell me the Portal Version ?
    Some new indexes were created for 3.0.9 version that had help improving the form performance.
    Create the following indexes as the portal owner (if the portal version is less than 3.0.9 )However, if the portal has been upgraded to 3.0.8 then they should have these indexes :-
    create index wwa_module_bindings_idx1
    on wwa_module_bindings$( subscriber_id,
    module_id,
    module_version,
    module_block_id,
    module_attr_id)
    create index wwa_module_lov_bindings_idx1
    on wwa_module_lov_bindings$(
    subscriber_id,
    module_id,
    module_version,
    module_block_id,
    module_attr_id)
    /

  • Master Detail Form is ignoring the 4th join condition

    Hello All,
    I have master detail relationship between two tables with a
    composite foreign key (of 4 columns). I'm creating a master
    detail form in O9iAS Portal 3.0.9.8.0 on these 2 tables
    successfully with no errors. The only thing I have noticed, is
    that the wizard does not populate the join conditions
    automatically in step#3. The form runs Okay but it ignores the
    last condition (i.e., 4th), which means that it brings too many
    details records.
    Any ideas
    Much appreciated if you can CC me: [email protected]
    Hamada Hima

    I had this same problem with master/detail form and 4 join conditions. I opened up a TAR and after several weeks
    Oracle determined this to be a bug and submitted it to developers.
    For a work around, I created a view with two of the join fields concatenated together, then created another md form
    with 3 join conditions and it worked. Good luck.

  • Master Details form (LOV based on Detail Column of Join Condition)

    I have created a master detail form where user_id is joining master and details.
    I have created one dynamic lov based on child user_id in detail block to diplay all user who works under current user.
    Problem : When i want to select Insert detail action in detail block the dynamic lov should read the user_id which is going to be inserted when you press Save button. Means as its not getting populated till one click on save button my lov is not getting refereshed.
    Please advice what should i do.
    Thanks
    Bakulesh

    I solved myself by modifing some guru's script from this forum little bit. I am adding here for feedback or use to any.
    htp.p('<script language="JavaScript1.3">
    function getMstFieldValue(form,fieldName)
    var objName = "";
    var tmp = "";
    var dAction = "";
    var sel_idx = 0;
    var cnt = 0;
    var instance = 0;
    var slicedName;
    var fillData = new Array();
    var blkname;
    for(var i = 0; i < form.length; i++)
    slicedName = form.elements.name.split(".");
    tmp = slicedName[2];
    instance = parseInt(slicedName[3],10);
    blkname = slicedName[1];
    //alert("Fld "+tmp+" blk "+blkname+ " instance "+instance);
    if (!tmp)
    continue;
    objName = tmp;
    if (objName == fieldName && blkname == "MASTER_BLOCK")
    return form.elements[i].value;
    function setDetFieldValue(form,fieldName,value)
    var objName = "";
    var tmp = "";
    var dAction = "";
    var sel_idx = 0;
    var cnt = 0;
    var instance = 0;
    var slicedName;
    var fillData = new Array();
    var blkname;
    for(var i = 0; i < form.length; i++)
    slicedName = form.elements[i].name.split(".");
    tmp = slicedName[2];
    instance = parseInt(slicedName[3],10);
    blkname = slicedName[1];
    //alert("Fld "+tmp+" blk "+blkname+ " instance "+instance);
    if (!tmp)
    continue;
    objName = tmp;
    if (objName == fieldName && blkname == "DETAIL_BLOCK")
    form.elements[i].value = value;
    </script>');
    thanks
    Bakulesh

  • Master-Detail Form - implementing some thing like Post-Query trigger

    Hi all,
    I am struggling to implement an eqivalent of a post-query trigger in Oracle Forms. Please bear with me as I am trying to explain in detail what the problem is.
    Here is my situation.
    I have three tables EMP, DEPT and LOCATION. I created a Master/Table pages on EMP and DEPT.
    Basic relationships.
    Each LOCATION has one or more DEPTs; Each DEPT is at one and only one LOCATION.
    Each DEPT has one ore more EMPs; Each EMP is assigned to only and only DEPT.
    Not getting too complicated, here are the table layouts:
    LOCATION:
    ID number(10,0) not null,
    NAME varchar2(20) not null
    DEPT
    ID number(10,0) not null,
    NAME varchar2(20) not null,
    LOC_ID number (10,0) not null foreign key from LOCATION
    EMP
    ID number(10,0) not null,
    NAME varchar2(20) not null,
    DEPT_ID number (10,0) not null foreign key from DEPT
    Assume I have all the constraints, BIU triggers, sequences defined properly.
    I am using the APEX page wizard to create a Master/Detail Form on DEPT and EMP. The first page is the Master Report on DEPT. I want to display the Location Name on this page also. Because the Master Report allows
    you to change the query, I was able to add the Location Name as part of the
    query. This was very simple.
    Select a.name "Department_Name",
    b.name "Location"
    from dept a, location b
    where a.loc_id = b.id
    Moving on, In the Master Detail Form, I would like to get the Location Name as part of the first Region (Dept Region).
    In this region, I would like to include the Location Name also. So my first region on the Master Detail form includes:
    Dept Id: ________
    Dept Name: _______
    Location Name: __________
    As Region are automatically populated using using a Fetch Row from EMP table (Automated Row Fetch) on an After Header process point, I don't have a way of including the Location as part of query. So I created a Region level Item called Location Name, made it Display only.
    In the old SQL*Forms, or Oracle Forms days, I used to use a Post-Query trigger, or Post-Change trigger to fire on the Loc_Id column to populate the Location Name. Simple fetch like:
    Select name
    into :P80_location_name
    from location
    where loc_id = :P80_loc_id
    However, I am struggling to implement some thing simple like this in APEX. Tried creating a processes, computatations etc, but nothing is working.
    I have seen some previous responses to fetching values from a foreign table
    using a button or AJAX script, but this should be very basic. What am I
    missing here?
    Appreciate any insights.
    Thanks.
    John

    Hi John,
    I'm not too familiar with the post-query triggers in Oracle Forms, but the use of a List of Values (LOV) on your LOCATION table might do the trick for you. If you create a dynamic LOV based on your LOCATIONS table, it can then be referenced by the LOC_ID item on the Master-Detail page, to display the Location Name. You could try doing the following:
    1. Create a new dynamic LOV, LOCATIONS, using a query similar to the following:
    select Name d, ID r
    from LOCATION
    order by 1
    2. Edit the "Create" button on the Master report page, and in the "Optional URL Redirect" section set "Request" to CREATE. Click Apply Changes, to save the setting.
    3. Edit the LOC_ID item on your Master-Detail page, and set the following:
    * in the "Name" region change the "Display As" setting to Select List
    * in the "Label" region change the Label to Location Name.
    * in the "List of Values" region set the "Named LOV" to LOCATIONS
    * in the "Read Only" section, set the condition to Request != Expression 1, and set Expression 1 to CREATE.
    Click Apply Changes to save the settings.
    When you run the pages now, the Location Name field will appear as Read-Only when editing a selected Master row. The item will appear as a Select List when the user clicks "Create" on the Master page, to create a new Master row.
    I hope this helps.
    Regards,
    Hilary

  • Old items are not populated after adding items into a master/detail form

    Hi,
    I am relatively new to APEX. I am creating a master/detail form. It works well. When I add new items the older items are no more populated. Why ?
    For example I have an itme which is a select list as a Named LOV. At creation of the row I want the user to choose from this select list. It works well.
    But when modifying the record, I don't want the user to change this name. For that purpose, I create an item which is a display only item. This item is conditional and appear only when the record has been created.
    And this is where the problem comes. It seems to work but, if I logout of the application and login, then values are no more populated to the items and I get an error when trying to update the form.
    I hope I make it clear. I have been trying a lot of times and found that if I add items, then everything goes wrong.
    Thank you for your kind help.
    Christian

    Hi Christian,
    You don't say what the error is that you are getting - this may help us with your problem!
    On the form, do you now have TWO fields - one being the original select list and the other being a read-only version of it? Is it likely that BOTH fields could appear on the page at the same time AND that both are connected to the field on the table?
    You can set the select list to be read-only conditionally - in this case you could make it read-only on the condition of the primary key field not being null.
    Andy

  • Master-Detail Form in Form6i Developer

    First of All Hi to all Respected Gurus.
    I am stuck in a very basic element and that is Primary-Key/Foreign-Key relation. I am trying to create a Master-Detail Form based on following structure. Records in Master Table and Child Table are saving (inserting) but Primary Key of Master Table is not saving (inserting) as "Foreign Key" in Detail Table.
    Here is Table Structure(s)
    Master Table Name : MGTC_EDM
    CREATE TABLE MGTC_EDM
    EDM_ID NUMBER, -- PRIMARY KEY
    BILLING_DATE DATE,
    CONSTRAINT PK_MGTCEDM_EDMID PRIMARY KEY (EDM_ID)
    CHILD TABLE : MGTC_EDD
    CREATE TABLE MGTC_EDD
    EDD_ID NUMBER; -- PRIMARY KEY
    EDM_ID NUMBER; -- FOREIGN KEY RELATION WITH MGTC_EDM
    MEM_ID NUMBER;
    AMOUNT NUMBER;
    CONSTRAINT PK_MGTCEDD_EDDID PRIMARY KEY (EDD_ID),
    CONSTRAINT FK_MGTCEDD_EDMID FOREIGN KEY (EDM_ID)
    REFERENCES MGTC_EDM (EDM_ID)
    TRIGGER OF "BEFORE_INSERT" IS APPLIED ON BOTH TABLES TO AUTO-POPULATE INCREMENTAL ID
    IN FORM6I, I'VE APPLIED A 'KEY_NEXT_ITEM' TRIGGER ON BILLING_DATE FIELD OF MASTER TABLE TO COMMIT THE RECORD AND TO MOVE THE CURSOR TOWARDS DETAIL BLOCK
    AND THERE ARE NO MORE TRIGGERS IN THE FORM.
    AS CURSOR MOVES TOWARDS DETAIL BLOCK, RECORD IN MASTER TABLE SAVES (COMMITTED) ON AUTO AND WHEN I PRESS "SAVE" BUTTON TO SAVE THE RECORD IN CHILD FORM DETAIL TABLE ALSO COMMITTED
    BUT WHEN I PRESS F8 TO EXECUTE THE QUERY ONLY MASTER RECORD SHOWS AND NO RECORD SHOWS IN THE DETAIL TABLE. WHEN I CHECKED IN DETAIL TABLE IN TOAD, IT FOUND THAT PRIMARY KEY OF MASTER TABLE (EDM_ID) NOT SAVED IN DETAIL TABLE.
    PLEASE HELP.

    Dear Mr. O.Developer, Many thanks for your reply.
    Yes, I've created relationship. Relationship exist in Master_Block and below is the detail
    Relationship Name = MGTC_EDM_MGT_EDD
    Relation Type = Join
    Detail Data Block = MGTC_EDD
    Join Condition = MGTC_EDD.EDM_ID = MGTC_EDM.EDM_ID
    Delete Record Behavior = Non Isolated
    Prevent Masterless Operations = No
    Deferred = No
    Automatic Query = No

  • Default reference ID in Master Detail form

    Hi,
    I created a master detail form.
    When inserting a new record in the detail block, I want that value from the PK item from the master block appears
    in the FK item of my detail block. This problem was showed long time back in March, 2002. The answer at that time is
    this issued would be fixed in 3.0.8. Now, I still have same problem and wonder if anyone has any idea?
    Thanks,
    Amanda

    I am using 3.0.9 and its working fine for me. Which version r u in? Are you gettin 'Join Conditions' page where you can define PK/FK relation and that will take care of what you want. There is a javascript on faq for portal which you can use if your version is not supporting this one.
    Hope this will help
    thanks
    Bakulesh

  • Radio Group in Master Detail Form

    Hi There,
    I want to create a radio group with 2 options (Yes, No) for a detail-record within a master-detail form and I would like to save the selected option in a table-column, which is of Varchar2 and has the length of 1 (Y,N).
    How can I do that.
    I do not have a clue where to start from.
    In the guides I just could find ways of how to display information through a sql query in a radio-group and just in master-records.
    Thank you!!

    Unfortunately it doesn't appear that you can use a radiogroup display for tabular form column definitions. You can however use a select list.
    This makes sense because radiogroups could possibly consume far too much page real estate if the LOV was a long list, whereas a select list would always consume the same space no matter how many entries were in the LOV.
    If you want to pursue this just make sure that you have a column defined in your detail table with the correct datatype, as you described. Then when you create the detail form view you can modify the report column to display as a select list by going to the Report Attributes tab of the region definition, select the individual column you want to change and in the Tabular Form section of the Column Attrributes set the Display As to a Select List along with the appropriate LOV type, go to the LOV for the column further down the page and select or define the LOV. Click Apply Changes and your on your way.
    Earl

  • Master detail form

    Hi team, I am trying to create a Master detail form.
    I have two tables artist_master, pk group_code
    Artist_detail pk group_code. I have linked it as foreign key to Artist_master
    I have used the wizard to create the form.
    In the report page when I click on create button It shows me only the Master screen not the detail tabular form below.
    However when I click on the edit link of report it shows me both the master and detail screen.
    Another question how can I add a Insert/Update button in master form.
    My workspace aceigo
    user name demo password demo123

    Thanks Mark for replying.
    Firstly I would like to thank you for informing me about the Apply changes button. Thanks for that.
    About my project I would like to inform you that I am creating an application form for Artists. One application form can have multiple artists. In the Data Entry screen I need to collect all this information.
    This is the same concept as in Invoice data entry. We have a master and then a detail block.
    It will be quite frustrating to first enter the master data save it then go back click on edit and then enter the details page.
    I was wanting that when I click on create both the screens will come up. During data entry after the last item in master it should now go to details
    I saw a link in the forum where other people were also facing the same problem. They did not get a solution
    Master Detail
    Any help will be a blessing.
    Nigel

  • Master detail form issue retrieving service price automatically

    Hi,
    I developed a master detail form in order to process service requests.
    On details block I'm trying to retrieve automatically service price after I select service name from LOV.
    For this purpose I created a application plsql process
    declare
    v_price service.price%type;
    begin
    select     price into v_price
    from      service
    where      service_no = 1;
    htp.prn(v_price);
    exception when others then htp.prn('An error occurred retrieving the PRICE');
    end;
    Which process I'm calling through javascript function in order to retrieve service price.
    <script type="text/javascript">
    function GetServicePrice(pThis)
    var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
    html_GetElement('f07_'+vRow).value = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=getPrice',0);
    </script>
    Instead of price it returns this value: "[object Object]".
    Is it possible to work as I intended or it should other way around?
    I appreciate your help/comments.
    Application Express 4.2.1.00.08
    Oracle Database 11g Express Edition Release 11.2.0.2.0
    Regards,

    Tonito99 wrote:
    Hi Tom,
    I applied these changes on page HTML Header, but now it's not returning nothing.
    f07_ (price column) is empty.
    <script type="text/javascript">
    function GetServicePrice(pThis)
    var ajaxRequest = new htmldb_Get(null, $v('pFlowId'), 'APPLICATION_PROCESS=getPrice', 0);
    var ajaxReturn = ajaxRequest.get();
    $s('f07_'+vRow, ajaxReturn);
    </script>
    Any other suggestion?
    Regards,
    Edited by: Tonito99 on Mar 8, 2013 3:32 PMIf you are on apex 4.2 why are you still using the legacy/undocumented methods?
    You should use new javascript API apex.server.process
    apex.server.process ( "getPrice", {
    success: function( pData ) { $s('f07_'+vRow, pData);}
      } );

  • Master-details form execution

    Hi,
    I have a master-details forms. The actual query gets executes at master forms. And on opening the details form it displays the results.
    i.e say Master form displays all the task lists with information like Task No,Task Name. The remaining information(Task Start date,Task End date) are displayed in Details forms. The query in the master form is select task No,task Name,task start date,task end date from XYZ where p_id=123.
    Now when we open any of the task(task1) details forms we can modify the dates and save it. After that there is an option like Copy to all tasks. Which will update all the tasks.
    The update is working fine.
    Now once you did copy to all tasks, if you open other tasks(task2) details form it still displays the old dates. As the query is not executed when we open the details form.
    Can anyone please suggest, how to ensure that every time the details form is opened it executes the query so that it displays the updated details.?

    Hi, Deepak,
    Deepak Jambhekar wrote:
    Hi,
    In the relationship we have defined the join condition as task_no. There is no option for "When New Form Instance" trigger. I have tried execute_query in
    when-new-block-instance but it didn't work. In fact it didn't call this trigger when I opened detail form.You can use the following code in the button from where u call the detail form.
    go_block('detail_form_block_name');
    execute_query;
    OR
    go_block('detail_form_block_name');
    Clear_Block(No_Validate);
    execute_query;Hope this works..
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: HamidHelal on Mar 29, 2012 6:27 PM

  • To attach a RTF template(Report for printing ) in the master detail form

    I have an application in which I have 3  master detail forms  of which one of the form is a gate pass form . Now this gate pass form has a report region as the detail.
    All that i need help is to print the Gate Pass with few fields as information in the gate pass form , where an image or picture of the visitor is also a filed .
    Now I have created an RTF Template  which is the Gate pass layout with the pic.
    So ultimately I have the application for the gate pass form and the RTF template ready with me .. Fixing this template with the application with a BUTTON called PRINT is the challenge am facing !
    SELECT XVH.GPDATE
           , TO_CHAR(XVH.VISITORTIMEIN, 'HH:MI') VISITORTIMEIN --, (XVH.VISITORTIMEIN )
           , (TO_CHAR(XVH.VISITORTIMEOUT, 'HH:MI'))VISITORTIMEOUT
           , XVH.VISITOR_NAME --, = XVH.PERSON_ID
           , XVH.COMAPANY_NAME
           , XVH.PURPOSE_OF_VISIT
           , (SELECT A.FULL_NAME
                FROM PER_ALL_PEOPLE_F A
               WHERE A.PERSON_ID = XVH.PERSON_ID
                 AND SYSDATE BETWEEN A.EFFECTIVE_START_DATE AND A.EFFECTIVE_END_DATE) To_meet
           , XVH.VISITOR_PHONE
           ,APPS.GETBASE64 (XVH.VISITOR_PHOTO)
      FROM xxcdot.XXBCT_VGPF_HEADER XVH
    WHERE XVH.GP_HEADER_ID =  :P_HEADER_ID
    This is the query for the template ..
    Please help me with this. I am very new to apex and learning it with help of online tut

    Pars I need another Help
    I am working with a master detail form where in the form region i have a Radio group . Lets say the Radio group is
    o Returnable
    o Non Returnable
    o Other
    so when i select Non returnable I want a particular column called
    Line Status to get Disabled .
    I have done that by a dynamic action - using jquery statement (.Disable) .
    Defining the element attributes as Disable .
    Now the problem is that ,, Line status is getting disabled on the selection of Non returnable radio button. but unless and until i dont press the Add row button it does not work ,, else i will have to switch over between the radio buttons to get this action done !!

Maybe you are looking for

  • DMS - Document upload in SAP

    Hi, We created document in SAP DMS by CV01N but those doucments are stored in PC. But we would like store those .xls, .pdf, .doc files in SAP server. So that users from any locations they can access the open the document. Is there any possible way to

  • BPM Workspace CSS error 'rowCssStyle' from bean of type fuego.workspace

    Hi, I'm consistently getting an error in BPM workspace when clicked on some of the custom views. The views are not loading and I get this error in the bottom part of the workspace. It's related to workspace CSS , but we've not made any changes to CSS

  • Release necessary after GetInterface?

    My Acrobat plugin implements inter app communication support - it exposes an interface that I can access thru AcroExch.App. My question is - do I need to Release the object when done? eg myObj->Release()? Or is there another way to release the interf

  • Need a query to do row to column transformation

    SELECT friday_date FROM t2;Table Data: 1/2/2009 1/9/2009 1/16/2009....... I need a query to get the output in below fashion Column 1/2/2009,1/9/2009,1/16/2009 I tried PIVOT and TRANSPOSE, cannot do this. I believe because it is a date,may be. I tried

  • Date & Time are wrong, how is this possible.

    I am having a look at my inlaw's computer. Late 2008 15" MPB, 10.6.8/iLife 11. One of the more strange things I've seen is that in Date & Time preferences the small section above the calendar where it should show the date i.e. 2/19/2012 is essentiall