Solved

Calculation on text box leave


Hi,

Is there any possibilities to do calculation automatically after leaving the text box. i have two scenario.

 

  1. In same page,  there are 3 text boxes text1 , text2 , text3. After entered the value in text1, text2 then sum value should display in text3. (I can do this using trigger when they saving. But is there any options avail before saving?)
  2. Same as above criteria. But difference is, text1 is avail in different page/custom page and text2,text3 avail in different screen. 

 

Please let me know is there any option to do like this. 

Thank you

icon

Best answer by eqbstal 4 May 2020, 09:46

View original

3 replies

Userlevel 7
Badge +21

Sha77,

Would it be possible to make text3 a reference field and during the reference the calculation takes place?

Steve

Hi Eqbstal,

Thank you very much for your kind reply. Can you please tell me how to achieve this with reference field.Please share reference or URL to check that.

Userlevel 7
Badge +21

I've started this example using screen Inventory Part. I selected RMB to insert new custom fields.

Fig. 1 - Overview Custom Fields

Notice that OURCOST1 and 2 are persistent. They have data type number and are in my case unformatted. Make them insertable and updateable. Save these custom field settings so the custom table that is prepared (inventory_part_cvt) is available. Be sure to approve, publish and synchronize.

Now add field OURCOST3. Make it read only. In the Implementation Type window select/enter the following:

Fig. 2 - Connecting the two cost fields

In the Select statement, I entered the following:

select nvl(cf$_ourcost1 + cf$_ourcost2, 0) from inventory_part_cfv where contract = :contract and part_no = :part_no

Make this field also a number and in my case I selected unformatted again.

Finish this off and understand that insert and update are not available. Nice to see that you can later search on the content of the calculated field OURCOST3.

Synchronize again and head to over to the Inventory Part screen.

Use RMB to Reload Configuration of custom objects.

In the inventory part screen use RMB to select Properties. Include Custom Items, apply and open tab Layout.

Fig. 3 - Screen Layout Settings

Turn on the customization. Turn check marks for new fields Our Cost on and play around with the Object placement, using the arrows on the right side.

Once done (see that I have the fields on the General tab on the right side?), use Change tab association to turn on tab General. This results that the fields are only available on the General tab.

Notice the grey number of 15 in the Calculated Cost field. This is set when values 5 and 10 are changed and saved (F12).

Use the help text to push the changes to user or base profiles of users.

Steve

Thanks for liking this article :grinning:

 

 

Reply