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.
notesrookieAsked:
Who is Participating?
 
Sjef BosmanGroupware ConsultantCommented:
If you want to find the faulty field: save a copy of your form, then start a cycle of throwing out fields, saving the form and retrying with the browser, until the error has disappeared. The problem must have been in the last bunch of fields deleted. Sadly, there is no (longer) a formula debugger...
0
 
Sjef BosmanGroupware ConsultantCommented:
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...
0
 
marilyngCommented:
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!
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
notesrookieAuthor Commented:
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.

0
 
marilyngCommented:
On web side, submitting is same as saving, once you submit you have to use the $$Return to decide if you want to go back to the form just submitted, or return the user to a view.  That would be the "Refresh" part, because on Web side, you have to close and reopen the form.

The Refresh command works
0
 
CRAKCommented:
In an earlier question, I was wondering where you lived.... this question makes me wonder again....

I've had trouble in the past submitting e.g. dates (and numbers with decimals) when the (OS) client's configuration was different than from the server's.
E.g. is the server is configured to present dates as M/D/Y and the client is submitting D/M/Y, you'll be in trouble.
Same for demimal points and commas.

In such cases I have the server to send info on how data should be interpreted.
E.g. a CfD field (or computed text) containing following formula:
@ReplaceSubstring(@Date(2000; 1; 3); "1":"2":"3":"0"; "M":"Y":"D":"")

This will use the date "Jan 3, 2000", remove all occurances of "0", and replace "2" with "Y", "1" (January) with "M" and "3" with "D". Depending on your server's config, you may end up with e.g. "D-M-Y", "M/D/Y" or "Y M D".

In case of a numeric challence, I generally use 3/2 (as 1/2 may return either 0.5 or .5).

Now this field (or comp. text) could be used to instruct users in which format to enter a date: e.g. as part of a field label.

More advanced use would involve javascript as validation to (1) examine the client's date format, (2) split the entered date into separate D, M and Y fragments, (3) rebuild the same date in the server's format, (4) replace the entered data with the validated format and allow the data to be sent off to the server.
0
 
Sjef BosmanGroupware ConsultantCommented:
Makeshift solution: use textfields only...
0
 
marilyngCommented:
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.
0
 
CRAKCommented:
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?  ;-))
0
 
Sjef BosmanGroupware ConsultantCommented:
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.
0
 
CRAKCommented:
Can it be browser dependant too? I'm all ears...!
0
 
marilyngCommented:
Generic Date and Time conventions: http://www.hackcraft.net/web/datetime/

ISO 8601 Descriptions: http://www.cs.tut.fi/~jkorpela/iso8601.html
0
 
notesrookieAuthor Commented:
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.
0
 
Sjef BosmanGroupware ConsultantCommented:
You wouldn't happen to have selected "Refresh fields on keyword change"? If you can avoid it for a web-browser, even at some expense, you'd better try it. The symptom you describe here is the mildest form of refresh, but you can get into a lot of trouble when you do field validation in JavaScript. These validations get triggered an EVERY refresh, unless you write code that knows when it's a refresh or a Save.
0
 
notesrookieAuthor Commented:
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.
0
 
Sjef BosmanGroupware ConsultantCommented:
> And the best event(s) to check this in?
That would be a different question, wouldn't you say so?
0
 
notesrookieAuthor Commented:
Of course. Silly me.
0
 
Sjef BosmanGroupware ConsultantCommented:
LOL
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.