Forum Discussion

EOMDevelepors's avatar
EOMDevelepors
Qrew Captain
7 years ago

Link a formula rule based on content of a field in my table

Trying my luck... 

I want to have a formula rule take the syntax of the formula based on a field within the table.

So it would be something like this: If([field1]=2532, lookup the syntax in [field20])

I was thinking maybe these is a way to do this with a script.

Thanks
  • That's an awesome idea.
    What happens when you use [field20] to push a string that plugs into the formula?
    Can you flesh out your example a little more? I probably can't help, I'm just very interested.
    • EOMDevelepors's avatar
      EOMDevelepors
      Qrew Captain
      I guess if it returns a value which is not the same type it will just not view the output value. The Idea is that you should be able to set rules of a formula based syntax in a field within the table (or may be a lookup field of a settings table).

      Thanks for your reply
    • AlexCertificati's avatar
      AlexCertificati
      Qrew Cadet
      Well, I tried to push a formula as text into another formula, but I couldn't figure out how to escape all the quotes I'd need. Something like this would work in Excel:
      If(true,"IF(TRUE,"&"""&SKY IS BLUE"&"""&","&"""&"SKY IS NOT BLUE)"&""","NEVER MIND")

      It works, of course, with single quotes. the formula in tester is 
      If(true,[testerr])


      But this also shows that I think you're right - a formula won't evaluate the output of another formula as its input.



    • EOMDevelepors's avatar
      EOMDevelepors
      Qrew Captain
      There still should be a way with a custom script to pull the syntax from another field. Let's see if anyone has any idea.

      Thanks