Explore Courses Blog Tutorials Interview Questions
0 votes
in RPA by (12.7k points)

I am reading a queue and using an Action stage to "Get Item Data" from the "Work Queue" business object. The purpose of my process to prepare a report on the status of the queue items. The "Get Item Data" action expects one input, which is the queue item ID. A bunch of output items is spat out such as Key, Status, Completed DateTime, Exception DateTime...etc.

I generated Data Items for all of the output of the "Get Item Data" Action stage. I then created a loop to go over all the queue records, populate the generated data items, and then use the information in the data items to capture the details for my reporting.

The issue that I am having is that when the loop goes to the next item in the queue, it does not entirely reset the data items. For example, if the first record in the queue was in completed status, the "Completed DateTime" data item is populated with that date and time. If the next record in the queue is an exception, it populates the "Exception DateTime" data item, which is good, but it doesn't override the "Complete DateTime" data item with blank. It keeps the date from the previous record.

In my process, I check for "Completed DateTime" and "Exception DateTime" in order to determine the status of the record and update my report. The solution that I thought of is to add a Calculation stage to reset the data items, but can't seem to reset a DateTime data item. It does not like the empty quotes "". Any suggestions would be greatly appreciated!

FYI, one of the output items is called "Status", but it is not populated with any information. Otherwise, this would have been very easy.

1 Answer

0 votes
by (29.5k points)
I have a method in mind that'll work but isn't the most ideal solution in the world.

what you need to do is use the Calculation Stage at the end of the loop, but as you cannot set a DateTime object to 'empty', how about you set them to an odd date? E.g. 03-01-4000 00:00:00.

After you finish your initial loop to populate the report (I assume something similar to Excel), you create another loop over your report and replace all the odd dates to empty cells. Alternatively, you write a macro to get rid of them all at once without the need to loop.

hope this helps

Browse Categories