2016-03-30 8 views
1

Form FieldMulti Rekord Validierung in Oracle Forms

I Validierung über den Plan Verhältnis Feld anwenden wollte, wenn der Benutzer Verhältnis 100 überschreitet eingegeben dann Fehler zeigen, wie kann ich in tun, wenn Validate Trigger als Plan-Verhältnis ist das gleiche Feld, aber unterschiedliche

Aufzeichnungen

Antwort

1

Sie können Setup ein unsichtbares Berechnetes Element, fasst dieser Plan Verhältnis Feld Name es zum Beispiel als SUMMARY_FIELD und dann hinzufügen, wenn-VALIDATE-ITEM-Trigger für jeden Plan Verhältnis Punkt der Datensätze wie folgt aus:

BEGIN 
    IF :SUMMARY_FIELD>100 THEN 
     message('nok'); --or whatever alert you like 
     RAISE Form_Trigger_Failure; 
    END IF; 
END; 

PS. Wie man Berechnetes Element erstellen:

Um ein berechnetes Element zu erstellen:

1. In the Object Navigator, create a new interface item (make sure it is a control item). 



    Tip: The item's datatype must be compatible with the calculation you wish to use to 

    compute the item's value. For example, if you wish to compute an item's value with the 

    Sum function, create an interface item of datatype Number. 



2. Double-click the item's object icon to display the Property Palette. 

3. Under the Calculation node, set the item's Calculation Mode property to Formula or 

    Summary. 

4. If you set Calculation Mode to: 



    Formula, click on the Formula property, click the More button to display the Formula 

    dialog, and type a PL/SQL expression to define the formula. Click OK to compile the 

    expression. 



    Summary, use the Summary Function popList to select a summary type, then use the 

    Summarized Block and Summarized Item popLists to select the block and item whose 

    values will be summarized to compute a value for the calculated item. 
+0

Dank bro für Ihre Hilfe – Adil