Never mind…figured it out! Thank you
Hello @mr-peri
Thank you very much for letting me know you have found the solution.
Best regards.
Good day sir,
I do have a similar problem but not as complex as yours.
I have an affiliate table that looks like this
Aff Lev Sal Vol Aff Comm ProdPrice Earnin
Starter 1000 20%. 100 —
Advance 2000 40% 100 —
So I created a numberfield with text “starter” and I gave it a value of 1000 as seen in table above, did same for “Advance”
Now what I want it is that once I select e.g “Advance” in the drop-down menu it will apply the values of each respective table above to give me a result in the earning column
Example:
Advance / (AffComm for Advance * ProdPrice)
Hello @aimstitute
There are multiple possible solutions, however assuming there is a DropDown or Radio Button field (fieldname1) with two choices: Starter and Advanced
You simply should to insert a calculated field in the form with the following equation:
IF(fieldname1=='Advanced', 2000/(0.40*100), 1000/(0.20*100))
Best regards.
I have a drop down to select a TYPE of number or data. Once a type is selected it opens fields for THICKNESS and WIDTH (for example Concrete Calculator).
If Someone Changes its Shape or Size like Round to Square or rectangular. It should be change.
Any Guide or Link to learn more. I need for following section -:
https://procivilengineer.com/calculator/
Thanks, that was helpfull
And what if they are four(4) options instead of two(2), how do I go about doing that using this method below:
IF(fieldname1==’Advanced’, 2000/(0.40*100), 1000/(0.20*100))
I created 4 affiliate categories.
Starter = 20%
Advance = 40%
Pro = 60%
Elite = 80%
Hello @aimstitute
You can nesting multiple “IF” operations, but the code is harder to understand, so, you can implement the equation with a function structure and use the “if” conditional statement of javascript:
(function(){
if(fieldname1 == 'Starter') return 1000/20;
if(fieldname1 == 'Advanced') return 1000/40;
if(fieldname1 == 'Pro') return 1000/60;
if(fieldname1 == 'Elite') return 1000/80;
})()
Another alternative using the “switch” conditional statement:
(function(){
switch(fieldname1)
{
case 'Starter': return 1000/20;
case 'Advanced': return 1000/40;
case 'Pro': return 1000/60;
case 'Elite': return 1000/80;
}
})()
A third alternative nesting the “IF” operations distributed with the plugin:
IF(fieldname1 == 'Starter', 1000/20, IF(fieldname1 == 'Advanced', 1000/40, IF(fieldname1 == 'Pro', 1000/60, 1000/80)))
Best regards.
Nice one problem solved… Thanks
But noticed this 2 things as well
1) i wanted user to be able to edit either “Number of referrals” or “Expected monthly Earnings” and have their input value affect other values within the table
2) Also i notcied the columns are squeezed together and not spread out taking advantage of the space aavaiable as seen here: http://prnt.sc/s7kubr
They attached picture shows what i am trying to achieve, incase if there is any advice
Warm Regards
Hello @aimstitute
Responding to your question:
Q: Also i notcied the columns are squeezed together and not spread out….
A: You simply should to select the “Large” option for the “Field Size” attribute in the form’s settings.
Q: i wanted user to be able to edit either “Number of referrals” or “Expected monthly Earnings” and have their input value affect other values within the table.
A: Insert two numbers or currency fields in the form, and use them in the equations.
I’m sorry, the support service does not cover the implementation of the users’ projects (forms or formulas). If you need someone that implement your equations, do not hesitate in contact us through our private website: Customization
Best regards.
@codepeople
I get for example 189.00000001
How do I limit or remove the excessive “0’s” after 189
Thanks
Hello @aimstitute
If you want an integer number as the equation’s result, you should use the ROUND operation: ROUND(X) returns the integer number equal or nearest to X. For example, if you have the equation:
IF(fieldname1 == 'Starter', 1000/20, IF(fieldname1 == 'Advanced', 1000/40, IF(fieldname1 == 'Pro', 1000/60, 1000/80)))
edit it as follows:
ROUND(IF(fieldname1 == 'Starter', 1000/20, IF(fieldname1 == 'Advanced', 1000/40, IF(fieldname1 == 'Pro', 1000/60, 1000/80))))
If you want the result with a specific number of decimals, use the PREC operation: PREC(X, Y) returns the number X rounded with Y decimals. So, if you want the operation’s result with two decimals, the same equation can be edited as follows:
PREC(IF(fieldname1 == 'Starter', 1000/20, IF(fieldname1 == 'Advanced', 1000/40, IF(fieldname1 == 'Pro', 1000/60, 1000/80))), 2)
Best regards.