tom29
January 18, 2024, 5:50pm
1
I’m struggling to do a simple calculation in a backend workflow: Item A = 1 - Item B’s Number
After typing in the “1” is does not seem to be possible to add a math operator like “-”?
Things I tried:
I already have the New Expression Composer activated. Seems to make no difference.
I tried using plugins like math.js or toolbox but apparently can’t be used in backend workflows.
Any help would be appreciated. Surely this is a simple problem so it’s weird I’m struggling with this…
If the data type is a number, the operation should appear
You can’t start an expression with a number like that. One way you can get what you want is to set a custom state (number) to 1, and then you can build the expression custom state's value - Item B's number
.
Edit: I just noticed you said a backend workflow, and you should be able to use a parameter (set to a value of 1) in the expression.
1 Like
tom29
January 18, 2024, 6:35pm
4
Hi Mike,
Your suggestion to set a parameter of the backend workflow to 1 is brilliant, that works perfectly!
In the meantime I also found 2 alternatives (which are not as good as yours though):
Start the expression with Arbitrary text :converted to number
where Arbitrary text is equal to 1
Re-arragne the formula to Item B's number*-1 + 1
1 Like
system
Closed
March 28, 2024, 5:50pm
5
This topic was automatically closed after 70 days. New replies are no longer allowed.