?
Solved

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

Posted on 2006-04-20
18
Medium Priority
?
1,486 Views
Last Modified: 2013-12-18
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.
0
Comment
Question by:notesrookie
  • 7
  • 4
  • 4
  • +1
18 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16502979
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
 
LVL 18

Expert Comment

by:marilyng
ID: 16503918
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
 

Author Comment

by:notesrookie
ID: 16511223
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Assisted Solution

by:marilyng
marilyng earned 600 total points
ID: 16512720
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
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 800 total points
ID: 16513973
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
 
LVL 13

Assisted Solution

by:CRAK
CRAK earned 600 total points
ID: 16514349
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
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16514635
Makeshift solution: use textfields only...
0
 
LVL 18

Expert Comment

by:marilyng
ID: 16514704
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
 
LVL 13

Expert Comment

by:CRAK
ID: 16514908
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
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16518626
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
 
LVL 13

Expert Comment

by:CRAK
ID: 16519531
Can it be browser dependant too? I'm all ears...!
0
 
LVL 18

Expert Comment

by:marilyng
ID: 16519808
Generic Date and Time conventions: http://www.hackcraft.net/web/datetime/

ISO 8601 Descriptions: http://www.cs.tut.fi/~jkorpela/iso8601.html
0
 

Author Comment

by:notesrookie
ID: 16520008
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
 
LVL 46

Assisted Solution

by:Sjef Bosman
Sjef Bosman earned 800 total points
ID: 16520133
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
 

Author Comment

by:notesrookie
ID: 16521443
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
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16522751
> And the best event(s) to check this in?
That would be a different question, wouldn't you say so?
0
 

Author Comment

by:notesrookie
ID: 16530090
Of course. Silly me.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16532295
LOL
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month15 days, 18 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question