(Well, maybe not that complex but I had to come up with a good subject)
I want users to be able to search using different criterias. Say from date to date. Or this week or last week or five weeks ago or whatever.
So, the only way I can think of is to create new fields in my BO and use a customform or maybe a new BO, just for searching with several customforms.
So the question is: is this the way to do it or is there some other way that is more, "the right way"?
/Rem
Complex query user input
Ok, lets start with something that sounds simple at first glance (and maybe is?):
I want to have a dropdown where I can choose from week numbers. My thought was to have CURRENT_WEEK and then CURRENT_WEEK-1, CURRENT_WEEK-2 and so on for like 5 weeks back or so. I want to run this query on an attribute which is a date and is called job.date.
A simpler way to do this might be to enter the weeknumber manually, but then you would have to know which week it is right now (and you don´t allways know that)
The entry must be made from a form (not the "Ask at runtime function"), but then I have another question, how do you connect a filteringrule to a form? If you tick the box "Use form" in a query, the rulepart disappears.
/Rem
I want to have a dropdown where I can choose from week numbers. My thought was to have CURRENT_WEEK and then CURRENT_WEEK-1, CURRENT_WEEK-2 and so on for like 5 weeks back or so. I want to run this query on an attribute which is a date and is called job.date.
A simpler way to do this might be to enter the weeknumber manually, but then you would have to know which week it is right now (and you don´t allways know that)
The entry must be made from a form (not the "Ask at runtime function"), but then I have another question, how do you connect a filteringrule to a form? If you tick the box "Use form" in a query, the rulepart disappears.
/Rem
Rem,
Re: years
Personally, I like to build apps that take things like this into consideration before they are needed so I'm not mopping up in another year.
Re: Jobs.WeeksAgo - it seems like you were saying it might be more intuitive for people to search for how long ago a job was & that week #'s are something that people really remember.
You could have Jobs.WeeksAgo calculate by rule & before a search run an UPDATE action to ensure that the WeeksAgo value is current. Your search form could then have a drop down list of choices for Weeks Ago: 0,1,2,3,etc. The search would then find records that match that # of weeks ago.
Tom
Re: years
Personally, I like to build apps that take things like this into consideration before they are needed so I'm not mopping up in another year.
Re: Jobs.WeeksAgo - it seems like you were saying it might be more intuitive for people to search for how long ago a job was & that week #'s are something that people really remember.
You could have Jobs.WeeksAgo calculate by rule & before a search run an UPDATE action to ensure that the WeeksAgo value is current. Your search form could then have a drop down list of choices for Weeks Ago: 0,1,2,3,etc. The search would then find records that match that # of weeks ago.
Tom