Monday, May 20, 2024

Persistent Array: Storing and Retrieving an Array using JSON

Sometimes it makes sense to store and retrieve array data directly, without writing it to a database (or Sharepoint list). This is sometimes called "Block Storage". This option is particularly useful, if you are limited to Sharepoint lists due to a lack of premium licensing. Sharepoint lists are quite slow to write or read, especially if they are large...

When is this a good option?

This can be a good option, if any of the following situations apply:
  • your array is large (e.g. larger than 1000 indices)
  • access speed to your persistent array data is crucial (Sharepoint list too slow!)

How to build the flows

Storage

Convert the array to a string, then to a json format, then store it to OneDrive.

Retrieval

Get the file content, then use the expression 

json(base64ToString(body('Get_file_content')?['$content']))

to convert it back to a format that can be used to intialize your array.



No comments:

Post a Comment

Insanely fast synchronization from a Dataverse table to a SharePoint List

Don’t be fooled: this challenge is deceptively hard — at least if you want to make it fast, efficient, and robust .  Feature specs Your sour...