• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 615
  • Last Modified:

Radio Button Values Submitted From Web Not Saved

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
kkiddie
Asked:
kkiddie
  • 4
  • 4
  • 2
  • +1
2 Solutions
 
CRAKCommented:
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
 
madheeswarCommented:
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
 
kkiddieAuthor Commented:
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
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
qwaleteeCommented:
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
 
kkiddieAuthor Commented:
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
 
CRAKCommented:
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
 
kkiddieAuthor Commented:
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
 
CRAKCommented:
@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
 
qwaleteeCommented:
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
 
kkiddieAuthor Commented:
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
 
CRAKCommented:
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
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.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

  • 4
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now