I have a file with current week date in a folder like CWF03232020 and dispatcher bot applies some formula on this file and completes.
This happens both on Monday and Tuesday. If the bot processed the file on monday, i don’t want the bot to apply formula on that current week file on Tuesday.
I plan to upload the current date in queue along with each transaction data and get the top 1 from the queue to find out if the dispatcher bot uploaded the data for this current week. If so i won’t process the file on tuesday. Can anyone help me to find out this logic from queue?
In general you can use with some predefined filterings
So you have a chance to detect ifithe iteme exists or not and in which status. Depending on your ReferenceID handling you may can use this information as well for quick filtering.
I am uploading current date to queue along with 2 other data. Now i need to check if the date available in queue(Top 1) is current week. I am using queueitems activity by setting the top 1 property and but don’t know how to get the value of the currentdate uploaded to queue.
using the below code to check if the top 1 queue item date falls under current week… i need to pass the inputDate from the first queue item.
Dim dayOfWeek As Integer dayOfWeek= CInt(DateTime.Today.DayOfWeek) Dim startOfWeek As String startOfWeek = DateTime.Today.AddDays(-1*dayOfWeek).ToString(“MM/dd/yyyy”) Dim days As Integer = CInt(DateDiff(DateInterval.Day,CDate(startOfWeek),CDate(inputDate))) If(days>6) Then
output = “Next Week” Else If(days>=0 And days<7) Then
output = “Current Week” Else
output = “Previous Week” End If
Hi @Madhavi
Thank you. Guessed that solution first but client said files must be in the same folder path where they are using it as usual. This is the reason trying to identify the queue date(Top 1) is current week or previous week.
Then create a daily processing report. You enter all the folders that are been processed on current date in it. Next day you compare the folder names across this report. If doesn’t exists, process it. otherwise, don’t process it.