Welcome, Guest. Please Login or Register.
eccoMAGIC Forums
05/04/24 at 17:52:54
News: The Yahoo New Yahoo! Ecco_Pro forum was ended by Yahoo's end of board support... New group is at groups.io
Home Help Search Login Register


Pages: 1 2 
Send Topic Print
MagicMerge trigger LUA rule or vice versa? (Popularity: 27773 )
rb
Senior Member
****


I Love Ecco!

Posts: 88
Show the link to this post Re: MagicMerge trigger LUA rule or vice versa?
Reply #20 - 12/11/08 at 13:42:12
 
Furthermore, and this would be very useful:
 
I can now only insert fields that are associated with the items to be Merged.
However, I would also like to insert values from other items (that are not being merged).
 
Using a LUA script, I could get these values and then pass them to MM in the LUA command that starts MM:
 
Launch MM(arg1, arg2, arg3...)
 
The arg1, arg2, arg3... would then be fields that could be inserted into the document.
Back to top
 
 
  IP Logged
Admin
Administrator
*****


I love Ecco!

Posts: 134
Show the link to this post Re: MagicMerge trigger LUA rule or vice versa?
Reply #21 - 12/11/08 at 14:15:24
 
Quote from rb on 12/11/08 at 13:42:12:
Furthermore, and this would be very useful:

I can now only insert fields that are associated with the items to be Merged.
However, I would also like to insert values from other items (that are not being merged).

Using a LUA script, I could get these values and then pass them to MM in the LUA command that starts MM:

Launch MM(arg1, arg2, arg3...)

The arg1, arg2, arg3... would then be fields that could be inserted into the document.

 
 
am not tracking you here.
 
 
you can insert values from items that don't "print".    
 
in Word you do this via conditional  (see MM instructions for basic overview).
 
you still need to merge the items,  but for example,
 
if the merged item has value X,  use that for some purpose but don't do normal merge with item,  etc.
 
 
MM allows you also to use the first item in phonebook as 'header' on top of normal merge.
 
 
 
but likely am just not tracking...
 
MM(arg1,arg2... etc.)   what is arg ?   a fixed var to be passed to the word merge ?
 
if so,
 
why not just make the FIRST item in your merge to contain these folders,
 
and have word take the data from there ?
 
 
hope is clear enough to be helpful.
 
 
Edited:

 
adding this example:
 
 
Let's say you have a phone entry with key data in various folders.
 
load that into phonebook.
 
 
then go to another notepad with the actual items to merge (could be filtered phonebook items even,  or other item list).
 
 
use the MM "Header Record" option,   and phonebook item will be added as 'header'  to the other items selected for your merge.
 
 
within the word doc,
 
use the first item to fill in your 'args'.
 
 
____________________
 
alternative with LUA,
 
 
have LUA simple add the additional info into folders of FIRST item in list.
 
eg.,  list of 100 names,
 
at name 1,  add in folder A val A, folder B val B, etc.  then use A, B, etc. as your 'args'.
 
normal merge info might be "business, address, etc."
 
 
 
 
 

Back to top
 
 

The Administrator.
WWW   IP Logged
rb
Senior Member
****


I Love Ecco!

Posts: 88
Show the link to this post Re: MagicMerge trigger LUA rule or vice versa?
Reply #22 - 12/11/08 at 16:19:26
 
I am not sure if that would work. I tried the option, but must not have understood because the merged docs looked the same with or w/o the option enabled.
 
In any case, here is a simple example of what I want.
 
I have a separate itemX with folders F1(number) & F2(Text)
 
I have 2 items to merge with Folder F3 (text).
Note that the F1 Value is changing during the execution of the merge (by a LUA script)
 
Template
{F1}
{F2} {F3}
 
Results:
100
"Some Text" "Company1"
===== Section Break=====
105
"Some Text" "Company2"
 
A workaround is to transfer the Folder values from F1 & F2 to the the items to be merged (using a LUA script), and then execute the MM using these moved fields.  Simpler, but would add a lot of duplicate data in the file.  
 
In any case, would be very useful to be able to start MM in that LUA script (as originally suggested in this thread).
Back to top
 
 
  IP Logged
Admin
Administrator
*****


I love Ecco!

Posts: 134
Show the link to this post Re: MagicMerge trigger LUA rule or vice versa?
Reply #23 - 12/11/08 at 22:16:11
 
Quote from rb on 12/11/08 at 16:19:26:
I am not sure if that would work. I tried the option, but must not have understood because the merged docs looked the same with or w/o the option enabled.


I have a separate itemX with folders F1(number) & F2(Text)

I have 2 items to merge with Folder F3 (text).

Note that the F1 Value is changing during the execution of the merge (by a LUA script)

Template
{F1}
{F2} {F3}

Results:
100
"Some Text" "Company1"
===== Section Break=====
105
"Some Text" "Company2"

A workaround is to transfer the Folder values from F1 & F2 to the the items to be merged (using a LUA script), and then execute the MM using these moved fields. Simpler, but would add a lot of duplicate data in the file.

In any case, would be very useful to be able to start MM in that LUA script (as originally suggested in this thread).

 
 
can do.
 
tricky in that must pause for merge to finish,  then release.
 
 
 
in your Word template you have to transfer the live occurence of the F1 and F2  to a word var (bookmark) that you can then use,
 
otherwise the header data is lost with merge of 2nd record.
 
see example .doc Wink
 
 
 
Back to top
 
 

The Administrator.
WWW   IP Logged
Pages: 1 2 
Send Topic Print