Solved

Radio Button Values Submitted From Web Not Saved

Posted on 2004-08-29
11
595 Views
Last Modified: 2013-12-18
Hi:

I have a form which, when opened, populates a radio button field with selections based on an @DbLookup formula. This aspect seems to be working fine. When the form is opened, the proper selections are displaying, and are selectable.

The problem is that when you make a selection and save the document over the web, the selection is not saved. That is, on the saved document, the radio field is blank (nothing selected).

Other text fields on the forn are saved correctly, though.

Any idea why this would be happening only with the radio button fields? How do correct this?

-Ke
0
Comment
Question by:kkiddie
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 13

Expert Comment

by:CRAK
ID: 11926975
Any code handling the field? A translation formula, webquerysave agent or javascript?
Is the field populated with a value that is not returned in the @DbLookup in a later stage? -> consult the doc's property box in notes to see wether it has a value assigned.
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 11929156
check the default value of the field. Any code is running on this field to update.

And also, paste the radio button formula.
There may be some transaltion forumale also.
CRAK has given some list. follow them.
0
 

Author Comment

by:kkiddie
ID: 11931568
Hi:

- no translation formula
- no WebQuerySave agent
- no Javascript
- no default value for the field

The @DbLookup return stays the same throughout the whole process, there is no change at any point.

In the document properties box, in the fields tab, when I check the listing for the field, the selected value is there correctly, but for some reason, the corresponding radio button on the document itself is not selected. How is this possible?

-Ke
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 11932144
Are there any commas in the values?  Notes will misinterpret that as a "value break," and treat it as if two separate check boxes were ticked (yes, I know this is a radio button, but that's what Notes does).

The other possibility is a "mismatch."  The value saved has to exactly match one of the visible or alias values returned by the formula the next time the doc is opened.  Sometimes people run into trouble because the saved value is no longer in the lookup list, or the formula is coded in such a way that it only returns the list correctly when the document is new, not when opened again later.
0
 

Author Comment

by:kkiddie
ID: 11935214
I don't think it's a mismatch because the lookup values stay the same.

Yes there are some commas in the values, but the problem persists even when I tried configuring things to have no commas, however, with one slight variation:

With commas, I noticed that even in the client, if you open a web-submitted document and select a radio button, then save, the selection disappears (quite a sight, I have to say).

With no commas, if you do the same thing, it at least stays selected.

It seems like the recompute at save refreshes the selections and gets rid of any selected value. Would it be possible to a) prevent the recompute on this field at save, or b) grab the value from the field properities and reinsert it into the field after close?

-Ke


0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 13

Expert Comment

by:CRAK
ID: 11935931
Your option (a) might be what I was referring to earlier.
It usually involves something like:

@If(
   @IsDocBeingSaved;
   <currentFieldValue>;
   <recomputation>)

Can you please paste the choises formula here, so we can take a better look at it?

0
 

Author Comment

by:kkiddie
ID: 11942927
Here's the formula for the choices:

@If (@DbLookup( "" : "NoCache" ; "85256D74:006E8AD6" ; "RegistrationLookup" ; querystringdocid ; 3 ) = "" ; "Date(s) TBA" ; @DbLookup( "" : "NoCache" ; "85256D74:006E8AD6" ; "RegistrationLookup" ; querystringdocid ; 3 ))

If there are two dates, it will return something like this (with radio buttons, of course):

Aug. 2, 2000 - Aug. 5, 2004 / SMITH HALL
Aug. 7, 2004 - Aug. 8, 2004 / NORTH HILL

Interestingly enough, if it doesn't find any dates and returns "Date(s) TBA" as a choice, if that is selected and saved, it doesn't disappear the way a date disappears if chosen and saved.

The third column of the "RegistrationLookup" view is configured for a multi-value separator of new line, and has has the following code:

@Trim(
@If(@Text(date1_start) != "" ; @Select(@Month(date1_start);"Jan.";"Feb.";"Mar.";"Apr.";"May.";
"Jun.";"Jul.";"Aug.";"Sep.";"Oct.";"Nov.";"Dec.") + " " + @Text(@Day(date1_start)) +  ", "  +
@Text(@Year(date1_start))+" - " +@Select(@Month(date1_end);"Jan.";"Feb.";"Mar.";"Apr.";"May.";
"Jun.";"Jul.";"Aug.";"Sep.";"Oct.";"Nov.";"Dec.") + " " + @Text(@Day(date1_end)) +  ", "  +
@Text(@Year(date1_end)) + (@If(location1 != "" ;" / "+@Middle(location1; " > ";" > ")+@NewLine; ""));""):

...etc., etc., for dates 2 to 7 and ends with...

@If(@Text(date8_start) != "" ; @Select(@Month(date8_start);"Jan.";"Feb.";"Mar.";"Apr.";"May.";
"Jun.";"Jul.";"Aug.";"Sep.";"Oct.";"Nov.";"Dec.") + " " + @Text(@Day(date8_start)) +  ", "  +
@Text(@Year(date8_start))+" - " +@Select(@Month(date8_end);"Jan.";"Feb.";"Mar.";"Apr.";"May.";
"Jun.";"Jul.";"Aug.";"Sep.";"Oct.";"Nov.";"Dec.") + " " + @Text(@Day(date8_end)) +  ", "  +
@Text(@Year(date8_end))+ (@If(location8 != "" ;" / "+@Middle(location8; " > ";" > ")+@NewLine; ""));"")
)
0
 
LVL 13

Assisted Solution

by:CRAK
CRAK earned 100 total points
ID: 11946284
@DbLookup can slow you down a lot. Please try this one. I added some error trapping too.

Lst:=@DbLookup( "" : "NoCache" ; "85256D74:006E8AD6" ; "RegistrationLookup" ; querystringdocid ; 3 );
@If(
   @IsError(Lst);
      "Date(s) TBA"
   Lst = "";
      "Date(s) TBA" ;
   Lst)

Instead of Lst as a variable, you could also introduce it as a field (e.g. computed for display; but hidden(!)). @Subset(Lst; 1) could then be used as default value (if you ever want to do so).

Now you indicated that a (single) result could look like "Aug. 2, 2000 - Aug. 5, 2004 / SMITH HALL". This result might not show if selected/submitted, while "Date(s) TBA" does.
I still think the solution lies in qwaletee's response: the comma makes notes think that 2 values were selected: "Aug. 2" and " 2000 - Aug. 5, 2004 / SMITH HALL". Since these do not occur in the @DbLookup-results, nothing shows up selected!

In my above formula you could find proof if you omit all comma's from the result:

Lst:=@ReplaceSubstring(@DbLookup( "" : "NoCache" ; "85256D74:006E8AD6" ; "RegistrationLookup" ; querystringdocid ; 3 ); ","; "");

Or (much easier:) omit ", " from your column formulas!

Anyway... you tried it and blamed recomputation at save. Honestly, it's not!
You might be able to see what happens if you change the radiobutton type into a dialog list (miltiple values, allow values not in list).

At a later stage we might be able to tune the column formulas some, using list operations.
We could start off with date1_start:date2_start:date3_start:date4_start etc. and modify all elements at once.
(Using @ReplaceSubstring instead of @Select).

Even better would be to compute all this in the form (stored in an additional field) instead of in the view. The computations are performed to build a view, the slower it gets!
But that's all besides the scope of this question....
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 100 total points
ID: 11946527
Definitely the commas, and you can't really prevent what you refer to as the recomputation, because it is inherent to radio button field construction: commas are treated as a value break, and it is going to split the submitted value in two, which will therefore be an invalid value.  End of story.

Using CRAK's code, you eliminate the commas, and thus eliminate the problem.
0
 

Author Comment

by:kkiddie
ID: 11957598
I'm chalking it up to qwaltee's commas issue, but unfortunately I have to present the choices in the radio button field in a standard format, and that means using commas.

As a workaround I created a computed field with a default value set as the radio button field -- it picks up the choice made by the user and stores it even when the radio button selection disappears.

Thanks for your insights.

-ke
0
 
LVL 13

Expert Comment

by:CRAK
ID: 11958467
Perhaps you could define hidden fields to serve the @DbLookup and submit the field without comma.
With the aid of plain HTML or javascript you might be able to create a similar radio button (with comma), write its selected value to the text field (without comma) and submit that one.
Throuble will be: Domino won't like you submitting an unexpected (html) field.... you'll have to provide a duplicate name or something.
I haven't done it before, but think it stands a good chance!

Qwaletee, something you've come across before?
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now