Ben Langhinrichs

Photograph of Ben Langhinrichs

E-mail address - Ben Langhinrichs






November, 2019
SMTWTFS
     01 02
03 04 05 06 07 08 09
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Search the weblog





























Genii Weblog

Universal @DBLookup

Tue 30 Nov 2004, 09:18 AM



by Ben Langhinrichs
I am just having too much fun with the new (soon to be released) universal @DbLookup.  To give you an idea of the flexibility, here are a few formulas.  See if you can figure out what they do, and why they would be used, then click on the answer to see how close you came:

@DbLookup("Midas":"NoCache"; ""; @DocumentUniqueID; "Body":"Paragraph  *"; "Bullet"; "Text"; "KeyProperty=ParagraphStyle KeyMatch=Substr");

Answer

width := @Sum(@DbColumn("Midas":"NoCache"; ""; @DocumentUniqueID; "Body":"Graphic *"; "GraphicWidth"; "Format=Number"));

Answer

filesize := @Sum(@DbLookup("Midas":"NoCache"; ""; @DocumentUniqueID; "Body":"File *"; ".doc"; "FileSize"; "Format=Number KeyProperty=OriginalFileName KeyMatch=Ends "));

Answer

@DbColumn("Midas":"NoCache"; ""; @DocumentUniqueID; "Body":"Section  *");

Answer

anchors := @DbColumn("Midas":"NoCache"; ""; @DocumentUniqueID; "Body":"Anchor  *"; "AnchorText");
@If (anchors != ""; "["+@Implode(("<a href=\"#"+@ReplaceSubstring(anchors; " "; "%20"))+(("\">"+anchors)+"<a>"); "<br>")+"]"; "")

Answer

Copyright © 2004 Genii Software Ltd.

What has been said:

No documents found