Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding values to dialog listbox

Status
Not open for further replies.

donjohnson

Programmer
Jun 23, 2004
53
Hello!
I am new again to Notes, having been away over 5 years. I have a simple question that I just can't get going, and I hope you can help me out, or point me in the right direction.

I have a field that is a dialog listbox, which allows additional values to be entered. I would like to add this newly entered value to the predefined list in the easiest fashion, so the next new record has this as an option.

The application is for an asset tracking system - if I add a new asset brand (Comdial phone, for example), I want Comdial to be listed in the brand dropdown next new record.

Thanks for this easy one - I have a harder one coming soon!

Don Johnson
 
Create a view to list the asset brand from each existing document in the first column. Make this a sorted column. You can make this a hidden view if you like.

In your document you would use @DBColumn to retrieve the values from the view to populate your listbox.

For example, in the properties of your listbox you would go to the second tab and in the "choices" section change the option to "Use formula for choices". In the choices field you would use the following code:

@Unique(@DbColumn("";"NoCache":"database replica ID";"lookup view name";1))

This would retrieve all entries in the first column in your lookup view, get rid of any duplicates and display them as the options in your listbox.

Have a look in Designer Help for more information on @DBColumn.

Hope this helps you out

One hint (from experience) that might save you some heartache is to make sure you use the replica ID of the database you are using in this formula.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top