You need to sign in to do that
Don't have an account?
Maneesh Gupta 11
Calculating field in VF Pageblock table
Hi Experts,
I have a simple requirement. Its for the computation of Simple Interest. My Custom object contains 3 fields - Principal_Amt__c, Years__c & Rate__c
I need to show these 3 fields in a page block table with an additional 4th field (Simple Interest) which will be calculated run time when the page is displayed.
I know there could be various ways to achive this (extension, Java Script function etc.) but I am curious to understand if I really need to write an extension/JS function to compute Simple Interest?
Can't we do this simple field calculation in the VF page itself?
Please advise
I have a simple requirement. Its for the computation of Simple Interest. My Custom object contains 3 fields - Principal_Amt__c, Years__c & Rate__c
I need to show these 3 fields in a page block table with an additional 4th field (Simple Interest) which will be calculated run time when the page is displayed.
I know there could be various ways to achive this (extension, Java Script function etc.) but I am curious to understand if I really need to write an extension/JS function to compute Simple Interest?
Can't we do this simple field calculation in the VF page itself?
Please advise
pcon
You should be able to do this calculation inside the controller and then display the value out to the Visualforce page.
Swayam@SalesforceGuy
Hey,, If you don't want to Use Extension, you can use Javascript /Jquery function