TattyDon Posted May 1, 2009 Posted May 1, 2009 This is probably dead easy but I can't get my head round the best way to do it! I have a table called calender (A list of dates and activities) which I want to display as a portal on the frontpage of my application. That bit is easy. However, I want to only display future tasks. If I wasn't using a portal I would probably just perorm a find on the calender layout and just display future dates. Am I able to perform a find on a portal so that it only displays future tasks? The way I would probably do this normally is to write a script which did the following: show all records sort by date goto record nearest current date set orderfield as 1 go to next record set orderfield as 2 etc I could then sort the portal by orderfield. However, I'm sure this is a messy way of approaching the problem. Cheers Tatty
LaRetta Posted May 1, 2009 Posted May 1, 2009 Hi Tatty, On your front page of your application (and in that table), create a calculation called Today (unstored) = Get ( CurrentDate ) and be sure the data type is date (pop-up at the bottom of the calc box). Join this to your calendar table as: MainApp::Today < Calendar::Date You can sort the portal ascending by date so your soonest task is at the top, the dates will automatically drop off when they hit the current date, and no scripting nor maintenance is required. :wink2:
TattyDon Posted May 1, 2009 Author Posted May 1, 2009 Thanks - amazing how simple the solution is when someone else looks at it. I've been wrestling with that for a couple of days even though I'm using the same sort of technique on other portals in the front screen!
Recommended Posts
This topic is 5685 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now