Link to home
Start Free TrialLog in
Avatar of notesrookie
notesrookieFlag for United States of America

asked on

Selecting a choice in form on web causes "unable to interpret date or time" message

Bula y'all (hello in Fijian, the y'all is a Texas drawl),

You've all been a great help to me in getting my database to work within a Notes client and now I have a question about the web. When I create a form on the web, the form opens normally. However when I picked a selection in any field, I get a error message, "Error 500 HTTP Web Server: Lotus Notes Exception - Unable to interpret Time or Date". I do have 2 date and time fileds to denote the start/end date and time. They do not have any default, translation or validation formulas, so I am not sure what it is I am doing wrong.

The other question I have is if I want a multi-valued text field in a webform where I want the user to pick multiple selections, what would be the best way to go about this? Currently I have a listbox allowing multiple values but I want to show a field with only the selected choices. It looks like I'll need 2 fields to do this? So where is the th OK button to click on when you've selected you choices? What's the best way to go about this? I haven't been able to really test anything here because of the above mentioned error message.

I am on R5.0.12 and am feeling the pinch of time so I am awarding mucho points. Additional points will be awarded to whomever gets me out of this pit of confusion. Thank you ever so much.
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

1) You usually need to "enclose" calculations in
    x:= calculation;
    @If(@IsError(x); ""; x)
2) Web development is much more complex. Multiple selections are done using the Ctrl-key. Can you change your field into a Checkbox field, that will display all possible values?
3) It's sad that more than 500 points per question aren't allowed...
Avatar of marilyng
marilyng

Hi notesrookie,
check out the javascript in _wCalendar Entry in a standard Notes Mail template.. the field is a standard date field, but the date does have a default setting.  This would be necessary if you have any code acting on the date fields.  So try setting a default value and then using the validations from the mail template.

I like check boxes, but also use two fields - hide-when.  The OK button is the submit button. Remember, anytime you want to refresh the display on the form, you pretty much have to submit it.  :)

Regards!
Avatar of notesrookie

ASKER

I like checkboxes too but unfortunately there are too many systems, about 500, they will need to select from. When you mention enclosing formulas, does this mean all formulas in the form?

And is submitting the same as saving and refreshing, saving and closing or just refreshing?

Since 500 points is the max I guess I could post another question :D.

SOLUTION
Avatar of marilyng
marilyng

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Makeshift solution: use textfields only...
Good point, CRAK.   That makes a lot of sense with the date validation.   You reminded me that when I was doing web sites, I used to use a combination of javascript and asp to handle date and date validations, too.
Sjef, how is a textfield going to help? Sure it'll supress the error, but is the submitted "1/5/2006" the 1st of May, or the 5th of January? You'll never be able to tell!
You're not running off with the biggest share again are you?  ;-))
I only said "makeshift solution" (lapmiddel), it'll only postpone the problem...

Btw, date formats are an interesting problem. Isn't the interpretation browser or country-dependent (in the language preferences)? Indeed, from 1/2/2003, you'll never know.
Can it be browser dependant too? I'm all ears...!
Generic Date and Time conventions: http://www.hackcraft.net/web/datetime/

ISO 8601 Descriptions: http://www.cs.tut.fi/~jkorpela/iso8601.html
I was able to find out what the problem was. I did have a computed date field that depended on another date field and that was the issue. And strangely enough, I did make it a text field instead. Purely for display only. And I did start removing fields and putting them back in one at a time until I came across the issue. Hah! I guess I'm getting better at troubleshooting. And I'll also have to keep in mind what CRAK had to say about date/time formats for future use. I'll also be reading the links that marilyng sent a little later. I'm off to wine country to visit some relatives for the day but, als, no wine.

But in looking back at the thread of this question, what was the best way to "show" many selections? I found that holding down the [Ctrl] key does the trick but as I make each selection, the pages appears to refresh. You know how you can make multiple selections by holding down the [Ctrl] key and clicking on each selection? Well I can't seem to do that in my form. Is that just me or something inherent in Domino? I do have several computed fields and one rich text field but that should not cause that sort of a page blink?

Thanks again, all for your great suggestions and comments.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, that's right. I do have some fields with "refresh fields on keyword change". I'll check to see if I can eliminate that. But if I can't, I guess I'll check for whether the doc is being refreshed or saved. Which would be better to use, LS or formula? And the best event(s) to check this in?

And marilyng - thanks for the suggestion on $$Return. I read and read it in the help docs but it did not make any sense. That one line you typed in made it click in my head. Yes!

And CRAK's suggestions for the date time validations were most elegant. I am coding for folks mostly in the US but I believe some applications are beginning to be opened up to places like Italy and the UK. So definitely something to be checked for.

It seems like the more I find out, the more I have to check for, so even the simplest of databases, if all best practices are followed, are not so simple after all. I wish my users would realize that sometime it takes a while to get things in place not because of the complexity but because it needs to be done right. OK, I'm done with my rant!

And once more, thank you, merci, gracias, bitte, dank u, from the - Notes Rookie.
> And the best event(s) to check this in?
That would be a different question, wouldn't you say so?
Of course. Silly me.