You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to do math in a fact. Adding to the trickiness the expression variables have different path. eg: i have object obj that has 2 sub objects a and b and i want to do a fact: obj.a.x * obj.b.y.
Is this possible with custom fact?
The text was updated successfully, but these errors were encountered:
@byronhogoboom You can do any computations you want inside a custom fact. It is important to remember that the output the fact returns should be consistent based on the input parameters. So if you are multiplying the values of your params together, or other fact values, that should be fine. If you were doing something that would cause the fact results to vary given the exact same params (like multiplying by a random number, for example), that can be done but is strongly discouraged as it requires you to disable fact caching and incur a performance hit.
I'd suggest doing a quick spike by building off one of the examples to prove out your use case. If you run into problems just paste the snippet in here and I'll try and help.
I want to be able to do math in a fact. Adding to the trickiness the expression variables have different path. eg: i have object obj that has 2 sub objects a and b and i want to do a fact: obj.a.x * obj.b.y.
Is this possible with custom fact?
The text was updated successfully, but these errors were encountered: