tmas73 Posted April 8, 2008 Posted April 8, 2008 Hi I'm trying to create a lye calculator. Each oil has a certain SAP value (Aloe Butter NaOH 0.1340 or KOH 0.1876 depends what choosen). So the calculation should access the chosen oils in a portal and calculate the individual SAP values of each Oils amount. The problem I cant figure out is how can I calculate each oil in a portal and make a calculation out of this. The file explains more. Its hard for me to explain. Here a site that uses the same method. Link Thanks Test.fp7.zip
The Shadow Posted April 9, 2008 Posted April 9, 2008 The math isn't clear to me, but I suspect the concept you are missing is summary fields, I've added some to show how the KOH Value * gram could be summed over the related oil records. Test.fp7.zip
tmas73 Posted April 9, 2008 Author Posted April 9, 2008 The math isn't clear to me, but I suspect the concept you are missing is summary fields, I've added some to show how the KOH Value * gram could be summed over the related oil records. Cool thanks, that helps a lot. I will try to figure out the calculation and post it back here once its working...or if I have more questions. =) Thanks
tmas73 Posted April 9, 2008 Author Posted April 9, 2008 (edited) The math isn't clear to me, but I suspect the concept you are missing is summary fields, I've added some to show how the KOH Value * gram could be summed over the related oil records. One more question. Once I create a new Record in the main window, record 2 will add to the calculation of record 1. How can I separate each record to have a individual calculation? Test2.fp7.zip Edited April 9, 2008 by Guest
The Shadow Posted April 10, 2008 Posted April 10, 2008 I don't get what you mean, it appears the calculated fields are independent for each record in the mainWindow table, the summaries operate over the related oil records, which are just the ones shown in the portal.
tmas73 Posted April 11, 2008 Author Posted April 11, 2008 I don't get what you mean, it appears the calculated fields are independent for each record in the mainWindow table, the summaries operate over the related oil records, which are just the ones shown in the portal. You're right I did not think about calculating from the main window. Its works great now. Thanks for your help.
tmas73 Posted April 11, 2008 Author Posted April 11, 2008 Hi, how is it possible convert grams to oz. with the choice of radio buttons and a already calculated formula? It should display all of the calc fields as oz or gram Please see attached file. Test2.fp7.zip
The Shadow Posted April 12, 2008 Posted April 12, 2008 (edited) You could use an expression to apply the right conversion factor in your functions that was based off of the radio button text: I'm thinking of calculations that would look something like: KaOH_SAP * If(Radio="Oz";28.47;1) which would always result in an answer in grams, which other display fields would have the opposite conversion to display in the proper format. I've attached a very simple example showing one value to be input/output as either grams or ounces. Intermediate calculations would likely be all done in one set of units, to go back to the "display" unit at the end of the calculation. Conversion.fp7.zip Edited April 12, 2008 by Guest Added file.
tmas73 Posted April 17, 2008 Author Posted April 17, 2008 You could use an expression to apply the right conversion factor in your functions that was based off of the radio button text: I'm thinking of calculations that would look something like: KaOH_SAP * If(Radio="Oz";28.47;1) which would always result in an answer in grams, which other display fields would have the opposite conversion to display in the proper format. I've attached a very simple example showing one value to be input/output as either grams or ounces. Intermediate calculations would likely be all done in one set of units, to go back to the "display" unit at the end of the calculation. Thanks for the conversion works smooth. The one question i have left would be. In the Lye calculator, I have all the different oils with SAP value to each oil. So I wonder how should I implement a layout where the oils names and values are stored for the user to change the name or SAP to his specs. Now all the oils are under one layout which stores the individual ids and custom configuration, but no "spread sheet" of oils and SAPs. Could you think of a simple way to combine a table view oils index combined with the existing setup? Test2.fp7.zip
Recommended Posts
This topic is 6124 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now