Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1329
  • Last Modified:

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?
0
padillrr
Asked:
padillrr
  • 7
  • 2
1 Solution
 
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 7
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now