If you have a check box that asks a question such as [Would you like to add this service?] Where checked is yes.
How can I get a formula field to fill with a price result?
i.e. IF({New Service}, ….
{New Service} Being the checkbox field. What goes next?
Thanks in advance.
S
Best answer by DisraeliGears01
Checkboxes are given as true/false states inside formulas, but the IF formula defines the second variable as inherently true and the third as inherently false. So you would just do something like IF({New Service Box}, {PriceField}, “0”). That would display the price if the box is checked, or 0 if no box is checked.
If people are checking multiple boxes then you run into needing to array and it’s more complex, but that’s the direct answer
setCondition field is your checkbox but if it was a singleSelect field it would be: IF({setCondition} = “Goods”, {selectItem} & " costs: " & {itemCostLookup}, "")
Which you could then expand if there are multiple services, such as purchasing good, hours of work, etc. to display different data depending on the selected value in the condition field.
Checkboxes are given as true/false states inside formulas, but the IF formula defines the second variable as inherently true and the third as inherently false. So you would just do something like IF({New Service Box}, {PriceField}, “0”). That would display the price if the box is checked, or 0 if no box is checked.
If people are checking multiple boxes then you run into needing to array and it’s more complex, but that’s the direct answer
setCondition field is your checkbox but if it was a singleSelect field it would be: IF({setCondition} = “Goods”, {selectItem} & " costs: " & {itemCostLookup}, "")
Which you could then expand if there are multiple services, such as purchasing good, hours of work, etc. to display different data depending on the selected value in the condition field.
Thanks. This is a great expansion on what I was looking for that I may well use in future, but for the sake of this particular field, The fee is for one item and is always baked into the response so I can write it straight into the formula
setCondition field is your checkbox but if it was a singleSelect field it would be: IF({setCondition} = “Goods”, {selectItem} & " costs: " & {itemCostLookup}, "")
Which you could then expand if there are multiple services, such as purchasing good, hours of work, etc. to display different data depending on the selected value in the condition field.
Thanks. This is a great expansion on what I was looking for that I may well use in future, but for the sake of this particular field, The fee is for one item and is always baked into the response so I can write it straight into the formula