Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    3

    Unanswered: Form Builder Trigger

    Newb, bare with me ..

    I have a text item on a form that I would like to place a calculated value into when I navigate to the item. The basic idea is

    Attorney Table = Has the billing rate
    UBS Table = Contains details row with the hours
    Billing Form = The form I want the value placed into

    So, I have attempted to create a pre-text-item trigger as follows

    SELECT SUM(UBS.HRS * ATTORNEY.BILLING_RATE) INTO :BILLING.AMOUNT_BILLED
    FROM UBS, ATTORNEY
    WHERE UBS.CASE_ID = :BILLING.CASE_ID AND
    UBS.ATTRN_ID = :BILLING.ATTRN_ID AND
    ATTORNEY.SSN = UBS.ATTRN_ID AND
    UBS.WORK_DATE BETWEEN :BILLING.BEG_DATE AND
    :BILLING.END_DATE;

    It's throwing a fit about the FROM UBS, ATTORNEY portion of the statement. I'm not even sure if I am going about this right way or not.

    Is there anyway to inlcude tables that are not associated with the datablock for the form I am working on, in this select statement?

    Maybe some type of pre-fix? I have been searching all over the place and haven't had any luck.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Form Builder Trigger

    "Throwing a fit" you say? It would probably help us to help you if you could be more specific - like the actual error code and message!

  3. #3
    Join Date
    Oct 2003
    Posts
    3
    My apologies,

    It's telling me that UBS is undefined, if I drop UBS from the query it tells me that Attorney is undefined.

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    You need to be logged in to the database as either the table owner, or as a user who can see those tables and can refer to them without the owner prefix (i.e. for whom "SELECT * FROM ubs" works in SQL Plus", etc.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •