How to extract the data value from a UiPath QueueItem in Studio? - uipath

I have added Itens to my UiPath queue but I can’t extract the data when I pull from the queue.
I can loop through the QueueItems and even set the transaction to SUCCESS but I can’t figure out how to get the data in the QueueItem?

I think the call you are looking for is this:
QueueItem.SpecificContent("email").ToString
That assumes they key you are looking for in the UiPath Queue is named 'email.'
Read UiPath QueueItem Example
Here's a fairly descriptive image that shows the item on the queue, along with all of its name-value pairs, along with the code used in a UiPath Studio project. The output of running this UiPath Robot is in the lower left hand corner, so you can see how all of the pieces tie together.

Related

Power Automate Get Planner Task Assignee Names

I'm working on a Power Automate flow where the flow is supposed to connect to Planner, get the tasks which are due tomorrow and send a message to an MS Teams Channel.
I got the entire flow working except of one thing - getting the names of the person(s) whom the task is assigned.
Here's my current flow:
Getting the list of Tasks from Planner,
Filter those which have a Due Date set,
Filter the ones which have the Due Date tomorrow,
Get the Name of the Task Creator using Get User Profile,
Send the data into an MS Teams Channel.
This all works perfectly fine. However I also need to get the names of the Assigned users. I understand that they come as an array. And when I try to add it to the same Get User Profile it's getting wrapped into an unnecessary "Apply to Each" which breaks everything.
Does anyone have a clue how this can be solved? Basically I need only 1 Assignee as we are not going to assign the same task to more than 1 person.
Any help would be much appreciated!
In order to avoid the loop (which is also a valid approach, long story) then you can use an expression to get the first (in case there are multiple) assigned user.
This is an example where you don't need to loop ...
... you can see I've initialised a (string) variable at the top which will hold the user ID GUID.
... then further down in the Set Assigned To operation, this is the expression I use ...
item()?['_assignments'][0]['userid']
That gets the first user and then the associated userid property. You can then pass that into the Get user profile (V2) task ...
Obviously, you need to adapt that to your flow but I hope that makes sense.

How do I use compose outputs for a Create Event flow?

Beginner Level User
I am trying to create a flow that triggers when an item is created in a SharePoint list. When the conditions in my flow are met I want to look for available meeting times for the group and then book the first available with 100% confidence of all attending. I figured out how to find the times and use the compose action. The issue is that I have set the "max candidate" to 1 thinking that would only return one option for the output. When I add the "output" to the create event action I get an error. I am so new to this I don't really know what is wrong. Below is a screenshot of the flow and the error. I would appreciate any tips or advice that can help me figure out where I am going wrong.

Exchange Server. Move Item operation. How to map new items to the moved ones?

In my mail app I'm moving messages between folders by using MoveItem operation. When you move messages their ids are changed. In the response I'm receiving the new message ids. But the old ones are missing. And this is a big problem.
I have no idea how to map a new message id to an old one and can't update messages in my database with the new ids. Seems like I don't understand something simple. What's the point of returning new ids if you have no idea what message each one belongs to?
Am I supposed to rely on the order of response messages? If so can you please give me a link to the corresponding piece of EWS documentation?
Or am I supposed to perform synchronization of mailboxes every time I move more than one message?
When you used MoveItems you would have passed in an array of ItemId's and what you get back as a result is an Array of objects.
The order of the items in the Response collection matches the order in your request so element 1 of the response represents the results of the element 1 request. So you can just map them this way.
However your response logic should be more complex to deal with issues where half of your request being executed okay while x% failed because of throttling etc (so check the response status of each request) or getting a 501 mid move where you could get into an unknown state.

How to feed Slack archive into GSA?

I am wondering how can I use Slack API to feed message history into GSA (Google Search Appliance) and having this kept up to date.
Did anyone wrote a script for this?
I don't have a readymade script, but it should be possible as you've imagined; IMO (without being familiar with the slack api, but with some knowledge of the slack archive sizes, i.e., >500K messages), I think the main challenge would be to identify and extract only the pieces of information that are important to you from the slack archive (which can easily get you to run out of your GSA document index license limit if you chose your GSA feed record elements too discretely - e.g., imagine if every message were a separate feed record).
In other words, you need to identify the discrete feed records keeping them as atomically large as possible in order to keep the document license usage down to a minimum, while keeping them discrete enough to yield accurate results.
Once that's done, or if your GSA index license limit is not a problem, one possible solution is to create an incremental/full feed by reading updates from the slack archive using its API, and then compiling the new records found, into the GSA feed format (with information that you want to be able to search-on/omit contained within the tags as appropriate, and info that you need to present in the results, contained in html meta tags), and push those new records in to the GSA.
Another solution, if you'd be able to host a few web application pages that you can have the GSA crawl, will even allow you to keep its index up to date with a continuous crawl. For this you'd need at least one "jump page" which would just be a list of links each populated with query string parameters, to be passed to your detail record page, which would serve to identify a set of various slack message archive element IDs, that you've determined as needing to be indexed as a discrete record. You'd then need to set your "jump page" URL to be crawled by the GSA, and also develop your XSLT or other search results consumer service to be able to read/render the returned results with info contained in meta tags. Note: when the consumer service makes the search call to GSA, it'll need to pass in a "&getfields=*" query string parameter to get the GSA to return all the info contained in the meta tags.
I hope that my wording is not too esoteric and helps you in some way in designing your solution.

VieModel collection not saved during State Save/Tombstone

If I lock my phone while running my application and unlock it say after 30 minutes or 60 minutes, my screen appears blank. All my data (its a huge list compare it to a user's twitter feed) which was in an Observable collection in my ViewModel has disappeared. When I refresh I get NullReferenceException. Note that I am not handling any state save while locking and unlocking the phone. Is that the reason for the loss of my data? How can I handle it? Since there is a limit on the state data which can be saved of 4Mb Max, will it affect the functioning of my application even if I do implement it?
[Update]
I have tried the following things:
1) http://www.scottlogic.co.uk/blog/colin/2011/05/a-simple-windows-phone-7-mvvm-tombstoning-example/
2) http://www.scottlogic.co.uk/blog/colin/2011/10/a-windows-phone-7-1-mango-mvvm-tombstoning-example/
and many more.
The problem which I now face is that my application's viewModel contains an observable collection which I have binded to the UI. This observable collection is a collection of my user-defined class which contains complex data members. One of them is a dictionary. When i try to save my viewModel using XMLSerialization it throws an error as XML serialization doesn't support Dictionary.
I have also tried to write my viewmodel after Data contract serialization onto the IS during App_Deactivated and retrieve it on App_Activated. But my collection is null on resume. On opening the IS file it shows that the collection was not written onto the file. Am I missing some key ingredient in-order to solve this problem?
Note: I need my list. I cannot refresh data.
I'd suggest that this is the wrong approach.
Tombstoning is designed to allow you to save your state, not your data. You want to store the following:
The page you're currently on
The parameters, if any, that were used to get your list of data that you are currently showing
Any selection state (has the user selected a row, etc)
Any page state (is it in edit-mode, etc)
Not all of these things will apply, but it should provide you with an idea of what you should be storing.
This will be a significantly smaller set of data using simple data types rather than large chains of complex objects.
So:
Store the properties/parameters that you use to get your data
When the app resumes go get your data again using the params. If this take a while give the user some form of progress notification. If you can't accurately do this then display activity on the screen until the load finishes so the user knows that something is happening.

Resources