You need to sign in to do that
Don't have an account?
Malik Butler
Multiplying field values in vf page
I'm trying to create a vf page that will allow me to calculate two fields. Basically I need the quantity multiplied by the typical time to install(custom field), to get the Total Estimated Install time(custom field). I'm stumped as to if I can do it with apex code or if I should try to use html or css.
Of course, you can do this in Apex. You just need to query and store your 'quantity' and 'typical time to install' in the proper lists(or list if both are fields of the same object). After this you'll be needing a for-each loop on list/lists, multiply them and store it in a variable. Now take this list to vf page and display it using simple pageblock and pageblocktable tags.
I hope you find the solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
All Answers
Of course, you can do this in Apex. You just need to query and store your 'quantity' and 'typical time to install' in the proper lists(or list if both are fields of the same object). After this you'll be needing a for-each loop on list/lists, multiply them and store it in a variable. Now take this list to vf page and display it using simple pageblock and pageblocktable tags.
I hope you find the solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
Thanks for the response. That makes total sense! I was able to set this up and got what I needed completed. Thanks so much for your help!