question

hichamveo avatar image
0 Votes"
hichamveo asked PanuBloigu edited

Liquid template Minus operation within Logic Apps

Hi,
I'm trying to substract 2 variables from 2 strings in source json. Even with a math filter to convert them to number/float, I'm getting :

Liquid error: Parameter count mismatch.

{% assign my_v1="12.24" | plus: 1 %}
{% assign my_v2="10.24" | plus: 1 %}

{ { my_v1 | Minus : my_v2}}

expected value : 2.24

any help please?

azure-logic-apps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered PanuBloigu edited

@hichamveo Liquid action follows the DotLiquid implementation for Liquid as mentioned here. Looks like the issue that you have observed was fixed recently here.

I have reached out to my team to confirm the current version of DotLiquid version and if there are any plans to migrate it in the near future. I will update this thread once I heard back from my team.

Update 9/20:
Currently logic app supports 2.0.361 version of DotLiquid. The product team will be updating it to the latest version and we will update the version information in our document. The current ETA for this change is March 2022 but could be changed due to unforeseen circumstances.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello,

Sorry for highjacking this thread, but I observe the exact same behavior, although in my case in XML to JSON transformation. Is it so that there still is no version of DotLiquid released which includes this fix?

Edit: There's a workaround though, if you are able to accept the fact that the numbers are always positive: one can apply the 'Abs' filter in assignment to coerce the values to numeric type.

0 Votes 0 ·