Forum Discussion

JenHamilton_Tye's avatar
JenHamilton_Tye
Qrew Trainee
4 years ago

Use text field to define formula

We have a table with a list of unique goals and I would like the users to define how to calculate their goal themselves. (This table has relationships, a bunch of summary fields they can choose from.)

Field name: How to calculate
Field type: Text

Field Name: Metric Result
Field type: Formula - Number
Formula: [How to calculate]

Record #1
How to calculate: ([Fail]+[Pass])​/[Pass]


Record #2
How to calculate: ([Complete]+[Incomplete])/[Incomplete]


Currently the Metric Result field does not work, it gives a save error saying it is expecting a number.
  • If I use ToNumber([How to calculate]) the result is 0.
  • I could setup a notification and go write in a new part of a nested If or Case formula every time a goal is added, but I'd rather make it self-sustaining.
Any other ideas?

------------------------------
Jen Hamilton
------------------------------

1 Reply

  •  If I understand what you are attempting to do, you were suggesting that users can freeform in a formula into a text box and that would then be used in a formula as how to do a numeric calculation.
    Interesting approach but I don't think QuickBase can handle that.
    I suggest instead that you provide the user with the multiple-choice box as to which method they would like to use for their calculation. Then you will have a formula which does the calculation according to how that multiple-choice field is set.p

     Then I would provide a way for the users to request new methods of calculating the goal perhaps just sending you an email. And you would add these different choices to the formula. But there's not going to be a practical way for users to write their own formula in the same field. 


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------