Insert Snippet - creating your own Code Snippets

Today I’ve learned that there is actually a possibility to use code snippets in UiPath Studio with the SHIFT+CTRL+J keyboard shortcut while in the Expression Editor window:

However it seems that there is no possibility to add your own code snippets. That’s unfortunate as the default snippets are not that useful.

Most of the IDE’s I’ve used had an option to add your own code snippets, I think UiPath developers would love to have such an option.

1 Like

Hey @MarekBruna

You can add your own snippets as below,

  1. Create your snippet .xaml files using UiPath Studio

  2. Save it in some folder which will mapped in next step to the Snippet panel

  3. Click on the Add Folder in the Snippet panel

nmnithinkrishna_UiPath_Snippets

  1. Then just choose your folder which will show all your snippets as required

Hope this helps.

Thanks
#nK

1 Like

Xaml snippets are a different kind of snippets, in this thread I’m mentioning the code snippets which are a shortcut to input chunks of VB.Net code.

You are right, these are two different things. We are looking to address this but please let me know what snippets you have in mind? What actions would you like to add if this capability would be available?

I would like to create my own code snippets like:

  • Config(“”).ToString

  • Datetime.ParseExact(“13.12.2021”,“dd.MM.yyyy”, System.Globalization.CultureInfo.InvariantCulture)

  • TransactionItem.SpecificContent(“”).ToString

  • Config(Config(“”).ToString.Split({“, “,”,”},StringSplitOptions.None)

You get the idea.

5 Likes

I would love to see that option as well :slight_smile:

Here’s one I use all the time that should be in a snippet available to everyone:

Reset “In Progress” queue items to “New” state. I do this by postponing the queue items.

Hi @MarekBruna

Guess who arrived in this tread of yours? :slight_smile:

Following up on our conversation on LinkedIn Christian Prior-Mamulyan on LinkedIn: #productivity #lowcode #uipath #studio

Indeed it seems that a “macro keyboard” / “programmable mouse” is a good companion for use with UiPath Studio

2 Likes