Populating field group from two consecutive datalinks?

Trying to set up a way to populate my field group (invoice line items). Currently the workflow will run a transactions datalink for positive value invoices, and will run a returns datalink for credit invoices, by way of some if/else logic. Customer wants BOTH to run now, because they often get invoices with both return and purchase lines.
Both datalinks are set up with the DataLink Field Group task

I can’t figure out how to get one DataLink to run, populate the field group, then get the other one to run and just add on the lines, rather than overwriting. I have tried experimenting with the Set Field Group Values task set to Append, but I think I must be missing something.

You may have to write your own datalink for that. I haven’t seen a way to Append rows when calling a datalink.

I believe you can do this with a Datalink task for the secondary datalink. Use a temp field to store the values and use a Set Field group with append to join those rows to the first field group rows.

What kind of datalinks are those? Are they built-in (part of an Automation product) or custom?

2 Likes

Oh that’s a great idea I’ll try that.

These are custom datalinks which talk to the customer’s purchasing SaaS thing. They were able to give us API access so we figured out the rest.

The annoying thing is the lines for returns aren’t negatives in their system, so I gotta bring them over, convert, then bring over the rest.

This worked, thank you.

A weird behavior I did notice - the solution you mentioned works great - regular datalink just gave out multi-valued temp fields (my source had 3 rows), but if I invoked this task AFTER running the regular datalink field group, it would only pull 1 row.

But changing the order around worked, i just thought it was weird.

1 Like

I thought of this last night as was going to offer it up - you beat me to it @swilliasc111 !

1 Like