Hi all,
I have a nextensio list displayng two datetime fields:
- start date
- end date
I would like to create a third column: flag, where the field value is 1 when the end date is < of the current date.
So, if today (20th may 2010) I have 3 records I would see this:
start_date - end_date - flag
01/05/2010 - 19/05/2010 - 1
01/05/2010 - 31/05/2010 - 0
01/06/2010 - 30/06/2010 - 0
I would like to be able to use filters too, so that I can easily select all expired records.
is there a simple way to do this with MX Koll pro?
TIA
tony
nextensio list: how to add a calculated field?
Re: nextensio list: how to add a calculated field?
No easy way to do this with the MX extentions. (Well not that I know of)
It is easy enough to achieve with a bit of hand coding.
First you need to decide how you are going to automate the update procedure.
If it is only a couple of records you can easily build an update function to check the dates of each record and flag it as expired and make it run every time you load the page.
If it is 1000's of records you will be better of coding the function in a separate page and run a daily cron job to update the field.
To filter on the list is simply a matter of building you list as usual and add a filter to the field.
It is easy enough to achieve with a bit of hand coding.
First you need to decide how you are going to automate the update procedure.
If it is only a couple of records you can easily build an update function to check the dates of each record and flag it as expired and make it run every time you load the page.
If it is 1000's of records you will be better of coding the function in a separate page and run a daily cron job to update the field.
To filter on the list is simply a matter of building you list as usual and add a filter to the field.
-
- Posts: 1
- Joined: 2010-08-04 11:33
Re: nextensio list: how to add a calculated field?
Why don't you calculate the field in the underlying SQL?
You can base the nextensio list on a recordset....
You can base the nextensio list on a recordset....