Hi @vishalsharma49,
As we already have Start Date and End Date, we can calculate Aging directly in the Generic Inquiry. Create a field in the Results Grid named DaysLate and use:
=DateDiff('d', [AMProdItem.EndDate], Now())
This shows how many days the order is late (positive = late, zero or negative = not due).
If you also need Aging Category, create another field named AgingCategory with:
=IIF(
DateDiff('d',[AMProdItem.EndDate],Now()) <= 0, 'Not Due',
IIF(
DateDiff('d',[AMProdItem.EndDate],Now()) <= 7, '1-7 Days Late',
IIF(
DateDiff('d',[AMProdItem.EndDate],Now()) <= 15, '8-15 Days Late',
IIF(
DateDiff('d',[AMProdItem.EndDate],Now()) <= 30, '16-30 Days Late',
'30+ Days Late'
)
)
)
)
I have used the base table as AMProdItem
Please let me know if any specific requirement is there.