BAQ - Quotes due to expire

Hi all,

Happy New Year!

Been going in circles on this one… I’m trying to pull together a somewhat straightforward BAQ that only looks at QuoteHed, to bring back all quotes due to expire within the next 2 weeks.

I’ve tried switching the operations to => and then when I switch the operation to <= it works and shows all the quotes from current date – 2 weeks but when I try to look out to the future, it doesn’t pull back any records.

Can anyone see what I’m missing at all please? Thank you as always in advance!!

I’ve included some quotes in the system that have an expiration date within the next 2 weeks that should be appearing in the BAQ results.

select
[QuoteHed].[QuoteNum] as [QuoteHed_QuoteNum],
[QuoteHed].[EntryDate] as [QuoteHed_EntryDate],
[QuoteHed].[CurrentStage] as [QuoteHed_CurrentStage],
[QuoteHed].[ExpirationDate] as [QuoteHed_ExpirationDate],
[QuoteHed].[ProjectDesc_c] as [QuoteHed_ProjectDesc_c],
[QuoteHed].[ChangedBy] as [QuoteHed_ChangedBy]

from Erp.QuoteHed as [QuoteHed]
where (QuoteHed.ExpirationDate = dateadd(week, 2, Constants.Today))

Just to clarify. You tried this with <= also? And it is not returning the two quotes you are showing that expire within the next 2 weeks?

Hi Dan,

Ah sorry yes using <= does pick up the 2 quotes set to expire in 2 weeks, but also picks up a bunch of ones that expired last year. We are just trying to capture the ones looking forward 2 weeks. Am I possibly missing another where statement? :thinking:

Yes you’d need a second condition on that table that also includes only quotes whose expiration was > Constants.Today. I’m assuming you’re doing this in a BAQ?

1 Like

Perfect, thanks Dan!! This worked!! :grinning:

2 Likes