Using Date Filters in Logic Functions

Hey Folks

I’m setting up some AIP Logic with an object set that contains a date field as the input.

I want the logic to only work on items in the object after a certain date

It seems no matter how I configure the filter block, it is always tagged as “unused”, and worse nothing is then passed through to the later blocks for processing

Is there a specific date format that’s required for a filter block to work correctly?

Hey Samwise,

Looks like you might want “Greater than or equal to” in your “Filter” block, equals will only match for that exact date value.

Can you confirm that the Format block is operating on the output of “Filter” block and not the original object set?

Is the initial object set also coming from an input to your function?

Here is an example that filters and formats some objects for reference:

Hi Dean,

Thanks for the reply, yeah that’s my bad, the example image is configured to a single date, I’d tried = as well as > >= and < <= with a given date. Same issue.

The input to the function is configured as the correct object set, and the “Filter” version of the object set properties in downstream blocks.

I’ve now recreated the function from scratch and no longer get the “Unused” tag on the filter block. The function itself works, I get the output I would expect from the LLM albeit minus the content it should be working with based on the filter.

If I run only the filter block, I get 0 objects returned, even when I know there’s data that meets the criteria.

I think there may be something more fundamental wrong here, perhaps in the configuration of the date property in the ontology object? The dates in the date column were generated in pipeline, the original data set had dates in strings of this format:-

Wed Sep 11 09:18:37 +0000 2024

I used an LLM block to convert that to the format you see in the first image above, and the property has the “date” base type.

I’ve tried enabling the base formatter, with various formats applied, and without it enabled. No luck

I’m sure I’m missing something obvious

thanks

Sam

Possibly, a couple of things you can try to diagnose where the issue is coming from:

  • If you perform a similar search from the “Object explorer” app do you get the results you expect? If it looks like it might be an issue in your pipeline.
  • If you create a new Logic that accepts your object type as a parameter, can you try:
    • Object property (yourObjectParameter) to get the date property
    • Greater than or equals (left = the date property, right=Date(pickACouple)

That should help diagnose where the issue is coming from

Thanks Dean, will take a look