Skip to main content
Nintex Community Menu Bar
Question

Determine if a datetime in one model is within a datetime range of any row in another model

  • July 11, 2024
  • 3 replies
  • 52 views
  • Translate All

Forum|alt.badge.img+18

I have one model (A) with 20 or 30 rows, which includes a Datetime field.

I have another model (B) with ~ 0 to 10 rows which include Start and End datetime fields.

I want to exclude rows from Model A  where Datetime is between Start and End of any single row in Model B.

Anyone have a good idea on how to set up model conditions to do this?

3 replies

Forum|alt.badge.img+18

I decided to just brute force this with javascript since the community was silent. If anyone has an idea on how to do this declaratively, I’m love to hear it!

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • July 11, 2024

Can you turn model B into an aggregate that MIN’s start and MAX’s end?  Then you’d have 1 record to compare the records in model A against. 

Translate

Forum|alt.badge.img+18

Thanks, Rob.

Unfortunately, no )if I’m understanding correctly). If row 1 of model B covers last week and row 2 covers next week, I still want dates from model A in this week to show up.

If I had just the min start and max end, that would include this week, correct?

Translate