Pulling array item from queue

I have an array in my queue as a single transaction item, but when I want to pull it down and use it, it is like this:
image

Unsure how to pull it down as an array or read it and make an array from it?

Hi @E.T.S ,

Could you clarify whether the variable is of Type QueueItem or Array of QueueItem ?

If it is a QueueItem, we access the value using SpecificContent property like below :

YourQueueItemVar.SpecificContent("ParameterName").ToString
1 Like

The variable type:

When I used the below :
TransactionItem.SpecificContent(strSerializeFollowUpRisks).ToString

I get this error message:

@E.T.S

You have to assign transactionitem directly I believe can you try the same

Looks like both a queue items so directly assign it in import arguments

Cheers

Do you mean like this:

This is the variable type:

@E.T.S

No click on import argument and assign transactionitem = transaxtionitem

remove specific content

cheers

That solved the error thanks! But I am still getting this when I put the variable into a log message:
image

@E.T.S

in log message you need to give transactionitem.SpecificContent("TheNameHere").ToString

cheers

The transaction item is an array - is there a way I can convert this to an array? Also I would like to iterate through items in the array - would a for each activity work for an array type variable?

Thanks!

@E.T.S ,

We are getting confused with some of the terms used. You did mention that assignment of TransactionItem as QueueItem type did work and it was solved.

I believe you would require to use SpecificContent Property to access each element information present/added to the Queue Item.
If you would want to iterate over the items present in the SpecificContent, we could use a For Each activity and perform the Loop over it:
image

As it is a Dictionary, we use the KeyValuePair type as shown above.

But to be more accurate in our suggestions, you could let us know what is the actual requirement.

@E.T.S

For each will work for array…as per screenshot I see transactionitem is queue item but you are saying it is array

or is it that you need to be array?

can you tel what you are trying to acheive?

cheers

Apologies for the confusion. The data was uploaded as an array, but when I pull the data from the queue, it is a queue item variable, so I’m guessing I need to make an array from queue item variable.

I am trying to achieve creating an array from the transaction item in the queue

I would like to go through each item in the array: so currently it is a queue item - convert to array - iterate through each item in array

Apologies for the confusion. The data was uploaded as an array, but when I pull the data from the queue, it is a queue item variable, so I’m guessing I need to make an array from queue item variable.

I am trying to achieve creating an array from the transaction item in the queue

I would like to go through each item in the array: so currently it is a queue item - convert to array - iterate through each item in array

@E.T.S ,

If you require to process Transaction wise one by One then I believe the current approach is proper, as a RE-Framework is being used where the Get Transaction Item is retrieving the Queue item data one by one.

We would need to know/maybe analyse the data yourself on what data is to be present inside the Process workflow for performing the next operations.

Try Debugging with Breakpoints on what values are present in the QueueItem variable. Is that sufficient enough for performing the operations inside the Process workflow ? Or Do you have to have all Items that are uploaded to the Queue ?

Queue Item to an Array is not possible in the way that you are referring to, but you could check the Get Queue Items activity as it retrieves an Array of Queue Items.

We would also mention a Proper Design first needs to be analysed and then use the required Framework.

There is only one transaction item like this:
item: {“a”, “b”, “c”}

So I would need it to pull the data from the queue into my performer and manipulate the data i.e. separate each item which is ultimately what I want to achieve

One of the ways I thought this would be possible is to read the transaction item and input it into a data table but the issue is I cannot read the queue item with the specific content code:

I don’t need the specific content as there is only one transaction item - is there a way of reading the transaction item

@E.T.S

Queue supports only basic types…ao when adding to queue may be add the array with comma separation or so and when you retrieve again use a split and convert to array

Join - String.Join(",",arr_String)

Split - In_TransactionItem.SpecificContent("Keyname").ToString.Split({","},Stringsplitoptions.None)

And if your strSerializeFollowUpRisks is of string variable and not the key actually then remove the inverted comma around it

Hope this helps

Cheers

The transaction item has comma separation

strSerializeFollowUpRisks isn’t a string type it’s the name of the transaction item in the queue

When I used this:
argIn_TransactionItem.specificContent(“strSerializeFollowUpRisks”).ToString.Split({“,”},Stringsplitoptions.None)

I got this error:

If I can fix reading the value of the transaction item then I will be able to configure build a datatable and get what I need

I’m not understanding why I am getting this error for the below:

My transaction item:
image

Thanks!

@E.T.S

  1. I believe your test is of string type …it should be string[] (String array)
  1. For this can you try to print the keys first to check what is wrong using log message argIn_TransactionItem.SpecificContent.Keys

Hope this helps

cheers

Realised the issue - the process was pulling old queue items, but the specific content code got what I needed, thanks everyone!

1 Like

@E.T.S

Glad it resolved…can you please close the topic by marking solution so that others with similar issue can get help

Cheers