Hi,
I have a webform which is used to form part of our intranet homepage. I have a field with a simple DBLookup to find the days remaining till a certain date (the view is just column 1 = date. Column 2 = days remaining). I do a lookup based on todays date and display the days remaining.
The problem i am having is that some users are getting Page cannot be displayed or Entry not found in index. I know this is related to the dblookup in the field, is there another way of doing this?
Thanks
jamie
Subject: @DBLookup in Webform - Page cannot be displayed
More information for anyone who could help.
Here is the HTML and JS surrounding the field:
The Formula for the field value is :
@SetField(“DaysRemaining”;@DbLookup(“”:“NoCache”;“”;“DayCount”;@Text(@Today);2))
I did have :
@DbLookup(“”:“NoCache”;“”;“DayCount”;@Text(@Today);2)
Neither make a difference.
Thanks for any help.
Jamie
Subject: RE: @DBLookup in Webform - Page cannot be displayed
Working with dates as text is fighting a losing battle – there’s too much that can go wrong. That being said, why are you doing a lookup? The difference between two dates in days is:
@Integer((@Date(TargetDate) - @Date(CurrentDate))/(24 * 60 * 60))
Subject: RE: @DBLookup in Webform - Page cannot be displayed
Hi Stan,
Thanks for the reply. The reason i am doing a lookup is I need to display the number of weekdays only. The formula you gave works great, but it counts the weekend days.
Thanks anyway.
Jamie
Subject: RE: @DBLookup in Webform - Page cannot be displayed
Then look at @BusinessDays – it allows you to ignore weekends and holidays.