Discussions

Expand all | Collapse all

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

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

    Posted 02-21-2019 17:37
    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


  • 2.  RE: Link a formula rule based on content of a field in my table

    Posted 02-22-2019 00:56
    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.


  • 3.  RE: Link a formula rule based on content of a field in my table

    Posted 02-22-2019 01:14
    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


  • 4.  RE: Link a formula rule based on content of a field in my table

    Posted 02-22-2019 01:32
    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.





  • 5.  RE: Link a formula rule based on content of a field in my table

    Posted 02-22-2019 04:09
    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


  • 6.  RE: Link a formula rule based on content of a field in my table

    Posted 03-07-2019 22:01