I want the only recent data from get Queueitem but after the end of the flow I'm getting data from the past as well

After end of the script a report file is created. It gets the data from the past as well.
I have set the date to today in get Queueitem. Once the status is logged it shouldnt rewrite again.

In this case my recent is the last one. But somehow UiPath logs the data from the beginning of the day

What should I do?

This is my complete flow

Thanks

hi @BHUSHAN_NAGAONKAR1 ,

In your get queue item activity, in the From property pass a datetime variable of the time after which you want the queue items from. Currently you have passed Today so its fetching all queue items for the day.

What should be the function?
DateTime.Now?
This is a library. I invoke this in close application im Reframework

System.DateTime.Now.AddHours(-1)

will fetch records starting from past 1 hour.

So based on your requirement subtract the hours. If you only want records for the current process run then you can initialize a datetime variable at the start of the process and pass the variable in the From field of the activity.

Rather than hours can I get the values just for the recent event. If the script is ran multiple it will rewrite the values again with in one hour.

Thanks

Didn’t get you. Do you mean only fetch queue items which were processed/updated in the current run.
The look at my previous reply.

If you only want records for the current process run then you can initialize a datetime variable at the start of the process and pass the variable in the From field of the activity.

If you meant something else please elaborate

Ok I will try and update you. I just need to use datetime variable right
I was asking if we pass hours (-1). If there are multiple it will get all the run in past one hour. I just needed for current run.

So i need to use Date Time right?

Yes for current run initialize a datetime variable in an assign activity at the start of your process

StartTime = System.DateTime.Now

and then pass this variable to the get queue items activity which is at the end of your process

1 Like

I will check this and update. Thanks

Thanks it is working

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