Implementing RoundDown function in Syndigo
Hi Everyone,
I’m trying to implement a pallet calculation in Syndigo PIM, and I am facing limitation with the available numeric functions.
Our business logic is as follows:
- Pallet dimensions: 40" x 48" x 70" (max height)
-
thgpalletlayer= Floor(70 / thgheight) — we need to round down to the nearest whole number, not to the nearest integer. -
thgpalletunits= Average units per layer ×thgpalletlayer
Average units per layer = ((RoundDown(48/Length) * RoundDown(40/Width)) +
(RoundDown(48/Width) * RoundDown(40/Length))) / 2From the list of native numeric keywords (Round, NumericMax, Avg, etc.), it seems there’s no direct RoundDown or Floor function.
If I use Round(), it may round up and overstate how many products fit on a pallet, which we want to avoid.
I’m considering following option:
-
Using arithmetic workaround —
(70 - (70 % thgheight)) / thgheightif the modulus%operator is supported.
Has anyone implemented Floor / RoundDown logic in Syndigo before?
If so, could you please share the syntax or the best way to handle this type of calculation within a business rule
Thanks in advance for your help!
-
Hi Milan Gupta, you can use Modulus % operator in BR definitions.
0 -
Hello Sesha Uppala
Are you sure that modulus `%` is supported within the SBL language?
It is not listed as an Arithmetic Operator in the documentation -> https://docx.syndigo.com/docs/expression-builder-1
Did they forget to document it, or is it mentioned somewhere else?Milan Gupta, did the modulus work for you? Have you resolved your issue?
-1
Please sign in to leave a comment.
Comments
2 comments