Sorting by date

I need some help on this. I have a form that has a date field. The the entry is closed, I need to be able to move it to a view, then show they by month. I’m trying to figure out how to do this or what’s the best way to arrange views like this.

Thanks for any help.

Subject: Sorting by date

When the entry is closed, that’s when I need to move the document to the closed view.

Subject: Need more info

Closed meaning save and exiting or a field called Status equal to closed? If a field, when does it get set to closed?

QF

Subject: RE: Need more info

When the user chooses a date to make it closed, we cant to move the entry or doc to a view that shows all closed. I guess he views will show the months, then drop down under that. Will an agent move the doc once a date is put in the closed date. Is is better to move it based on a selection in a dialog box?

Thanks!

Subject: RE: Need more info

If I understand your goal:

Just add a computed field called ClosedMonth to the form with something like

@if(Status = “Closed” & @thisvalue = “”;

@text(@year(@today)) + "/" + " - " + @text(@month(@today)) + @select(@month(@today); "Jan"; "Feb"; ... ; "Dec");

@thisvalue)

Then categorize your view by that field.

Subject: RE: Need more info

What if I said, show view if the date closed field is not null.

Once they put the date in, the closed doc would show up in the view. Is that ok to do?

I don’t understand how I will sort by months. I’m not sure I follow your forumla. Can you explain it for me?

Subject: RE: Need more info

“Once they put the date in, the closed doc would show up in the view. Is that ok to do?”

Of course, as long as that’s what you want to do!

“I don’t understand how I will sort by months. I’m not sure I follow your forumla. Can you explain it for me?”

It’s not enough to sort only by month unless your dates all fall in the same year, so you have to sort first by month and then by year.

You can’t sort by the name of the month, since (in English, anyway) the names of the months aren’t considerate enough to happen to be alphabetically ordered.

So you need three parts to your sortable categorized column: The year followed by the month (as numerals) for the actual sorting, followed by the “name” of the month for the human to be happy with.

btw, after reviewing my code, I decided I left something out:

@text(@month(@today))

should be

@right(“0” + @text(@month(@today)); 2)

to get a leading zero on there, so that “11” doesn’t sort before “2”.

Subject: RE: Need more info

Thanks, I’ll give this a shot!