I read on tips for optimization,just like to get some feedback before I really used it.
In my form I have field A, B, C, D.Field A is editable,the other field will get value from fiela a, than do lookup at viewLookup, get value at column 2, 3, and 4 for respective value.
My question is, does it really make that much different, if I use @implode, to keep value of column 2, 3, and 4 in one field, than do explode to put the value into field B, C, D.
so far, in terms of performance, the problem is rather intermittent, sometime it take up to one minute to refresh, sometime just few seconds. However, don’t want to waste time changing my formula if the effect is rather minimal.
any comment is appreciated.
regards
Subject: Optimising lookup function
If your question is, “Is it more efficient to perform one @DbLookup and then parse the results into multiple fields” then the answer is yes.
The only downside is that if you have many different scenarios then you might have to build many different lookup views. This isn’t a performance issue so much as a maintenance issue. But if you only have a few of these, then I don’t think there is any downside at all.
regards,
raphael
Subject: Optimising lookup function
To look up a couple fields probably you will not notice a significant delay particularly if you make the lookup Cached. Having said that the best solution would be a single look-up and then parse the result. In our Workflo!Approval we need to load the settings from a profile document and at the present time that involves some 100+ discrete values. In teh lookup view we have a column that computes the 100+ values into an array Field1 : Field2 : Field3 : etcand reads the content into a single computed for display field on the form (only computes if this is a New Document) then each of the data fields on the form get thier input with a formula like @Subset(@Subset(ACProfileData;4);-1). This whole process actually works pretty quickly and because it only is performed when the Document is new does not impact performance at all after that.
You can look at the actual code behind all of this in our demo that you can download from our web site at http://wfs.com/workweb/wfsweblib.nsf/Src/DocSet*Notes+Net07
I’m sure there are other ways to accomplish this, but this method has worked for us for a number of years without a problem. The only issue is that you must keep track of the position pointers which I do in a spread sheet, but because they don’t change very often (might add new ones) it is not a real big task.