How can I improve the ability to select a value from a dialog list (Domino R5 web)

I have a field called "AI_ServerName"

It is a dialog list with selection formula:
"[not selected]" :
"**SERVER NOT LISTED**" :
@DbColumn( "": "NoCache" ; "" : "" ; "AIServers"; 1)

It has about 1400 records.  When a user wants to select a value.  Let's say for example a value like "dn0325" (which is a server name)...the system only takes the user to the "D" section of the list. Then if the user selects "DN", the system takes the user to "N" section of the list.   Is there a better way to improve this.  I was thinking of a empty text field where a user enters the value, and then presses an action button, and the dropdown list will populate the value or if not on the list, will show the value "Server Not Listed".

Is this possible?

Thx Anna
mermaidinkAsked:
Who is Participating?
 
Sjef BosmanGroupware ConsultantCommented:
Oooh, I'm so very sorry! I missed that detail, it's a web-form. Me very bad. Is it a web-only form??

Now, there's some bad news, and there's good news.
The bad news is that the earlier method is wrong, most likely, or too difficult. It would also require a refresh by the server, which takes time and isn't very user-friendly.
The good news is that it can probably be done using JavaScript.

But... Not easy. It's getting rather late over here, so I'll give you the general idea, with some links. You can have some JavaScript monitoring a temporary field. When the data in the field is changed, the available options in the dialog box should be changed. I think it can be done, but it must be thoroughly tested on several browsers.

See also:
    http://www.quirksmode.org/js/options.html
    http://www.mredkj.com/tutorials/tutorial005.html
0
 
Sjef BosmanGroupware ConsultantCommented:
Yes, it's possible, somewhat like this:

- a field AlServers, CfD, multi-value, formula
    @DbColumn( "": "NoCache" ; "" : "" ; "AIServers"; 1)

- a field SomeAIServers, Computed, multi-value, formula:
    @If(SomeAIServers=""; AIServers; SomeAIServers)

- a field "AI_ServerName", editable, as it is, with option-formula
    SomeAIServers
-
- a field ServerPartial that allows you to input a partial name, editable

- a button with the formula
    If(ServerPartial=""; @Return(""); "");
    @SetField("SomeAIServers"; ServerPartial + @Trim(@Right(AIServers; ServerPartial))
0
 
Sjef BosmanGroupware ConsultantCommented:
Hm, at the end of the button, you need to refresh the form:
    If(ServerPartial=""; @Return(""); "");
    @SetField("SomeAIServers"; ServerPartial + @Trim(@Right(AIServers; ServerPartial)));
    @Command([ViewRefreshFields])
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
mermaidinkAuthor Commented:
What is the purpose of ServerPartial (which you said above "allows you to input a partial name, editable"
Would the user be using ServerPartial and then press the button?

I will do a test form with a scenario like this to undersatnd it more...
0
 
Sjef BosmanGroupware ConsultantCommented:
That's the general idea yes.
0
 
mermaidinkAuthor Commented:
I am trying to save my form after doing the new fields in designer and error says
"No formula specified for computed field AIServers"

I did the AIServers field like this (as per what you said).
dialog list, computed for display, and in the USE formula for choices box, I put:
@DbColumn( "": "NoCache" ; "" : "" ; "AIServers"; 1)

Did I do that field correctly?
0
 
mermaidinkAuthor Commented:
I forgot to select "Allow multiple values" (put a checkmark) for the AIServers field...
0
 
Sjef BosmanGroupware ConsultantCommented:
No, field is not correct, it shouldn't be a selection field, but just a text field, multi-value, and as computed value
    @DbColumn( "": "NoCache" ; "" : "" ; "AIServers"; 1)
0
 
mermaidinkAuthor Commented:
I still get that error when I put a checkmark in the AIServers field.

Also I am not sure if I did the AI_ServerName field correctly. You said:

- a field "AI_ServerName", editable, as it is, with option-formula
    SomeAIServers

I put in the default "SomeAIServers" formula in the default value space of the field. I'm not sure what you meant..
0
 
mermaidinkAuthor Commented:
This is what I saw for each field.


I created a document

Field 1 (AIServers) had many values appearing
AIA4002, AIA4004, AIA4005, AIA4010, AIA4011, AIA4015/DM1CMK, AIA4017, AIA4023, AIA4024, AIA4028, AIA5006,

Field 2: AI Servers had the same thing happening. All the values appearing.  

Field 3: AI_ServerName field had a value selected (even though I didn't select it or touch it. It was just at any vlaue)

Field 4: PartialServer field (text box) where user enters in the servername and presses search appeared normally.

I enter in a server name and press search..then it populates Field 2 (AIServers) but Field 1(AIServers) still shows all those multiple values from the dbcolumn and the Field 3 is stuck at a value which is not selected by the user.  Is FIeld 3 (AI_ServerName) really needed.

I also wondered can we add a clear action to delete the PartialServer field?
0
 
Sjef BosmanGroupware ConsultantCommented:
It should work but maybe I didn't describe the technique well enough. The idea is to have a complete list of all servers (the field AIServers), to have one field for the user to enter the first few letters (PartialServer), the button that matches the PartialServer with AIServers with output in a field SomeServers, and a dialog list field that selects its options from SomeServers.

Come to think of it, a PickList might be exactly what you need. Try a button with:
    x:= @PickList( [CUSTOM] : [SINGLE] ; @DbName ; "AIServers"; Available Servers" ; "Select your server" ; 1);
    @If(x=""; ""; @SetField("AI_ServerName"; x)
0
 
mermaidinkAuthor Commented:
I will take a look and see if I did it all properly.
0
 
mermaidinkAuthor Commented:
When I put that PickList code in a button (from above), I got a notice on the bottom of the box

An operator of semicolon was expected but none was encountered "Servers".  It highlights the word Servers in red in the box or white space where the code is placed.  I noticed that you have one quotation after the word, like this:
Available Servers"
 
x:= @PickList( [CUSTOM] : [SINGLE] ; @DbName ; "AIServers"; Available Servers" ; "Select your server" ; 1);
@If(x=""; ""; @SetField("AI_ServerName"; x)

I thought @PickList was for the web? I am doing a web form.
0
 
mermaidinkAuthor Commented:
I am not bothering with the PIcklist anymore.

About the orginal method...

 a text field AlServers, CfD (then you later said computed), multi-value, formula
    @DbColumn( "": "NoCache" ; "" : "" ; "AIServers"; 1)
This field is hidden to user because it displays all the server values.

- a field SomeAIServers, Computed, multi-value, formula:
    @If(SomeAIServers=""; AIServers; SomeAIServers)

- a field "AI_ServerName", editable, as it is, with option-formula
    SomeAIServers

- a field ServerPartial that allows you to input a partial name, editable

- Search button with the formula
   If(ServerPartial=""; @Return(""); "");
    @SetField("SomeAIServers"; ServerPartial + @Trim(@Right(AIServers; ServerPartial)));
    @Command([ViewRefreshFields])

What I am finding is that user enters in a text value into the ServerPartial field then presses Search button.
Then SomeAIServers field shows the same value which was entered in the ServerPartial field in read only display (I hide this from user).

AI_ServerName does not do anything.  I wonder if the refresh is working (does it need to execute an agent?)
The other problem still is when the user enters in a value that does not exist in the server list, the SomeAIServers field does not indicate "Value not in list"..

0
 
ZvonkoSystems architectCommented:
Thanks Sjef for inviting me. I have made several keyboard controlled select lists but have none of them tested with Domino. They all should work from start with Domino, but as you know: before you did not test you do not know ;-)
I am now at home and will be in about two hours at my machine where I can test that.

Meanwhile Anna you could you post the snippet of the html page where the DialogList is displayed in browser page html source. Of course reduce the options to ten or so.
0
 
ZvonkoSystems architectCommented:
Here an old answer I tested with Domino: http:Q_20732817.html
You need this for the Field AI_ServerName onKeyUp event handler web JavaScript:
selOpt(event, this)

And in Form's JS Header section put this script:
function selOpt(e, theSel){
  if(!theSel.sStr) theSel.sStr="";
  theSel.sStr+=String.fromCharCode(e.keyCode).toLowerCase();
  window.status="Select: "+theSel.sStr;
  l=theSel.sStr.length;
  for(i=0;i<theSel.options.length;i++){
    if(theSel.options[i].value.substr(0,l).toLowerCase()==theSel.sStr){
      theSel.selectedIndex = i;
      return;
    }
  }
  window.status="Select: ";
  theSel.sStr="";
}


If you prefer matching the entered text at ANY position in the options value, then use this version:
function selOpt(e, theSel){
  if(!theSel.sStr) theSel.sStr="";
  theSel.sStr+=String.fromCharCode(e.keyCode).toLowerCase();
  window.status="Select: "+theSel.sStr;
  for(i=0;i<theSel.options.length;i++){
    if(theSel.options[i].value.toLowerCase().match(theSel.sStr)){
      theSel.selectedIndex = i;
      return;
    }
  }
  window.status="Select: ";
  theSel.sStr="";
}


Have a look to browser window status bar to see the stage of matching input.


0
 
mermaidinkAuthor Commented:
Zwonka, in your comment at 2:18 am, you said for me to take a snippet of the html page where the Dialoglist is displayed in browser page html source.  Do you mean from this site: http://www.mredkj.com/tutorials/tutorial005.html?
with this code?   I read through all the pages you gave.  I am trying to understand this.   If I use the html code, then do I keep my field AI_ServerName and put the html code in the HTML Body attributes of my form?  
Also I saw your most recent post (above this one) and I am confused. Do I use this with the HTML given in Tutorial 5?

The HTML from the tutorial 005
<form>
<input type="button" value="o" onclick="insertOptionBefore(count1++);" />
Insert Before Selected<br />
<input type="button" value="o" onclick="removeOptionSelected();" />
Remove Selected<br />
<select id="selectX" size="10" multiple="multiple">
<option value="original1" selected="selected">Orig1</option>
<option value="original2">Orig2</option>
</select>
<br />
<input type="button" value="o" onclick="appendOptionLast(count2++);" />
Append Last<br />
<input type="button" value="o" onclick="removeOptionLast();" />
Remove Last
</form>

0
 
ZvonkoSystems architectCommented:

1.) I asked for YOUR page as displayed in browser. If you look in browser for your page then you will see the html source generated by Domino for your Notes Form.

2.) My upper JavaScript has detailed description how to be injected into your Form design. What part of my description do you not understand?

0
 
mermaidinkAuthor Commented:
Here is the page source as seen in the browser for my notes form called SelectServer:
http://www.mermaidshelf.com/selectserver  (it's a text file)


0
 
mermaidinkAuthor Commented:
I tried another way.  It's something that was first suggested.  I think there is a way to make it work.

To recap, I have:

Field: AI_ServerName; dialog list; editable with formula: "[not selected]" :
"**SERVER NOT LISTED**" :
@DbColumn( "": "NoCache" ; "" : "" ; "AIServers"; 1)

Field 2: ServerPartial; text; editable

Then I have a Search button: It contains this code:
@If(ServerPartial=""; @Return(""); "");
@SetField("SomeAIServers";ServerPartial+@Trim(@Right(AIServers; ServerPartial)));
@Command([ViewRefreshFields]);
x:= SomeAIServers;
@If(x=""; ""; @SetField("AI_ServerName"; x));
@SetField("ServerPartial";"")

When I search for a value that is in the list, then the dialog box will display that value (I enter value in ServerPartial field and press the search button)

If it is not on the list, then it shows the value "not selected" on the dialog box.  I wondered if there is a way, where it can show "Server not listed in list".

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.

All Courses

From novice to tech pro — start learning today.