Is it possible to create a datatable of Messages type?
I am extracting the message threads from a slack channel using slack activities Get Messages and Get Rerplies. I need to collect some data from each message’s replies before sorting the message threads for the next step of the process.
Is it possible to create a datatable of Message types to store all my collected Messages and corresponding replies? The process is returning an error “Build Data Table: Column requires a valid DataType.” for the Build Data table activity, which is initially being declared as “Message” type (UiPath.Slack.Model.Message).
Irrelevant to the issue above, but I am using the messages’ reply count to add datacolumns to the datatable depending on the highest reply count. That way I can populate it with all message threads.
I suggest you to try to use other DataType, maybe get from UiPath.Slack.Model.Message object only what you need like the text and save it as a String collumn in the datatable. Or use other kind of data structure to do what you want.
I was able to create a column with a datatype of System.Object - and you should be able to store anything in there. You’ll just have to know that it’s object instead of UiPath.Slack.Model.Message and handle that appropriately in your expressions.
Thanks, yes this was plan b. I only really need the .text and .ts (timestamp) elements of the message type variable, so I’ll either creat a datatable for each or collect each messages’/reply’s taxt and ts and store them in a single string formatted DT.