Link to home
Start Free TrialLog in
Avatar of kkiddie
kkiddie

asked on

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
Avatar of CRAK
CRAK
Flag of Netherlands image

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.
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.
Avatar of kkiddie
kkiddie

ASKER

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
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.
Avatar of kkiddie

ASKER

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


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?

Avatar of kkiddie

ASKER

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; ""));"")
)
SOLUTION
Avatar of CRAK
CRAK
Flag of Netherlands image

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
Avatar of kkiddie

ASKER

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
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?