Here is what I would like to accomplish. From Form A, I would like to add a button to open Form B in a new window (this I know how to do). Using Field A from From A as the key, use DBLOOKUP to find the key and populate the field values on Form B.How can I accomplish this?
I do a similar thing with @username in the HTML Head Content:
userNameString := @RightBack(@Name([CN]; @UserName); " ") + " , " + @Left(@Name([CN];@UserName); " ");
userDeptString := @DbLookup(“”:“nocache”;“ln2”:“isapps\isnb.nsf”;“Profiles2”;userNameString;“PR_DepartmentName”;[FailSilent]);
"<SCRIPT LANGUAGE="Javascript" > var
userNameString=‘“+userNameString+”’"+@Char(13+
"+@Char(13)
What I do not know how to do is get a variable from Form A to the HTML Head Content.
Thanks for the help.
Subject: Using DBLookup
My first thought is to use @SetDocField rather than the approach you use (but your approach may be best for your scenario).
Without fully evaluating your JavaScript, you should be able to build a temp field in the HTML. I’m assuming the code generated above comes from DocumentA being opened in the browser then rendering DocB. If so, you could add some code like the following which will build the field (I’m doing this from memory):
“”
hopefully the syntax is close 8)
Subject: Using DBLookup
Steve,
To answer your last question – If that JavaScript is right on the form and marked as Pass-Thru HTML, you can integrate formula code with it by using Computed Text which is off the Create menu in Designer. In the computed text you would either type the @formula code directly, or refer to a field on the form that contains the value you want.
Ken