Dbcolumn and refreshing

I do apologize if this has been discussed before. This is my second post. I could not find exactly what I was looking for. I have two dialog lists on a web form that I am using dbcolumn to get values. Both are editable fields. I select the values and continue filling out the form. When I come to a field where I have refresh fields on keyword change, my dialog list values are set back to the initial default value. I am losing my selected values. How can I prevent this? Thanks for your help

Subject: RE: dbcolumn and refreshing

What you’re describing is not how this option usually works. Therefore, you’re doing something unusual that makes the values of your fields go away. There are many possibilities what this might be. My suspicion is that there’s an input translation formula in the two fields that’s erasing their values.

If you want to pursue this further here, please provide relevant details. Do you have formulas in the fields and if so, what are they? All the formulas, including the keyword formula. Is there a Webquerysave? Are there other formulas that mention the two fields in any way? They are suspect. What about other fields on the form; are they erased too? Do the two fields have the same keyword selections available after the form is refreshed? Are they supposed to? What happens when you submit the form for saving? Do you retain the field values then? What options have you enabled on the form? Is JavaScript turned on in the database options?

Subject: RE: dbcolumn and refreshing

So particularity

Subject: RE: dbcolumn and refreshing

All of that information is needed to diagnose the problem.

Subject: RE: dbcolumn and refreshing

If you think I have too much particularity, my alternative is to answer the question at the same level of detail at which it was asked, e.g.:

“It doesn’t work because you did something wrong.”

Subject: RE: dbcolumn and refreshing

Sorry for the lack of detail. I do have a formula in the dialog list field. I use the following to populate my dialog. ret :=@If(!@IsDocBeingEdited;@Unavailable ;@DbColumn(“”;“”:“”;“Doctors”;1));

“(please select)”:@If(@IsError(ret);“”;ret). I don’t have anything in the input translation or input validation. I have nothing in the WebQuerySave. When I save the form, all selected values are retained. On submit, I do call a function that resides in the JS header; which I use to validate" I have “use JavaScript when generating pages” Checked. I also have generate html for all fields checked. When I do refresh my form, the dialog value goes back to please select. This is my initial default value. I hope that this helps. Thanks for your assiantace.

Subject: RE: dbcolumn and refreshing

That’s a start – you answered some of my questions.

Do you have formulas in the fields and if so, what are they? All the formulas, including the keyword formula, for all three fields involved (your two fields that get erased, and the field that has the autorefresh property enabled). You gave a keyword formula for one field, but is it for one of the fields whose values get erased, or the field which when you change it, causes the other fields to be erased? Are there other formulas that mention the two fields in any way? What about other fields on the form; are they erased too when the refresh occurs? Do the two fields have the same keyword selections available after the form is refreshed (i.e. you pull down the combobox – do you see the choices you’re supposed to see)? Are they supposed to have the same values as before? What happens when you submit the form for saving? Do you retain the field values then? What options have you enabled on the form?

And more: What is the URL in the browser before you change the “refresh on change” field, and what is it afterwards?

Subject: RE: dbcolumn and refreshing

Again I would like to thank you for your time. I do appreciate your help. I will try to answer your additional questions. I only have formulas in the in the two fields that I use as the dialog lists. The default value on the dialog list when I open the page says “please select”. @DbColumn(“”;“”:“”;“Doctors”;1)); “(please select)”. I don’t have refresh keywords on the dialog lists. I do see the values that I am supposed to. I select a value from the first dialog field and hit tab, and the value remains. I select the second field value and the value remains. I next tab to the third field that is a radio button with 3 values. The values are hard coded - I have not formula in this field. I tab out and the form refreshes. I do have the refresh keyword selected on the form. The values that were selected in the dialog list reverts back to please select; which is the initial default value. No other fields have any problems. If I submit, the form without tabbing through the field with the radio button, I values are retained. It’s just the two fields with the dbcolumn that cause me problems… I need to refresh after tabbing out of the radio button field because I have some hide when’s on text at the bottom of the form. When I refresh, the url does change by the seq. This increments by one each refresh. It looks like the following. http://sis400.peacehealth.org:4100/PHMGREFTEST.nsf/MRN?OpenForm&Seq=1#_RefreshKW_txtConsult. txtConsult is the field that has the keyword refresh checked.

Under the form properties. I have generate html for all fields selected. I have notes selected for the content type. I have nothing else selected in the form properties. Thanks again. FYI - one of your Decs documents saved me. : )

Subject: RE: dbcolumn and refreshing

The problem is not obvious. Here are some more things to think about.

You keep describing the two fields as “dialog lists,” but of course there is no such thing in a web browser. Do they display as comboboxes? I expect the answer is yes.

What’s happening sounds like the value you selected is no longer available in the combobox list.

After you exit the radio field and the value you have selected in the combobox goes away, can you pull down the combobox list and still find that value?

What is the value you select in the combobox? Does it contain any characters that Domino might be regarding as a list delimiter? E.g. if the value you select is “Harrison, Geraldine”, the comma is probably going to be treated as a separator between multiple values (unless you have selected some different delimiter in the field properties). So the value will be interpreted as “Harrison”:“Geraldine” – a list containing two values. Since neither of these values matches an entry in the list of choices, no value is selected in the HTML that the Domino server generates.

Add a computed field just before the keyword fields with a formula such as: @Implode(“{” + @Text(field1); “}, {”). This will show you what value Domino is trying to match against the list choices and whether it’s being treated as a single value or as a list.

Subject: RE: dbcolumn and refreshing

I am getting closer. In the lookup column, I am concatenating the LastName, FirstName and Degree, and the Location. The strng looks link the following. Allcott John Applegate Medical Associates

I did explode the field as you requested and the value matched the initial selected value. This gives me something to work on. I tried a value that was not concantanated, and all worked fine. It’s just the concantanted value that is causing a problem. Thanks for you help. :slight_smile: