Alert On UDF's when Duplicate value exists

Hi Experts,
I want an Alerts message on a UDF's Gate Entry Pass (G.E. No), when any duplicate value is entered in this UDF's.
e.g.:-  a value is entered in this udf is 30.  when same value is entered it should give an alert that value already exists.
Thanks & Regards,
Pankaj Sharma.

Hi Gordon,
I am using this UDF's on the GRPO Form and the UDF's name is U_GE_NO(Gate Entry No). my client  uses this field when the material entered the company premises and entered the unique value. so to remove duplicacy in data the want the alert.

Similar Messages

  • Unable to Enforce Unique Values, Duplicate Values Exist

    I have list in SP 2010, it contains roughly 1000 items.  I would like to enforce unique values on the title field.  I started by cleaning up the list, ensuring that all items already had a unique value.  To help with this, I used the export
    to excel action, then highlight duplicates within Excel.  So as far as I can tell, there are no duplicates within that list column.
    However, when I try to enable the option to Enforce Unique Values, I receive the error that duplicate values exist within the field and must be removed.
    Steps I've taken so far to identify / resolve duplicate values:
    - Multiple exports to Excel from an unfiltered list view, then using highlight duplicates feature > no duplicates found
    - deleted ALL versions of every item from the list (except current), ensured they were completely removed by deleting from both site and site collection recycle bins
    - Using the SP Powershell console, grabbed all list items and exported all of the "Title" type fields (Item object Title, LinkTitle, LinkTitleNoMenu, etc) to a csv and ran that through excel duplicate checking as well. 
    Unless there's some rediculous hidden field value that MS expects anyone capable of attempting to enforce unique values on a list (which is simple enough for anyone to figure out - if it doesn't throw an error), then I've exhausted anything I can think
    of that might cause the list to report duplicate values for that field.
    While I wait to see if someone else has an idea, I'm also going to see what happens if I wipe the Crawl Index and start it from scratch.
    - Jon

    First, I create index for a column in list settings, it works fine no matter duplicate value exists or not;
    then I set enforce unique values in the field, after click OK, I get duplicate values error message.
    With SQL Server profiler, I find the call to proc_CheckIfExistingFieldHasDuplicateValues and the parameters. After reviewing this stored procedure in content database,
    I create the following script in SQL Server management studio:
    declare @siteid
    uniqueidentifier
    declare @webid
    uniqueidentifier
    declare @listid
    uniqueidentifier
    declare @fieldid
    uniqueidentifier
    set @siteid='F7C40DC9-E5D3-42D7-BE60-09B94FD67BEF'
    set @webid='17F02240-CE04-4487-B961-0482B30DDA84'
    set @listid='B349AF8D-7238-419D-B6C4-D88194A57EA7'
    set @fieldid='195A78AC-FC52-4212-A72B-D03144DC1E24'
    SELECT
    * FROM TVF_UserData_List(@ListId)
    AS U1 INNER
    MERGE JOIN
                NameValuePair_Latin1_General_CI_AS
    AS NVP1 WITH (INDEX=NameValuePair_Latin1_General_CI_AS_MatchUserData)
    ON NVP1.ListId
    = @ListId AND NVP1.ItemId
    = U1.tp_Id
    AND ((NVP1.Level
    = 1 AND U1.tp_DraftOwnerId
    IS NULL)
    OR NVP1.Level
    = 2)
    AND NOT((DATALENGTH(ISNULL(NVP1.Value,
    = 0)) AND U1.tp_Level
    = NVP1.Level
    AND U1.tp_IsCurrentVersion
    = CONVERT(bit, 1)
    AND U1.tp_CalculatedVersion
    = 0 AND U1.tp_RowOrdinal
    = 0 INNER
    MERGE JOIN
                NameValuePair_Latin1_General_CI_AS
    AS NVP2 WITH (INDEX=NameValuePair_Latin1_General_CI_AS_CI)
    ON NVP2.SiteId
    = @SiteId AND NVP2.ListId
    = @ListId AND NVP2.FieldId
    = @FieldId AND NVP2.Value
    = NVP1.Value
    AND NVP2.ItemId <> NVP1.ItemId
    CROSS APPLY TVF_UserData_ListItemLevelRow(NVP2.ListId, NVP2.ItemId,
    NVP2.Level, 0)
    AS U2 WHERE ((NVP2.Level
    = 1 AND U2.tp_DraftOwnerId
    IS NULL)
    OR NVP2.Level
    = 2)
    AND NOT((DATALENGTH(ISNULL(NVP2.Value,
    = 0))      
    I can find the duplicate list items based on the result returned by the query above.
    Note that you need to change the parameter values accordingly, and change the name of NameValuePair_Latin1_General1_CI_AS table based on the last parameter of the
    proc_CheckIfExistingFieldHasDuplicateValues stored procedure. You can review the code of this stored procedure by yourself.
    Note that direct operation on the content database in production environment is not supported, please do all these in test environment.

  • Alert to be fired only for first record when duplicate entries exist

    Hello,
    This is related to Oracle forms 10g.
    I have a multi record block wherein I am entering and storing some codes, something like below
    Code Description
    =====================
    ABCD AAAAAAAAAAAA
    PQRS BBBBBBBBBBBBB
    DDDD SSSSSSSSSSS
    ABCD DHGFKSDHKSHG
    PQRS DFJHHGS
    EEEE SDT85604ET
    =====================
    Now I need to display an alert/msg from when-validate-item of the Code field. So now if I am on first record, the alert/msg will be displayed for code ABCD which is Ok. Now on next record I enter a different code PQRS as given above, the alert will again be displayed which is Ok. If I enter a code which was previously entered in the multi record block and alert/msg had been displayed at that first time, the alert/msg need not be displayed now again i.e. if I enter ABCD again in fourth record, the alert should not be displayed.
    Note that this need to be done at the data entry time itself. I guess may be it can be done using record groups/ plsql table.
    Any help with a way to solve this issue will be highly appreciated..
    Thanks and Regards...

    As you have already guessed, you have to be able to keep track of how many times a value has been entered. If you know what all of the possible "CODE" values are at design-time, you could create a counter variable for each value, but this would be a total pain. A better solution would be to keep a dynamic running total that you can quickly check against. For this I recommend you use a Forms Record Group. Take a look at the Forms - Record Group Processing (Duplicate Value Checking) demo I wrote. Using the Forms Rec_Group package provided in this demo, you could easly modify the process listed in the document to work in your scenario. Follow all of the steps in the demo. For your situation, you will need to modify the When-Validate-Item trigger so that instead of checking for dupicates and failing the form if a duplicate is found, you will check the number of entries for a value in the record group and display a message if the count is 0 or not display a message if the count is greater than 0. Your modified WVI trigger might look like this:
    DECLARE
       ignore     NUMBER := 0;
       bignore   BOOLEAN := FALSE;
    BEGIN
       IF ( :YOUR_BLOCK.CODE IS NOT NULL ) THEN
          ignore := Rec_Group.Get_Number(Rec_Group.rg_name, :YOUR_BLOCK.CODE);
          IF ( ignore = 0 ) THEN
              -- Display your message
          ELSE
              -- Don't display any message
          END IF;
          /* add the code to the record group */
          bIgnore := Rec_Group.Add_Value(rec_group.rg_name, :YOUR_BLOCK.CODE, :system.trigger_record);
       END IF;
    END;Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Mar 30, 2011 3:07 PM

  • How to raise an error message when duplicate value is entered in a tabular field column? Basically not allow duplicate value at the form level.

    Hi all,
    I have created a form with one data block MATURED_FD_DTL which looks like below:
    ACCT_FD_NO
    CUST_CODE
    FD_AMT
    FD_INT_BAL
    TDS
    CHQ_NO
    ADD_FD_AMT
    P_SAP_CODE
    P_TYPE
    CREATE TABLE MATURED_FD_DTL
      ACCT_FD_NO    VARCHAR2(17 BYTE)               NOT NULL,
      CUST_CODE     NUMBER(9),
      FD_AMT        NUMBER(15),
      FD_INT_BAL    NUMBER(15),
      TDS           NUMBER(15),
      CHQ_NO        NUMBER(10),
      ADD_FD_AMT    NUMBER(15),
      P_SAP_CODE    NUMBER(10),
      P_TYPE        VARCHAR2(1 BYTE)
    For MATURED_FD_DT.ACCT_FD_NO, Trigger: KEY_NEXT_ITEM, I have written the following code:
    DECLARE
    V1 NUMBER;
    V2 NUMBER;
    BEGIN
    V1:=:MATURED_FD_DTL.ACCT_FD_NO;
    MESSAGE('V1:'||V1);
    MESSAGE(' ');
    END;
         GO_ITEM('MATURED_FD_DTL.CUST_CODE');
    This is just a dummy code.
    When ever i enter the value in the field of ACCT_FD_NO, it pops up a message saying "V1:Value of ACCT_FD_NO",
    So i want to store that value .
    Compare them & if it is egual, it should pop up a message saying duplicate value is entered and must not allow to enter, at form_level.
    So how can I compare the ACCT_FD_NO value between FIRST_RECORD and NEXT_RECORD ??
    Help Me .
    Thank You.
    Oracle Forms 6i.
    Oracle 9i.

    Thank You HamidHelal.
    Actually before posting the code, I went through the first link you have mentioned. I tried also, it is quite tedious procedure, however i dint get the proper result, may be i have done some mistake. Anyways , can you tell me how do i check in database table, if a value exists OR IF VALUE FOUND & then message and raise form trigger failure; something like below.
    IF :MATURED_FD_DTL.ACCT_FD_NO EXISTS
    THEN MESSAGE('YOU HAVE ENTERED AN EXISTING OR DUPLICATE VALUE');
              MESSAGE(' ');
    RAISE FORM_TRIGGER_FAILURE;
    END;
    OR
    IF :MATURED_FD_DTL.ACCT_FD_NO FOUND
    THEN MESSAGE('YOU HAVE ENTERED AN EXISTING OR DUPLICATE VALUE');
              MESSAGE(' ');
    RAISE FORM_TRIGGER_FAILURE;
    END;
    Is there any equivalent in the form in oracle forms 6i?? Please let me know how do i do this??

  • Handling the case when no value exists

    Hello,
    I am reading in the documentation about the Context class and the lookup function, but it does not state clearly what it does when a value is not found in the naming service. Does it return null, throw an exception, or what?
    Thanks.

    Please do not re-post. It would be easier to follow up a single thread.

  • Customize Alert messages for checking duplicate value and Success alert

    Hi All,
    I want to show two alert against the same "Submit" button to--
    1. Alert messages for checking duplicate value and show the Duplicate value found alert and
    2. Success Alert if the form is success to commit and no duplicate value found.
    I did all thing but when alert-1 shows and i pressed the ok button of the alert then the second alert also shows which i don't want to show.
    Which i can do in this issue? Have there anyone to help me!
    Arif

    Hi Manu,
    I have placed the following code
    1. against the Submit button--
    if error_code=40508 then
         commit_form;
    elsif :USERDELETION.CANCELLATION_USERID is not null then
    do_key('COMMIT_FORM');
    else null;
    end if;
    2. Code against the key-commit trigger in the form level--
    commit_form;
    DECLARE
    vAlert NUMBER;
    BEGIN
    set_alert_property('ALERT_TO_VERIFY',ALERT_MESSAGE_TEXT, 'Your Form has successfully submitted and your Reference id is '||:USERDELETION.REF_NO);
    vAlert:=SHOW_ALERT('ALERT_TO_VERIFY');
    END;
    3. Code against the on-error trigger in the form level--
    DECLARE
    vAlert NUMBER;
    BEGIN
         if ERROR_CODE = 40508 then
    set_alert_property('ERROR_ALERT',ALERT_MESSAGE_TEXT, 'This user deletion request has already submitted of the user named '||'"'||:USERDELETION.FULLNAME||'"');
    vAlert:=SHOW_ALERT('ERROR_ALERT');
    elsif
              ERROR_CODE = 40202 then
    set_alert_property('ERROR_ALERT',ALERT_MESSAGE_TEXT, 'Existing userid must be filled-up !');
    vAlert:=SHOW_ALERT('ERROR_ALERT');
    else
                   message(error_type||to_char(error_text)||': '||error_text);
    end if;
    END;
    If there have any confusion, please ask me.
    Arif

  • System error occurred (RFC call),key value exists in duplicate

    hi bw expert ,
    i happen the error report.
    "system error occurred (RFC call).
    key value exists in duplicate (Not allowed by the ODS object type).
    Activation of data records from ODS object Z08TRFKP terminated.
    No confirmation for request odsr_80p13w4lqhnib3g9tiflvth56 when activating ODS object Z08TRFKP.
    Request REQU_EVZB7CK82H7YMS13X3G42GKQY , data package 000001 contains errors with status 5 .
    Request REQU_EVZB7CK82H7YMS13X3G42GKQY , data package 000001 not correct.
    Inserted records 1- ; Changed records 1- ; Deleted records 1-
    pls, help me .
    thanks.

    hi experts,
    the first, i initial update the data from r3 to bw ods, it is successful. the second, the system automatic touch off delta update from r3 to bw ods. it is false. now i have deleted the false delta update and repeat extractive. but it is also error.
    please help me again.
    thanks.

  • Inserting duplicate values when only MANDT is primary key

    Hello experts,
    I have 4 fields in my UDT(user defined table) namely MANDT, ZEVENT, ZRECIPIENT and ZEMAIL.
    Now, Only MANDT is the primary key. My question is, how can I insert duplicate values
    via SM30?
    Again, thank you guys and take care!

    Hi again,
    1. open the Layout of that screen
    2. using drag&drop
       just REMOVE the field from the table control.
    3. Also
    4. In the flow logic of that screen,
       remove the line / commen it
       which has been put in CHAIN
      for eg.
       FIELD YHRT_FUNMST-FUNSORT .
    5. Activate everything
    6. try again via sm30 in new session.
    7. NOW IT WILL WORK. I JUST TRIED IT.
    regards,
    amit m.

  • How to restrict the duplicate values in lov column of VO based Adv Table

    Hi Gurus,
    I want to restrict the duplicate values at lov which is a colunm in an Adv Table.
    If user enters duplicate values then first it should show an error msg that Duplicate values have been entered.
    After the duplicate values have been removed, then the user can save all the values in the table.
    My Adv Table is based on a VO.
    The link how to restrict the duplicate values at form level
    talks about Adv Table based on a EoVO, which doesnot work in my case.
    My Approach,
    I am iterating through RowSetIterator and committing through PROCEDURE.
    I am able to avoid duplicate entry through a function checkRespId. (given below)
    Below code is for iterating and committing.
    public void saveline(String reqid,String userid)
    System.out.println("RequestId/saveline"+reqid);
    System.out.println("UserId/saveline"+userid);
    OAViewObject vo = (OAViewObject)getRespLineVO1();
    RespLineVORowImpl row = null;
    int fetchedRowCount = vo.getFetchedRowCount();
    RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
    if (fetchedRowCount > 0)
    deleteIter.setRangeStart(0);
    deleteIter.setRangeSize(fetchedRowCount);
    for (int i = 0; i < fetchedRowCount; i++)
    System.out.println("Inside the for LOOP");
    row = (RespLineVORowImpl)deleteIter.getRowAtRangeIndex(i);
    String respoidid = row.getAttribute("ResponsibilityId")+"";
    String respname = row.getAttribute("ResponsibilityName")+"";
    String stdate = row.getAttribute("StartDate")+"";
    String enddate = row.getAttribute("EndDate")+"";
    String linestatus ="A";
    if(userid!=null)
    if(!(respoidid.equals("null")) && respoidid!=null)
    String checkingrespid=null;
    checkingrespid = checkRespId(userid,respoidid);+contains no if not duplicate and yes if its duplicate+
    System.out.println("checkingrespid for Resp with ID :"+respoidid+"exists or not "+checkingrespid);
    if(checkingrespid.equals("No"))
         String message, result = null;
    Connection txn = getOADBTransaction().getJdbcConnection();
    try
    calling PROC ...
    catch(Exception e)
    message = "Error in Inserting into line" + e;
    throw new OAException(message, OAException.ERROR);
    else
    throw new OAException("You have entered duplicate no. of values", OAException.ERROR);
    else
    System.out.println("respoidid is null");
    break;
    deleteIter.closeRowSetIterator();
    public String checkRespId(String userid,String respoidid)
    String createRow="No";
    OAViewObject vo = (OAViewObject)findViewObject("CheckRespVO1");
    if (vo != null)
    vo.setWhereClauseParams(null);
    vo.setWhereClauseParam(0, userid);
    vo.setWhereClauseParam(1, respoidid);
    vo.executeQuery();
    System.out.println("ROW COUNT IS "+vo.getRowCount());
    if(vo.getRowCount()>0)
    createRow="Yes";
    else
    createRow="No";
    return createRow;
    Problem:
    I remove the duplicate entries and click on save and get this error.
    Unable to perform transaction on the record. \nCause: The record contains stale data. The record has been modified by another user.
    \nAction: Cancel the transaction and re-query the record to get the new data.
    Thanks,
    Sombit

    Hi Anil,
    I am trying out your code but stuck in inserting the rows
    using your code in URL: http://oracleanil.blogspot.com/2010/09/oaf-passing-table-type-object-to-oracle.html
    I am always getting the same exception i.e COde blast in when I run.
    My modified code is:
    String[] as = null;
    Number[] vNumber = null;
    Number[] vNumberrespid = null;
    Number reqidnumber = null;
    reqidnumber = new Number(Integer.parseInt(reqid));
    Connection txn = getOADBTransaction().getJdbcConnection();
    String mCreateSearchRequestStatement = null;
    OAViewObject vo = (OAViewObject)findViewObject("RespLineVO1");
    int j = vo.getFetchedRowCount();
    try
    System.out.println("abouce try");
    vo.reset();
    if (vo.getFetchedRowCount() > 0)
    System.out.println(String.valueOf("Fetched row count ").concat(String.valueOf(vo.getFetchedRowCount())));
    int i = 0;
    as = new String[j];
    vNumber = new Number[j];
    vNumberrespid = new Number[j];
    while (vo.hasNext())
    vo.next();
    System.out.println(String.valueOf("Inisde the do while loop").concat(String.valueOf(i)));
    vNumber[i] = (reqidnumber);
    vNumberrespid = ((Number)vo.getCurrentRow().getAttribute("ResponsibilityId"));
    as[i] = String.valueOf(vo.getCurrentRow().getAttribute("ResponsibilityName")).concat(String.valueOf(""));
    System.out.println("Request ID "+reqidnumber[i]);//getting null even there is some value selected
    System.out.println("ResponsibilityId "+vNumberrespid[i]);//getting null even there is some value selected
    System.out.println("Resp Name "+as[i] );//getting null even there is some value selected
    i++;
    CallableStatement cs = txn.prepareCall("{call XX_PassTableType.XX_PassTableType_prc(:1, :2,:3)}");
    ARRAY array = new ARRAY(new ArrayDescriptor("APPS.JTF_NUMBER_TABLE", txn), txn, vNumber);
    ARRAY arraynew = new ARRAY(new ArrayDescriptor("APPS.JTF_NUMBER_TABLE", txn), txn, vNumberrespid);
    ARRAY array1 = new ARRAY(new ArrayDescriptor("APPS.JTF_VARCHAR2_TABLE_100", txn), txn, as);
    cs.setArray(1, array);
    cs.setArray(2, arraynew);
    cs.setArray(3, array1);
    cs.registerOutParameter(3, 2003, "JTF_VARCHAR2_TABLE_100");
    cs.execute();
    ARRAY error = null;
    error = (ARRAY)cs.getArray(2);
    if ((error != null) && (error.length() > 0))
    System.out.println(String.valueOf("Error is ").concat(String.valueOf(error.getArray())));
    String[] retError = new String[j];
    retError = (String[])error.getArray();
    System.out.println(String.valueOf("Error in saving data").concat(String.valueOf(retError[0])));
    cs.close();
    catch (Exception exception)
    throw new OAException("code blast", OAException.ERROR);
    Thanks,
    Sombit

  • Loop not working for check of duplicate values in a repeating table

    I have a form that is used for marking down problem items, describing the problems and assigning a value to the specified item. In some cases the problems belong to the same class. When they do, the value associated with the problem should only be marked once. If another problem in the same class is documented the value should not be recorded the second time. I have a variable that is called based on a switch statement in the exit event of the field that records the problem item number. The script in the variable is then supposed to check for duplicate values in the table. If no other problem item in that class is selected, then the problem value should be assigned a number. If another item from the same class has already been entered, then the problem value should just be left blank. I will paste the script for the variable below as well as the switch statement. When I used to call the variable based upon the change event for the problem item, the script work. At that time, the switch statement was related to a drop-down menu. We decided to get rid of the drop-down and just have the used type the item number. But to do so, I had to move the switch statement to the exit event for the field. when I did this, the script in the variable no longer worked properly. Here is the switch statment followed by the script in the variable:
    this.rawValue = this.rawValue.toLowerCase();
    var bEnableTextField = true;
    var i = "Inspection Criteria: ";
    var r = "Required Corrections: ";
    switch (this.rawValue)
      case "1a": // 1a- First debit option
        CorrectionsText.CorrectionLang = r+"Correction description for 1st debit";
        ViolCorrSection.ViolationsText.DebitVal = "C";
        ViolCorrSection.Reference.RefLanguage = i+"1st debit reference";
    break;
      case "1b": // 1b- Second debit option
        CorrectionsText.CorrectionLang = r+"Correction description for 2nd debit";
        ViolCorrSection.Reference.RefLanguage = i+"2nd debit reference";
        myScript.group1();
    break; //the script continues for various item numbers...
    ________________ variable script ________________________
    function group1()
    //Used in checking duplication of violations
    var oFields = xfa.resolveNodes("form1.MAINBODYSUB.ViolationsTableSubform.ViolationsTable.ViolCorrSectio n[*].ViolationsText.ItemNo"); // looks to resolve the repeating rows
    var nNodesLength = oFields.length; //assigns the number of rows to a variable
    var currentRow = xfa.resolveNode("form1.MAINBODYSUB.ViolationsTableSubform.ViolationsTable.ViolCorrSection ").index;
    var currentDebit = xfa.resolveNode("form1.MAINBODYSUB.ViolationsTableSubform.ViolationsTable.ViolCorrSection [" + currentRow + "].ViolationsText.DebitVal");
    for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) // this loops through Item Numbers looking for duplicate violations
    //console.println("nNodeCount: " + nNodeCount);
    var nFld = xfa.resolveNode("form1.MAINBODYSUB.ViolationsTableSubform.ViolationsTable.ViolCorrSection [" + nNodeCount + "]");
    //console.println("nFld.ViolationsText.ItemNo: " + nFld.ViolationsText.ItemNo.rawValue);
         if (nFld.ViolationsText.ItemNo.rawValue == "1a" || nFld.ViolationsText.ItemNo.rawValue == "1b" || nFld.ViolationsText.ItemNo.rawValue == "1c" || nFld.ViolationsText.ItemNo.rawValue == "1d") // looks for other 1s
              currentDebit.rawValue = "";
              nNodeCount = nNodesLength;  // stop loop
         else
            currentDebit.rawValue = "5";
    So, if you enter 1b the first time, you should get a value of 5 appearing in the debit value field. If you enter 1c next, because it belongs to the same group of class of problem items, there should be no value assigned. What happens now is that the values for 1b and 1c don't appear at all because the form thinks that the first 1b entry already existed.
    Any ideas? I have a stripped down version of the form that I can email to someone for reference if that would help. Thanks
    P.S. I am working with LiveCycle Designer ES 8.2.1....

    Hi,
    I can have a look at your form, but can you host it somewhere like Acrobat.com or google docs and add a link to it here.
    Regards
    Bruce

  • Select List to check duplicate values before putting into another item

    Hi All ,
    I have a select list which contains .. country regions like ( APAC , EMEA etc ) .
    When I select any region , all the countries belonging to the region fills in another item .
    Suppose I select APAC , all the countries like India , Japan etc all fills in another item .
    But the problem is , if I select twice APAC , it fills duplicate values . Its filling duplicate values .
    I want to put validation or check for country value ...
    Suppose I select ' APAC ' it fills all APAC countries in another item . Now Again If I select APAC then it first check the item whether the country is there or not . If already APAC countries are there in the Item then it will show an error message that " Value already Exist ' .
    I am not able to fix this problem . it is creating duplicate values in database table .
    Please some one help me on this ..
    Thanks
    Prashant

    Patrick ,
    Sorry , I am correcting my words ..
    I am using Multiselect List ( P11_REGION) having regions APAC , EMEA , LAD etc .
    When I select Region like APAC , it fills all the countries of APAC and puts into a List .
    If again I select APAC , it again fills all the APAC countries and puts into a list which causes duplicacy .
    I have one Application Process which returns Country according to Region selection and puts in the list .
    So , what i want is when user twice selects region APAC , it searches the list whether APAC countries are there or not . If countries are already exists then it show an error otherwise Puts the countries in the list .

  • Inserting duplicate values

    I'm very new to Forms..
    I've a table VIK_SAM with two columns : Id and Name
    I'm creating a layout with two text fields(to enter Id and Name) and a submit button.
    When I run the form, enter the values and click on submit button, duplicate values are inserted in the the table. like below
    Id Name
    20 abc
    20 abc
    How can I make sure only one record is being inserted. This is the code I had written in the WHEN BUTTON PRESSED Trigger..
    begin
         insert into vik_sam (id, name)
         values (:vik_sam.id, :vik_sam.name);
         commit;
    end;
    P.S.. This is not an assignment. I'm done with my current project and I'm on bench right now. So trying to learn this tool. :)

    The fact that you're doing a sql insert suggests to me that your block is not based on a database table. If that is true then try the following:
    begin
      insert into vik_sam (id, name)
      values (:vik_sam.id, :vik_sam.name);
      commit;
    exception
      when dup_val_on_index then
        message('A record already exists with that Id.');
        message('A record already exists with that Id.');
        raise form_trigger_failure;
    end;Alternatively, you could use a merge command to update the name if the ID already exists.

  • NDS error: duplicate value (-614) on Generic LDAP Export to NetIQ eDirectory

    Dear community,
    using the Generic LDAP Agent, the latest eDirectory (8.8.SP8 (20806.01) and FIM Version (4.1.3627.0)) I encounter the following problem in very special situations (namely when the value in eDirectory only differs from the FIM value by different upper/lower
    case letters:
    NDS error: duplicate value (-614)
    DirectoryOperationException: (0) 0 Server Message: The attribute exists or the value has been assigned.

    I don't see that as a Problem, when it is in fact doing string comparison.  You may need to write an advanced flow rule to simply say something like this
    CSHARP Snippet.  (if not equal, case does not matter)
    if !(csentry["co"].ToUpper().Equals(mventry["co"].ToUpper()))
     csentry["co"].Value =mventry["co"].Value ;
    Nosh Mernacaj, Identity Management Specialist

  • How to trigger alerts from UDF for file to file scenario

    Hi,
       My scenario is something like this.......
    I have lookup in which there exists more than one output value corresponding to this one input value.In such cases i need to raise an exception and trigger an alert from UDF so as to inform the functional team.
    Now this entire procedure has to be implemeted for file to file scenario.
    I am not using any RFC nor do i need a BPM.
    Entire scenario should be excuted without BPM and RFC.
    Can anyone kindly suggest me as to how to proceed for this so as to trigger alerts
    from UDF.
    Thanks in advance
    Madhu

    HI,
    Please see the below links
    Triggering XI Alerts from a User Defined Function - /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    Alerts with variables from the messages payload (XI) - UPDATED - /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step - Alert Configuration
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide - Trouble shoot alert config
    Regards
    Chilla

  • Avoiding null and duplicate values using model clause

    Hi,
    I am trying to use model clause to get comma seperated list of data : following is the scenario:
    testuser>select * from test1;
    ID VALUE
    1 Value1
    2 Value2
    3 Value3
    4 Value4
    5 Value4
    6
    7 value5
    8
    8 rows selected.
    the query I have is:
    testuser>with src as (
    2 select distinct id,value
    3 from test1
    4 ),
    5 t as (
    6 select distinct substr(value,2) value
    7 from src
    8 model
    9 ignore nav
    10 dimension by (id)
    11 measures (cast(value as varchar2(100)) value)
    12 rules
    13 (
    14 value[any] order by id =
    15 value[cv()-1] || ',' || value[cv()]
    16 )
    17 )
    18 select max(value) oneline
    19 from t;
    ONELINE
    Value1,Value2,Value3,Value4,Value4,,value5,
    what I find is that this query has duplicate value and null (',,') coming in as data has null and duplicate value. Is there a way i can avoid the null and the duplicate values in the query output?
    thanks,
    Edited by: orausern on Feb 19, 2010 5:05 AM

    Hi,
    Try this code.
    with
    t as ( select substr(value,2)value,ind
            from test1
            model
            ignore nav
            dimension by (id)
            measures (cast(value as varchar2(100)) value, 0 ind)
            rules
            ( ind[any]=  instr(value[cv()-1],value[cv()]),
            value[any] order by id = value[cv()-1] || CASE WHEN value[cv()] IS NOT NULL
                                               and ind[cv()]=0     THEN ',' || value[cv()] END      
    select max(value) oneline
    from t;
    SQL> select * from test1;
            ID VALUE
             1 Value1
             2 Value2
             3 Value3
             4 Value4
             5 Value4
             6
             7 value5
             8
    8 ligne(s) sélectionnée(s).
    SQL> with
      2   t as ( select substr(value,2)value,ind
      3          from test1
      4          model
      5          ignore nav
      6          dimension by (id)
      7          measures (cast(value as varchar2(100)) value, 0 ind)
      8          rules
      9          ( ind[any]=  instr(value[cv()-1],value[cv()]),
    10          value[any] order by id = value[cv()-1] || CASE WHEN value[cv()] IS NOT NULL
    11                                             and ind[cv()]=0     THEN ',' || value[cv()] END 
    12          )
    13        )
    14   select max(value) oneline
    15   from t;
    ONELINE
    Value1,Value2,Value3,Value4,value5
    SQL>

Maybe you are looking for

  • Can't log in or properly sync mobile accounts

    I recently purchased a Mini server running Mountain Lion. I have set up network accounts for six users for use by three stationary mini computers. I have two MacBook Airs each dedicated to one user. One those I created mobile accounts. I am having tw

  • No longer able to copy ipod serial number in itunes 11

    whats this? i work with ipods and used the copy and paste of serial numbers quite regularly and now i can't?

  • How do I place an image over the header?

    I am new to web design and new to Dreamweaver CS4.  I have used 2 column template with header and footer.  I have got a header title (an image) but I want to place an image to the left of it in the top left corner of the web page.  I want the header

  • Lumia 520 freezing on 3g

    Hello, I am using a Lumia 520,when I select 3g as the highest speed connection the phone freeze, I am now obliged only to use 2g,and 2g is very slow.What is the problem? Can anyone help me to solve this issue. Thanks

  • Issue while loading a csv file using sql*loader...

    Hi, I am loading a csv file using sql*loader. On the number columns where there is data populated in them, decimal number/integers, the row errors out on the error - ORA-01722: invalid number I tried checking the value picking from the excel, and fou