SearchDomino.com July 16, 2001 Developer Tip ================================================= ------------------------------------------------- Sponsored By: The Learning Continuum Company ------------------------------------------------- Don't become extinct! Get the advanced training you need to stay ahead in today's very competitive job market. Get certified or learn advanced topics like Java and XML. TLCC's highly acclaimed Notes/Domino training lets you download the courses to your office or home computer and learn at your convenience. Instructor support is a click away. SAVE hundreds of dollars with TLCC's Hot Summer Sale! Try a FREE course now at http://www.tlcc.com/searchdom. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LIVE AUDIO EVENT ON WEBSPHERE AND DOMINO! Join us July 18, 2001 for a Live audio chat event with Tony Higham, director of IBM Technologies, RareMedium, Inc., at 12:00 pm EDT (16:00 GMT). Get inside advice on using Java and WebSphere with Domino to build enterprise-scale applications. Find out how to use Java Servlets, JavaServer Pages (JSP), JavaBeans, and Enterprise JavaBeans (EJBs) to build the next generation Web apps for Domino. Get all your Websphere questions answered! ================================================= Feature Tip ================================================= Title: Filling in multiple fields without using a computed field This tip was submitted by Greg Winfield, a programmer from Chester, VA. There have been many times that I want the user to select an item from a drop down list and have multiple fields update according the choice the user made. The users usually want to be able to make changes to those fields if they need to. So, I have come up a solution using a button. CODE: All of the following formula goes under the Click event of the button. I create a button that assigns a @DbColumn function or two to a variable, depending on what I want the user to see in the drop down list. If I use more than one @DbColumn I create another variable that appends the results of my @DbColumn functions. See below for an example: ALPI := "85256A56:00663314"; p1 := @DbColumn( "" : "NoCache" ; ALPI ; "By Part Number" ; 1 ); p2 := @DbColumn( "" : "NoCache" ; ALPI ; "By Part Number" ; 2 ); p3 := p1 + " - " + p2; I then use this variable in @Prompt function, which I assign to another variable. Example of the @Prompt function: choice := @Prompt([OKCANCELLIST]; "Part Number"; "Please select an Part Number."; "";p3); If I am using more than one @DbColumn, I use the @Left statement to pull the first item from the selection. Example: part := @Left(choice;" - "); FIELD IMKEY := part; Now I will use the part variable in a @DbLookup function that finds the information I have set up in the lookup column in a previously created view. This column will have several fields appended together, separated by a special character such as "Y". The view column formula should look something like this below: IMKEY+"Y"+Description+"Y"+P_C+"Y"+LEADTIME+"Y"+@Text(UnitPrice)+"Y"+Type+"Y"+Catalog Example of the @DbLookup function: lookup := @DbLookup("":"NoCache";ALPI;"By Part Number";part;7); Once I have the lookup variable set, I can now use @Word to populate the fields. Example of populating the fields: FIELD Desc := @Word(lookup;"Y";2); FIELD UnitPrice := @Word(lookup;"Y";5); FIELD LEADTIME := @Word(lookup;"Y";4); FIELD Catalog := @Word(lookup;"Y";6); END CODE http://searchdomino.techtarget.com/tip/1,289483,sid4_gci561016,00.html ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================= Do you have a comment on this tip? Jump into our Developer Discussion forums and toss your ideas around with your peers: http://searchdomino.discussions.techtarget.com/WebX?50@@.ee7740b OR SEND US YOUR FEEDBACK TO BE POSTED ON THE TIP TO: [EMAIL PROTECTED] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================= NEWLY POSTED DEVELOPER TIPS: ================================================= We posted 9 new tips last week. Thanks for all your tips and keep them coming! Agent Category: http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283834_alpD_idx0,00.html [1] Mail "todo" list Formula Category: http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283836_alpD_idx0,00.html [1] Make the hidden design visible [2] Accessing actions on other frames JavaScript Category: http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283840_alpD_idx0,00.html [1] Input validation for file attachments using JavaScript [2] Proper case all words in a string Other Category: http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283842_alpD_idx0,00.html [1] DECS and the AS/400 [2] Getting the client time zone info Script Category: http://searchdomino.techtarget.com/tipsIndex/0,289482,sid4_tax283841_alpD_idx0,00.html [1] Creating a report using a form based on date [2] Writing more than 64k data to a single document ================================================= FEATURED BOOK: ================================================= Lotus Notes and Domino 5 Bible By Kyle Brown, Kenyon Brown and Kevin Brown Lotus Notes and Domino 5 offer robust workgroup functionality -- and shows you how to put them to work quickly and easily to help you work more efficiently and effectively as a team. You'll get the lowdown on new features such as Notes Designer for Domino and the dynamic interface, as well as complete coverage of collaboration tools, Notes databases, and custom applications. Whether you're a network administrator, a team leader, or a Notes power user, this comprehensive tutorial and reference gives you the real-world insights you need to create and support highly productive workgroups. http://www.digitalguru.com/dgstore/product.asp?sku=0764545906&dept%5Fid=288&ac%5Fid=60&accountnumber=&couponnumber= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================= Disclaimer: These tips are submitted by your Domino peers. Our tips services and online tips exchange are a way for you to learn from other IT professionals and share technical advice and expertise with your peers. Techtarget.com provides the infrastructure to facilitate this sharing of information. However, we can't guarantee the accuracy and validity of the material submitted. You agree that your use of the searchDomino.com tips services and your reliance on any questions, answers, information or other materials received through searchDomino.com will be at your own risk. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ================================================= NOTIFY US WITH FEEDBACK ================================================= Send us your tips feedback! Cast your vote and send us your tips comments. If you have vital code information or other comments you'd like to add to one of our online tips, send your comments to [EMAIL PROTECTED], and we'll add your User Feedback to the online tip! ================================================= If you would like to sponsor this or any TechTarget newsletter, please contact Gabrielle DeRussy at [EMAIL PROTECTED] ================================================= If you no longer wish to receive this newsletter simply reply to this message with "REMOVE" in the subject line. Or, visit http://searchDomino.techtarget.com/register and adjust your subscriptions accordingly. If you choose to unsubscribe using our automated processing, you must send the "REMOVE" request from the email account to which this newsletter was delivered. Please allow 24 hours for your "REMOVE" request to be processed.
