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?
padillrrProject CoordinatorAsked:
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.

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


I hope this helps !
0
padillrrProject CoordinatorAuthor 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?
0
olaraakCommented:
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:

@Command([Compose];"":"Reply")

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;
 
@Command([Compose];"":"Reply");
 
@UpdateFormulaContext;
@SetField("CustomerJob";dCJob);
@SetField("other-field-name";otherVar)

Open in new window

0

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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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




0
padillrrProject CoordinatorAuthor 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.......
0
padillrrProject CoordinatorAuthor 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;
@UpdateFormulaContext;
FIELD CustomerJob:=dCJob;
0
padillrrProject CoordinatorAuthor Commented:
Anybody want to take this on?
0
padillrrProject CoordinatorAuthor 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...
0
padillrrProject CoordinatorAuthor Commented:
Thanks olaraak that did work...
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.