This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,857 Users
  • 2,269,649 Discussions
  • 7,916,821 Comments

Discussions

Oracle Apex APEX 22.1 Calculation on Apex Form

SANPAT
SANPAT Member Posts: 1,124 Silver Badge

Dear Friends

We are creating a Invoice Form based on master / Details. In the form we tried to return the fields for total value , discount value and final value. where we should apply the return script so that it can save the record with these figures. currently if value gets store other fields are not getting stored. Please suggest.

sanjay

Answers

  • Hamza Al-abbasi
    Hamza Al-abbasi Mid-level Oracle APEX Developer Member Posts: 873 Bronze Crown

    Hi,

    Sorry, the requirements are NOT clear enough to me. Could you please give more details ?

  • SANPAT
    SANPAT Member Posts: 1,124 Silver Badge

    Dear Hamza

    Create a Invoice Form where the fields are Item,Qty,Rate,Value,discount per,discountamount,final value.

    while making the entry , when we insert the qty and rate , value should be calculated similar way as soon will enter the discount per, system should calculate the discount amount and the final value. it was more easy in forms and reports , where with trigger it was getting calculated, but i am new for oracle apex, here not understanding how to put the trigger in forms.

    sanjay

  • Hamza Al-abbasi
    Hamza Al-abbasi Mid-level Oracle APEX Developer Member Posts: 873 Bronze Crown
    edited Jul 7, 2022 12:32PM

    You need to read more about Dynamic Actions. On change QTY Item, add Set Value action with type JavaScript Expression :

    parseFloat($v("P1_QTY_ITEM")) * parseFloat($v("P1_RATE_ITEM"))
    

    Affected Elements :

    Selection Type: Item(s)

    Item(s): Your item that hold will the result