Sort by date time not working

yes, but is not showing on my screenshot, need to hit that down arrow to see more about the datatable.

@Jason_Yao this is why it isn’t working. I’m not sure exactly why it’s not recognizing it isn’t a datetime? For some reason uipath is bringing it into the datatable as an object variable instead. So you will have to do the conversion to datetime just like you mentioned earlier

thanks you guys rocks!
you two seems pretty familiar with datatables, can bring in a off-topic?

answer if you like, if not, you still rocks! lol

@jason_Yao I’m not sure i understand why you need to use the datatable at all? It seems like you could just use a single for each statement to iterate through the mailmessages. It will get the message, read the attachment, do the processing, send a reply, then move to the next mailmessage until all have been dealt with.

I don’t believe you can store mailmessage objects in a datatable. It also seems like that is the only item in the datatable? If it’s the only item in the datatable, you should utilize a list, array, ienumerable, or any other collection instead.

1 Like

thanks for look into this dave! so yea, essentially, it’s looping thru the mails, collect the information from the those mail, and then send those data for processing on another server. as that server make progress the bot will update the status. eventually that status column will get updated to “complete”, and i need a way for the bot to reply that same email when it’s completed… and i dont really have a reliable way to get that specific mail, other than looping the emails again and find the exact match on subject. that could be a problem because there could be identical mail subjects out there. so i thought this whole thing would be a lot easier if i could store email objects in the datatable, and after a while when some of the email request are completed, i could just filter “complete” status and then send reply by looping thru that datatable…

Is it possible to iterate through the emails one at a time? Or is the processing on another server going to take too long? If you can wait, I would do as i mentioned before where everything is simply done in one for each loop.

Otherwise, you can use a dictionary to story the status of each mailmessage. The key would be the mailmessage, and the value would be the string (success/failure). I still don’t really see the point of storing the mailmessage in a list or datatable though. I just am having trouble understanding the process flow

yeah, the process on another server does take a while, so it wouldn’t make sense to loop one at a time. bcorrea, did point out unique message-id do exist, so i’m going to try to use that to identify email more reliably. so wish me luck :joy:

1 Like

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