Some thoughts on programming stuff

Month: June 2020

Batch insert items in SharePoint with Power Automate

This blog post will cover how to batch insert items in SharePoint with Power Automate. Our Flow will explore the SharePoint REST API calling the Batch endpoint and inserting 1000 items per time. For every Batch request made, you can add multiple Changesets up to 1000 Changeset requests. Likewise, for each Changeset, you can only add up to 1000 requests. That’s why our example will try to insert 1000 items per request just to make things simple.

In the tests I have made, using this Flow we were able to insert 5000 items in 16 minutes. All of my tests were executed in a Free Microsoft Flow account. In the other hand you probably may experience a better performance if you have a licensed account. Consequently, using a licensed account, you will be able to read more than 5000 rows.

In addition to that, it’s important to say that our test is going to read data from an Excel file. Everything will be static like the filename and the table name from the file. But this doesn’t mean that you cannot do the same by passing dynamic values. If you create a flow that runs tied to a file creation event in SharePoint, you will get the data needed to make it dynamic and save your time with this automation.

7 use cases on automating data entry using RPA and document ...
Machine working in favor of humans (Klippa)

First steps on the Flow

In this example I chose to manually trigger a flow, just for it being easy to test. Needless to say tat you can change that for whatever you want.

Manually trigger a flow - Batch insert items in SharePoint with Power Automate
Manually trigger a flow
Continue reading

Batch delete items in SharePoint with Power Automate

This blog post will cover how to batch delete items in SharePoint with Power Automate. Our Flow will explore the SharePoint REST API calling the Batch endpoint and deleting 1000 items per time. For every Batch request made, you can add multiple Changesets up to 1000 Changeset requests. Moreover, for each Changeset, you can only add up to 1000 requests. That’s why our example will try to delete 1000 items per batch request just to make things simple.

In the tests I made, using this example we are able to delete 500 items in 2 minutes, 5.000 items in 12 minutes and 15.000 items in 40 minutes. All of my tests were ran in a Free Microsoft Flow account, so you probably may experience a better performance if you have a licensed account.

How do I recover and restore deleted files? | BT
Delete key (BT)

First steps on the Flow

In this example I chose to manually trigger a flow, just for it being easy to test. Needless to say tat you can change that for whatever you want.

Manually trigger a flow - Batch delete items in SharePoint with Power Automate
Manually trigger a flow
Continue reading

Drop messages in IBM MQ using dotnet core

This blog post will cover how to drop messages in IBM MQ using dotnet core. The post is based on the other awesome post from dotnet cookbook which I recomend you to read! The objective here is to present an overview of the code, how to use the tracing logs for troubleshooting connections and how to add certificates to perform TLS connections, all of these using the library ibm-mq-client available in Nuget.

A queue (Tensator)

The code to drop messages in IBM MQ

The code basically relies on some parameters for hostname, channel, queue manager, queue and port. Also there are some checks based on the name of those parameters to decide if they contain the pattern “.TLS” in the string. But if in your case you always use TLS on your connections, you can just remove that condition and let the SSL_CIPHER_SUITE_PROPERTY and SSL_CIPHER_SPEC_PROPERTY always available:

Using this code you should be able to drop messages, connect to the queues and achieve the result you want!

But if something goes wrong, you can always trace the messages made available by the library.

Continue reading

Jump to current date cell on Open in Google Sheets

If you are like me and usually updates manually a spreadsheet to track your progress in a daily basis related to something like diet or spenditures, you will know that your spreadsheet may become very long. That’s why I created an small script to allow me jump to current date cell on Open in Google Sheets automatically.

The script will run like a macro and after a few moments you have opened the spreadsheet, it will focus the correct cell!

Continue reading

© 2024 wiliammbr's blog

Theme by Anders NorenUp ↑