Pushing TransactionItem as Queue Item

So, I have a Reframework and each transactionItem contains about 30 specificContents or key-value pairs. At the end of the automation, I need to add a queue item to another queue for another process to run. For this queue item, I need to include all 30 key-value items from the transaction, as well as 5 additional items.

My question is: How can I easily and simply edit the current transaction item by adding the 5 additional key-value pairs or specific contents, and then push it as a queue item? Since these are essential dictionaries, I assume there is an easy process for this. Can anyone please provide a screenshot or XAML file to help me with this?

I really don’t want to extract or unpack all 30 specific items from the transaction and then individually add them to the queue item collection.

What I want

what I don’t want 35 items

image

@Jay_Chacko

You can try this

dict = in_TransactionItem.SpecificContent.ToDictionary(function(x) x.key, function(v) v.value.ToString())

This would give you the items as disctionary…then use append to collection activity and append your new key value pairs and then use that in item collection

Cheers

1 Like

Can you show me a xaml , I am getting a bunch of imicil errors

@Jay_Chacko

You can append new key values like this as well

image

Please try this

cheers

1 Like

Just use Assign activities to create the new key/value pairs.

transactionItem.SpecificContent(“New Key Name”) = “Some value”

Then pass transactionItem.SpecificContent to the Add Queue Item activity in the Item Collection property.

1 Like

I had to use the invoke method add to add the new key-value pairs to the in_TransactionItem.SpecificContent collection, but @postwick gave the idea to search further

No you didn’t. A simple assign would work fine. Invoke Method is overcomplicating things for no reason.

You are correct. Thanks for calling out, I was getting an object reference error before due to running without the transaction item being initiated. This is indeed a simplistic approach.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.