Forum: สอบถามปัญหา Notes ทางด้านพัฒนาโปรแกรม (Note Client) |
Tags1: | Created on Nov 18, 2009, 6:29 AM by 9notes/9Notes|Topic Responses: 2 |
&action=openDocument&documentId=2A4E |
จากใน help desiger ครับ
อันดับแรกเราต้องสร้าง view ขึ้นมาก่อนแล้วให้ column แรก sort แบบ ascending หรือ descending ก็ได้เพราะ column นี้จะถูกใช้ในการค้นหาถ้าไม่ sort จะค้นหาตามคำสั่ง dblookup ไม่เจอ
Given a key value, looks in the specified view (or folder) and finds all documents containing the key value in the first sorted column within the view. For each selected document, @DbLookup returns either the contents of a specified column in the view, or the contents of a specified field.
Syntax
@DbLookup( class : cache ; server : database ; view ; key ; fieldName ; keywords ) or
@DbLookup( class : cache ; server : database ; view ; key ; columnNumber ; keywords)
class อันนี้ไม่ต้องระบุจะรู้เองว่าไปดึงข้อมูลจาก notes database
cache อันนี้ถ้าต้องการให้เก็บ cache ก็เอาไว้เหมือนเดิมถ้าไม่ต้องการก็ใส nocache
server ระบุชื่อ server
database ระบุ database+path
view ระบุชื่อ view ที่สร้างไว้ก่อนหน้านี้
key ระบุ key ที่มีค่าตรงกันกับค่าของ column แรกในวิว
columnnumber หรือ keywords อันนี้เลือกใส่อย่างใดอย่างหนึ่งก็พอ ว่าต้องการเอาค่าของ column กลับมาหรือต้องการ field ไหนในรายการก็ระบุเป็นชื่อฟิลด์เข้าไปได้เลยครับ
ตัวอย่างการใช้งาน
@DbLookup("":"NoCache";"RESEARCH":"SMITH\\PROJECTS.NSF"; "In Progress";"Virus Check";"Status")
|
|