gorules / zen

Open-source Business Rules Engine for your Rust, NodeJS, Python or Go applications.
https://gorules.io
MIT License
770 stars 74 forks source link

Running date operations on several inputs #189

Closed psamaan closed 3 months ago

psamaan commented 3 months ago

This seems like something I should be able to do, but I can't figure out how to get it to work. I am trying to do date comparisons between different properties in the input and set an output as a result. I've tried referencing properties by name, and wrapping in a date() function, but can't get any output. I'm also not able to confirm from the trace whether my inputs were parsed at all.

I'm using gorules.io editor in a project to test all this.

image

stefan-gorules commented 3 months ago

Hi @psamaan, could you try using:

date(property1.date)

and in cases below e.g.

> date(property2.date)
psamaan commented 3 months ago

Yup, that worked. I must have only wrapped the rows in date() and not the column selectors. Thanks!