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

  • 0
  • 1
  • Question
  • Updated 3 weeks ago
  • In Progress
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
Photo of Micro Dev

Micro Dev

  • 1,252 Points 1k badge 2x thumb

Posted 1 month ago

  • 0
  • 1
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.
Photo of Micro Dev

Micro Dev

  • 1,252 Points 1k badge 2x thumb
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
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.



(Edited)
Photo of Micro Dev

Micro Dev

  • 1,252 Points 1k badge 2x thumb
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
Photo of Micro Dev

Micro Dev

  • 1,252 Points 1k badge 2x thumb