Tabular form region and preserving state

Hi all,
I have a tabular form region (one of a few form regions) on my page... I'm trying to figure out how to preserve the other fields on the page (detail form), when tabular form buttons are clicked to add, update or delete rows.
The page obviously branches back to itself, but if a user has inputted changes in other form items on the page, they are lost.
I know it has something to do with how the item sources are derived... currently, they are tied to the database column, and the source is derived each and every time..
If I set it so it checks session state first, and if not null, get it from there, it'll work for the above use case. However, it causes problems if the user leaves the page by clicking elsewhere (ie back to master list), and decides to edit a different row... the detail form will pull the content from session state, and not from the db, and display the wrong information...
Hope this is clear enough... I appreciate your feedback
Thanks
Message was edited by:
pl_sequel

Thanks for the reply...
I guess it is that simple... as long as I ensure that any link pointing to the detail form (ie edit, or view etc...) clears the page's cache, then I am guaranteed to have the database state and not the session state displayed...
My detail form items should then derive their source always from session state if not null, otherwise get the source from the DB...
This will ensure that when I branch back to the page when adding a row to my tabular form for instance, what was entered previously, would remain...
Thanks for the tip...

Similar Messages

  • Wizard for Tabular Form Region

    Is it possible to generate a tabular form using a wizard into a new region on an existing page where other regions of various types exist?
    I have a page with a region for capturing details of a call. There are other regions on the page that hold information relating to the call, e.g. reasons for the call, requirements of the call, and actions performed relating to the call. These are all one-to-many relationships from the call, with links between each other, i.e. an action can be linked to a particular reason for the call. This all works fine.
    What I would like to do is to replace some of the reporting regions (e.g. reasons,requirements and actions) with tabular forms (currently to modify entries in these reporting regions, I use the standard column link functionality to another page containing the maintenance form).
    Thanks.

    Hi,
    I have the same problem. Have you found a solution?

  • IF Form region AND report + search tool in same page THEN = problem

    Helllo everybody
    I posted an initial and now the advanced as I received helpful comments but still is unsolved:
    Problem:
    If I have a Form, and a Report With a Search feature on the same page the problem is that when I click on the button of Search to find records in the Report, the page reloads as it goes and returs to the server. Alright, however, that reloading causes the Form to submit data while there is no data because I was not working with the Form. When the report gets the "submission of the Form" it receives all empty data and it complains as it cannot have Null values in its rows.
    Solution:
    The thing would be to tell the form not to submit anything unless expressley pressed the button Create or Save. It seems that these buttons activate when the page is reloaded I mean reloaded by haiving pressed the button Search of the Reports region.
    The helpful comments were in the direction of going to Processes, Automatic Row Processing and then choosing a conditional for processing of the Form, that it, it would only activate (submit itself if that condition is met)
    So I go to PL/SQL Function body Returning a boolean and I paste this: RETURN :REQUEST IN('SAVE','CREATE');
    but the problem continues unsolved, that doesnt help. It must be very close but there is something I am missing
    thank you very much
    Alvaro
    Edited by: user12155340 on 18-Nov-2009 15:04

    Hi,
    I think this is double post.
    BUTTON CLICK ON SEARCH ITEM CAUSES OTHER REGIONS (FORM) IN TABLE TO ERRORS
    Please read my last comment from that link.
    Application express forum might give you better and precise answer.
    You need just figure out how set conditions
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/concept.htm#sthref149
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/concept.htm#sthref237
    Br, Jari
    Edited by: jarola on Nov 19, 2009 12:51 PM
    BTW, I remember that there was just few days ago same kind question answered in Application Express forum.
    I post link if I find it. You may try find it also

  • Populating Tabular Form Region Field With ITEM Data

    Hi,
    I have a date picker item, i want to be able to put that date in to all the rows in the field RENEWALDATE but ive tried to set that field to have the date item as default and it doesnt pick anything up. How can i do this?

    I sorted it in the end...I created a PLSQL process thats updates and sets the field RENEWAL to :P7_X, so when P7_X is submitted this process runs and updates all the rows displayed to populate the renewal date column with this value. I also intend on being able to select a particular trainer and populate all the rows with that one trainer user the same process.
    My situation is that certain staff have individual training sessions but some need to be in group sessions where by the trainer can update multiple people who say attended the Induction course on 12/04/2007, User selects the date and course presses retrieve and this brings back all staff on the course, the trainer can then pick his name, a renewal date and submit these, hence updating the field for every member of staff. Of course the update process is only assigned to a certain button and not on submit, so a trainer can amend a single individual out of the group and still submit the correct details. Pretty handy really

  • Read Only page/region attribute - Tabular form

    APEX 4.2.1/Oracle 11.1
    The new readonly attribute at the page and region level works very nicely to make a page readonly without having to set the readonly condition individually on each page item. Great job.
    But I noticed that tabular form inputs don't honor this setting. Is there a easy way to make a tabular form readonly as well i.e. make it look like a classic report instead of showing input (even disabled) fields?
    I guess we can clone the region as a classic report region and conditionally show one or the other but that's not ideal from a maintenance perspective.
    Thanks

    Marc - Thanks for logging the enhancement request. Couple of observations
    1. The Copy Region wizard allows us to copy a tabular form region (along with its associated processes and buttons) but running the page raises errors since APEX only allows one tabular form per page. Perhaps the Copy Region wizard should check for this
    2. Most tabular form regions are customized after the wizard creates them. Column headings are changed, display types, number/date formats, column links, etc. Re-doing all this to create a copy of the tabular form region as a classic report region is a bit of a chore. Maybe you can think of a easier way to do this in 5.0. Really all that needs to happen is change the Display As for all the tabular form INPUT fields to Display as Text and preserve all other customizations.
    Thanks

  • Custom Tabular form - Session state values disappear

    Hi,
    I have a custom tabular form page using apex_item and apex_collections. I am using the apex_collection to store the values in memory in order to avoid the data loss in session state. The page is working fine after a validation failure and it shows the values on the second report (as advised for custom tabular forms).
    In this, some of the rows have clob value which needs to be edit on a rich text editor. Since apex_item does not provide a solution to have rich text editor, I have to branch to another page on an Edit link for the CLOB data using a modal window. However When I return back from the modal page, the values disappear from session state, and the validation (using htmldb_application.g_fxx arrays) does not take place.
    Is there any workaround to overcome this issue?
    Apex version: 4.1
    Thanks in advance.
    Natarajan

    Thanks Daniel for your reply.
    Actually its an interface with a custom tabular form on page 1 with apex collections and rich text editor on page 2. Since it is not possible to have the rich text editor, I need to have it in another page (I could have it the same page, that is the way I am trying now) however I open the next page as a modal window.
    I have a link on the tabular form, so that the clob content is opened in the rich text editor on the next page. After the edit, I update it to the same collection and go back to the tabular form page and refreshes the report. It works fine, but causes trouble to the data entered on the other columns in the custom tabular form.
    I have now deviated to another work and put this on a hold. If my explanation is still not clear, I will create the same page in apex.com to simulate the error.
    Thanks again.
    Natarajan
    Edited by: Nattu on Mar 14, 2012 11:35 PM

  • Dynamic actions and tabular forms

    I'm trying to attach a dynamic action to a tabular form item, and it's not working the way I'm expecting it to. Since you can't attach dynamic actions to parts of a tabular form in the "normal" way that you can for page items, I'm using JQuery selectors to pick the parts to link to. For links (such as opening a pop-up window with more information about a row), this is working fine. But I'm really struggling to attach to a simple checkbox.
    On my tabular form, I've got a simple checkbox. I've tried putting text in the Element Attributes, Element Option Attributes, CSS Class, CSS Style, and HTML Expression fields, but none of them appear to be making it through to the source code of the generated page. Which means, I think, that I'm limited to using a jQuery Selector along the lines of "input[name=f07]", but creating a dynamic action on click or on change with that selector doesn't seem to ever fire.
    What am I missing?
    -David

    Ok, this is interesting. When I tried to mock this up on apex.oracle.com, I was able to make it work (though I had to change the selector to "input[name=f07_NOSUBMIT]", which means I'm going to have to walk the DOM to get the actual value...but I'm pretty sure I can handle that). After a bit of scratching my head, I eventually found that my pop-up dynamic action was somehow or other blocking the checkbox dynamic action from firing. Changing the sequence so that the checkbox DA happens first allows them both to fire.
    Here's the javascript from the pop-up DA (it's based on this post by Havard Kristiansen):
    /* prevent default behavior on click */
    var trgt = this.triggeringElement.href;
    var e = this.browserEvent;
    e.preventDefault();
    /* Trigger JQuery UI dialog */
    var horizontalPadding = 30;
    var verticalPadding = 30;
    $('<iframe id="modalDialog" src="' + trgt + '" />').dialog({
         title: "Item Details",
         autoOpen: true,
         width: 570,
         height: 400,
         modal: true,
         close: function(event, ui) {$(this).remove();},
         overlay: {
              opacity: 0.5,
              background: "black"}
    }).width(570 - horizontalPadding).height(400 - verticalPadding);
    return false;At this point, the checkbox DA's action is simply an alert box. Like I said, I'm not sure what's going on, but I'm at least able to move forward...
    -David

  • V4.0 - Tabular form ORA-01445: cannot select ROWID from, or sample,

    Hi
    I'm creating a tabular form in version 4.0.
    The select is based on three tables all of which have primary keys, and the keys are selected, but every time I run the page I get the following error:-
    failed to parse SQL query:
    ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
    The query runs just fine in TOAD
    Any ideas?
    Thanks
    Mike
    select
    PRL.PERF_RATING_LINE_ID,
    PRL.PERF_RATING_LINE_ID PERF_RATING_LINE_ID_DISPLAY,
    PRL.BUSINESS_UNIT,
    PRL.EMPLID,
    ''''||PRL.REVIEW_YEAR REVIEW_YEAR,
    PRL.REVIEW_PERIOD,
    PRL.PERFORMANCE_SCORE,
    PRL.MODERATED_SCORE,
    PRL.HRM,
    PRL.COMMENTS,
    PBR.BU_DESC,
    ''''||PBR.DEPTID DEPTID,
    PBR.DEPT_DESC,
    PBR.EMPLOYEE_NAME,
    PBR.GRADE,
    PRL.SCORE_APPROVED_BY,
    PBR.TEMP_PERM,
    PBR.GENDER,
    PBR.JOB_START_DATE,
    decode(DECODE(SUBSTR(PBR.FLAG,1,5),'Job s',substr(PBR.FLAG,instr(PBR.FLAG,'~',1)+2,3)),
    'HIR','Hired','XFR','Transfer','REH','Rehire')||
    decode(SUBSTR(PBR.FLAG,1,30),'Job starts during period ~ XFR',' - '||substr(PBR.FLAG,instr(PBR.FLAG,'~',1,2)+2)) JOB_START_DETAILS,
    PBR.APPOINTMENT_DATE,
    SUBSTR(PBR.JOB_END_DETAILS,INSTR(PBR.JOB_END_DETAILS,'~',1,2)+2) JOB_END_DATE,
    SUBSTR(PBR.JOB_END_DETAILS,INSTR(PBR.JOB_END_DETAILS,'~',1,1)+2,INSTR(PBR.JOB_END_DETAILS,'~',1,2)-INSTR(PBR.JOB_END_DETAILS,'~',1,1)-2) REASON,
    PBR.JOB_GROUP,
    PBR.JOB_GROUP_DESC,
    PBR.JOBCODE,
    PBR.JOBCODE_DESC JOB_DESC,
    PBR.JOB_FAMILY,
    PBR.JOB_FAMILY_DESC,
    PBR.PBR_ID,
    MD.MGR_DEPT_ID
    from PERFORMANCE_BASE_REFRESH_V PBR,
    PERFORMANCE_RATING_LINE PRL,
    Y00_OPR_MGR_DEPT MD
    WHERE (PRL.BUSINESS_UNIT = PBR.BUSINESS_UNIT
    AND PRL.EMPLID = PBR.EMPLID
    AND PRL.REVIEW_YEAR = PBR.REVIEW_YEAR
    AND PRL.REVIEW_PERIOD = PBR.REVIEW_PERIOD)
    AND MD.OPRID = :APP_USER
    AND INSTR(':'||MD.DEPTS_MANAGED||':',':'||PBR.DEPTID||':') > 0
    AND MD.MGR_DEPT_ID > 0
    AND PBR.ADMIN_CENTRE IN
    (select c.deptid AC
    from [email protected] A,
    [email protected] C
    where A.ROWSECCLASS = C.ROWSECCLASS
    AND C.DEPTID != 'ZZZZ'
    and a.oprid = :APP_USER)
    AND (:P2210_BUSINESS_UNIT IS NULL
    OR PBR.BUSINESS_UNIT = :P2210_BUSINESS_UNIT)
    AND (:P2210_EMPLOYEE_NAME IS NULL
    OR INSTR(UPPER(PBR.EMPLOYEE_NAME),UPPER(:P2210_EMPLOYEE_NAME)) > 0)
    AND (:P2210_DEPARTMENT IS NULL
    OR PBR.DEPTID = :P2210_DEPARTMENT)
    AND (:P2210_PERFORMANCE_RATING IS NULL
    OR PBR.PERFORMANCE_SCORE = :P2210_PERFORMANCE_RATING)
    AND (:P2210_MODERATED_RATING IS NULL
    OR PBR.MODERATED_SCORE = :P2210_MODERATED_RATING)
    AND (:P2210_GRADE IS NULL
    OR PBR.GRADE = :P2210_GRADE)
    AND (:P2210_PERM_TEMP IS NULL
    OR PBR.TEMP_PERM = :P2210_PERM_TEMP)
    AND SUBSTR(NVL(PBR.JOB_END_DETAILS,'XXX'),1,3) NOT IN ('TER','TOC')
    AND PRL.SCORE_APPROVED_BY IS NULL

    Hi Marc,
    Thanks again for the quick reply and all the support the dev team is providing to us.
    Couple of question finally on this issue:
    - fixing the "copy page"/"copy validation" bug, our workaround - by making a page copy - we've found to use the standard validation on tabular form based on complex views will go away, right?
    - I made a sql trace when running the originally created tabular form page and I found the statement generated by the apex engine which gives the ORA-01446. Just wondering, would it be possible that apex is using the PK defined during the wizard instead of the rowid?
    - If not, would it be a possible enhancement request in the future to let the developer name the ROWID column optionally, and then apex will use that column as rowid instead of the ROWID? This can give flexibility for us as developers, in this case complex views (with instead of triggers) can be standard way supported. What I mean exactly is to create the above view in the testcase as follows (most of these cases there is always a base table in the view, and the rest of the tables are used as lookups, so I can pick up the desired ROWID in the view with an alias):
    CREATE OR REPLACE VIEW  CUSTOMER_ORDERS_V  AS
      SELECT cus.customer_id,
                cus.cust_last_name,
                cust_first_name,
                cus.cust_city,
                COUNT (ord.order_id) order_count,
                CUS.ROWID ROW_ID
           FROM demo_customers cus, demo_orders ord
          WHERE ord.customer_id(+) = cus.customer_id
       GROUP BY cus.customer_id,
                cus.cust_last_name,
                cust_first_name,
                cus.cust_city,
                CUS.ROWID;and then at design time, I could pick up the ROW_ID column as rowid, so all the rest of the functionality could work as working now on simple views and tables.
    What do you think on that?
    best regards,
    Peter

  • Column in tabular form non-editable on update but editable on insert?

    I've got a tabular form and one of the columns should be editable when one chooses insert new row but once the row is created the column should not be editable.
    So I want a textfield when creating a new row and a standard report column for the rows already in the table.
    Can this be done?
    I really need to keep this simple (developmentwise) so it need to be done within apex's tabular form "wizard"...
    Thanks in advance
    Andreas

    This is an alteranative way to do the same
    This code has been tested by me in Apex 4.1.1
    Step 1 --> Create a Java Script and add it to the JavaScript --> Function and Global Variable Section
    One Can get the name by using Right Clicking on the PK field in Chrome and Selecting Inspect Element
    function ro()
        var pk_id = document.getElementsByName("f02");
        for (var i=0;i<pk_id.length;i++)
          if(pk_id[i].value!="")
               pk_id[i].readOnly = "readonly";
    Step 2 --> Create a Dynamic Action
    Select Advanced
    Select the Event --> Framework Events -->After Refresh --> Region --> Select Your Tabular form Region
    Condition --> No Condition
    True Action --> Execute JavaScript Code
    In the Code box type javascript:ro()
    The box will only make the Existing Rows RO, When one presses the AddRow as the region is not refreshed the user is able to add new data in the text field.
    Works with Delete and Cancel as well.

  • Select list enable / disable in tabular form

    Hi,
    I have created report on (ACT_COA_SEGMENT_MAS) table and this is master table , and created link on this report, when i click on report link, control moves to tabular form that is based on detail table (ACT_SEGMENT_VALUES_MAS)
    In master table there is column,
    SEGMENT_ID number primary key;
    QUALIFIER varchar2(1);
    If in master table qualifier column value is 'N' then
    then in detail table (ACT_SEGMENT_VALUES_MAS) column account type cannot be null and column should enable.
    If in master table QUALIFIER column value other than 'N' then Account column in detail table should disable . and value should not be enterable.
    and ACCOUNT_TYPE column in deatil table is a select list.
    How i can do this?
    Thanks & Regards
    Vedant
    Edited by: Vedant on Jan 10, 2013 10:14 PM

    Vedant wrote:
    If in master table qualifier column value is 'N' then
    then in detail table (ACT_SEGMENT_VALUES_MAS) column account type cannot be null and column should enable.
    If in master table QUALIFIER column value other than 'N' then Account column in detail table should disable . and value should not be enterable.
    and ACCOUNT_TYPE column in deatil table is a select list.
    How i can do this?One way - sadly a bit of work - would be to use APEX_APPLICATION_ITEM to generated the detail items as a manual tablular form where you can control the disabled property when generating the tabular form fields using CASE statements, writing manual PL/SQL processes and the built-in APEX_ITEM collection to manually perform insert/update/delete operations on submit. Check the documentation for the full syntax of using APEX_ITEM functions to generate HTML items.
    An example from the Oracle docs looks like
    SELECT
      empno,
      APEX_ITEM.HIDDEN(1,empno)||
      APEX_ITEM.TEXT(2,ename) ename,
      APEX_ITEM.TEXT(3,job) job,
      mgr,
      APEX_ITEM.DATE_POPUP(4,rownum,hiredate,'dd-mon-yyyy') hiredate,
      APEX_ITEM.TEXT(5,sal) sal,
      APEX_ITEM.TEXT(6,comm) comm,
      deptno
    FROM emp
    ORDER BY 1where the disabled property could be specified in the unlisted fifth argument to APEX_ITEM.TEXT. The first item to the APEX_ITEM calls is a number defining the G_FXX global variables so that 1 identifies the item later as apex_application.g_f01(9) - 9 being symbolic for a collection identifier -, ename as apex_application.g_f02(i),m and so on. The G_F99 items can be reference on submission in Pl/SQL processes through looping, something like (this example assumes all array items are populated - under some circumstances they may not be)
    for i in 1..apex_application.g_f01.count loop
      update my_table set sal = apex_application.g_f05(i) where empno = apex_application.g_f01(i);
    end loop;Edited by: riedelme on Jan 11, 2013 7:12 AM

  • Help needed in row selection in Tabular form across pages

    Hi,
    I have a tabular form report similar to http://htmldb.oracle.com/pls/otn/f?p=31517:95. I want to select some rows from first page and then use the pagination to get to the next page, select some more rows and hit the submit button for processing. The rows selected in the last page alone are picked up for processing, and the ones selected in the earlier pages are lost. I see the same behaviour in Denes' example as well. I picked a row in the first page and a row in the next page, and then click "Pick Records", i see only the record i picked on the second page.
    I did play around with "partial page refresh" setting for the tabular form region, but that does not help.
    Is there a way to select across pages in a tabular form?
    thanks,
    Rams
    Edited by: rams1234 on Jan 22, 2009 10:19 AM

    Okay. I could make this work, but this seems to be a roundabout way for me. In my case I dont have any database related query to get the values, hence the Application level process may not be needed.
    When I select the checkbox, i get the value. I am hoping that I should be able to send the value to a javascript function and update the filed value in the function itself. Please see the function below..
    function setFileID(pThis) {
    var chkvals=pThis.value;
    var fldValue = new $x('f_FILELIST').value ;
    if (fldValue != 0)
    { $x('f_FILELIST').value= fldValue+'-'+chkvals;}
    else
    { $x('f_FILELIST').value = chkvals ;}
    This function works fine in making up the list. The issue is, when an already selected row is unselected, the value of the checkbox gets added one more time :) If I detect the checkbox status and subtract the corresponding value, this will be perfect..
    Thanks for the link anyway. I am marking this question answered.
    regards,
    Rams.
    Edited by: rams1234 on Jan 22, 2009 1:18 PM

  • Tabular Form Not Updating

    I have an existing tabular form that has been working fine. I created a new column for and "edit" button to allow a user to edit an entry that is listed in a tabular form row. I did this so I could validate a delete action after I read that validate from a tabular form is not too reliable. I noticed after I created the edit button (which is a link to another page) that the "ApplyMRU" process isn't working. I press the "Add Row" button which gives me a new row to work with. I then press the "Submit" button. The page is submitted but when it is rendered the tabular form region is empty. I query the table but the row that I tried to insert is not there. When I created the "Edit" button (link) as a new column in the tabular for could I have broken something in the tabular form process(es)?

    You are saying that you created a new colum as well. What kind of display does this Tabular Form Element has? What content are Reference Table Owner, Reference Table Name and Reference Column Name showing?
    Denes Kubicek

  • Problem in refreshing Tabular Form On closing Modal Page

    Hi ,
              I am not able to refresh tabular form region on close of the modal page.
              can someone help me ?
    Thanks and Regards,
    Madonna

    The fault may lie with the plugin itself. The close event is simply not being triggered. Auto-close and manual close work, but those are the only ones. The other events are not being triggered as the internal event names as defined in the plugin do not match the events triggered from the plugin javascript code.
    For example, the close action of colorbox (the js plugin used in the modal page plugin to style the iframe) is bound like this:
             onClosed: function() {
                $(document).trigger('apexmodalpageclosed');
    However, when you go to the plugin and edit it, and scroll down to the events section, you can see that for the close event the internal name "modalpageclose" has been filled out.
    This means the event will never work with the plugin out of the box. To fix this, simply edit the internal name of the event to "apexmodelpageclosed".
    The same issue exists for the open and complete events by the way, where the javascript fires an "apex..." event but the internal name does not match up.

  • A default value in tabular form

    Hi all,
    I have a simple tabular form, and i'd like that if a certain field doesn't contain any value to fill it with a default value.
    I tried to do it via default value attribute, but i'd like it to take place in a certain record in the table and not in all the records (which i can identify by a key, e.g. id)
    how would you do it????
    Liron

    Hello Liron,
    >> when i submit the page, it doesn't take the default value (which indeed appear on screen) but null
    Well, if this default value is the only “change” in this row, it will not be updated into the table, because the tabular form mechanism is not detecting any changes in this row – remember, as far as the tabular form goes, this is the original value of the cell.
    However, it seems like you want this default value to be saved, regardless of other possible activities of the tabular form. In this case, you should run the update prior to rendering the tabular form. You can use a before header PL/SQL block to do that. Using the EMP example, you can use a similar code in your pl/sql block:
    update emp
    set comm = 10
    where comm is null and deptno=20This pl/sql block will run prior to your tabular form query, and all the updates will be reflected in the rendered result. Now you can continue to work with the tabular form to enter the rest of the changes you need (including deleting the new default values).
    Don’t forget to change the tabular form query back to its original form. If you are using this technique, you don’t need the CASE statement.
    Regards,
    Arie.

  • How to assign values to columns in a tabular form

    hello,
    my tabular form allows insert on a table.
    some of the fiels in that table are not null and are hidden from the user.
    before submitting a new row the hidden columns needs to get their values
    from a database function.
    is there a way to do it in a tabular form? and how?
    Thanks,
    Iris.

    HI,
    depends you can use a bunch of different approach, however if you want to use tabular forms note that if you change the qry on wich is based the tforms usually you get an error (if you read around the forum this is because the MULTI PROCESS ROW is built on a table the time you use the wizard).
    If you need this function to 'work' with null value go to
    Tabular Form Element
    --> pl/sql expression or function and call your function in the db.
    Under my opinion if you want to have more control build a tabular form of yours and write your DELETE / UPDATE / INSERT statement and build your tabular form / report using the APEX_ITEM synthax.
    You can use as well a checkbox and loop to build your multirow process (that conditionally process the checked item).
    And if you have a common rules for a specific table i suggest you to manage these rules directly on the that table using triggers.
    hope it helps

Maybe you are looking for