inheriting field values with lotus script on queryopen

I want to inherit a fieldvalue from an email upon replying. I've modified the memo form to contain some additional fields but when I reply to the memo I can't get those fields to repopulate, I can't use inherit on the form because then the memo/reply inherits the from details I was thinking that I could grab the data from the field through lotus script and put it in the proper field on the reply so that the user would not have to REselect the options. Is there any other way that would provide me with the information I need?
Ray PadillaIT DirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Using query Open to populate the fields is fine.
Just remember that you may need to refresh the UI.

I hope this helps !
Ray PadillaIT  DirectorAuthor Commented:
So if I use this line:
Call Source.document.FieldSetText("CustomerJob","dsp_CustomerJob")
Call source.Document.Save(True, False)
in the queryopen then when the reply form opened it would look at the CustomerJob field and replace the text there with whatever is in the dsp_customerjob field correct?
You can't use function FieldSetText on backend document, because it belongs to front-end document (Source). And, the second parameter must be field name, not string.  You should write it like Source.Document.CustomerJob = dsp_CustomerJob.

But then we get another problem- just field name is not enough. You must point to document object, where field resides.
It is possible, using reference to parent document and getting parent doc (mail) object from database object and so forth.

Fortunately, there is a simpler solution, using Formula language.

Under "Reply" button, there is formula:


You must modify this code as follows, and reply will get fields filled from selected e-mail.

REM {Save mail fields content to variables};
dCJob := dsp_CustomerJob;
otherVar := other_Field_name_on_Memo_form;

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Ray PadillaIT  DirectorAuthor Commented:
tried that but it doesn't seem to be working
It should work well, if you have Notes version 6 or newer.
Function @UpdateFormulaContext was introduced in v.6.

Ray PadillaIT  DirectorAuthor Commented:
I'm on version 8.02 standard and It isn't working, I am trying to populate a dialog list with the information found in dsp_CustomerJob so that the sender does not have to RE pick from the list or he can change the selection.......
Ray PadillaIT  DirectorAuthor Commented:
I used the code below in the reply button which worked OK but I REALLY need this to be in the QueryOpen of the Reply form. I just need to convert this to LS any takers?

dCJob := dsp_CustomerJob;
FIELD CustomerJob:=dCJob;
Ray PadillaIT  DirectorAuthor Commented:
Anybody want to take this on?
Ray PadillaIT  DirectorAuthor Commented:
Gonna close this and grant the point to olaraak his solution worked even though it was not exactly what I was looking for. The Formula did the job in the Action buttons, was tryting not to have to modify them all...
Ray PadillaIT  DirectorAuthor Commented:
Thanks olaraak that did work...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.