Anyway I could get some help with this. Total noob "If this then that, else this"
Ive tried this but it gives an error.
if (@ARV<=120000)then(@ARV-@Repair Costs)*.7 else (@ARV-@Repair Costs)*.83
-
Hi Kevin,
you have 2 options how to write the code, both do the same:var arv = @ARV;
var repair = @Repair Costs;
var sum = arv - rep;
var multi = arv <=120000 ? .7 : .83;
var result = sum * multi;
resultor
var arv = @ARV;
var repair = @Repair Costs;
var sum = arv - rep;
var multi = 0;
if(arv <=120000) {
multi = .7;
} else {
multi = .83;
}
var result = sum * multi;
resultRainer
-
Hi Kevin
The @signs need to be (re-)activated to be used in a calculation field.
So where you have @ARV, for example, remove the V and you will see that the calculation field will suggest you connect to the field "ARV". Or else, remove the @statement altogether and re-type @ARV . A field suggestion should appear
If you want to make a calculation field fully based on static data, make a blue token to any field as a comment in the code (starting with double slash), for example @unique id
// @unique id
-
Please add a screenshot of your calculation field.
Here https://help.podio.com/hc/en-us/articles/201019358-Calculations you find some helpful tips for beginners. Check also the PDF attached at the bottom of the help article.
Please sign in to leave a comment.
Comments
8 comments