Very new to lookuprows. No idea what I'm doing. I have a form that's set to append. And then I have an email with lookuprows that's scheduled to send me results daily. However, I want to limit results to within 24 hours. Currently I'm getting every result, ever. When I added the below code, I get nothing. When I take out if @InforowCount > DateAdd(@Date1, -1, "d") and replace it with the standard if @InforowCount > 0, then I get the complete list of results again.

   var @ALL_DE_rows, @Inforow, @InforowCount, @i, @Date1
  set @Info_DE_rows = LookupRows(@EVENT_DE,"Registered_On",@Registered_On)

  set @InforowCount = rowcount(@Info_DE_rows)
set @Date1= FormatDate(Now(1), "s")

  if @InforowCount > DateAdd(@Date1, -1, "d")


    /*This sets the row number, auto incrementing on each loop till it reaches the last row*/
    for @i = 1 to @inforowcount do
  • 1
    you should review look at lookuporderrows
    – EazyE
    Sep 3, 2021 at 19:04
  • thanks! @EazyE that was the solution. Sep 4, 2021 at 3:25


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.