#Flow – Using configuration information from an App using #OneDrive, #Excel, Microsoft Flow and HTTP Requests

 

Hi!

It is no news that Developers and Business Users speak different languages. This is why, sometimes when I ask a business User to update a configuration file, it usually does not ends well. It happened to me when sharing [.json], [.config], or [.xml] files,
these users do not know which tool to use to edit the values, and also happens that a plain text format, is often not intuitive for them.

That’s why a while ago, I took a different approach: I decided to adapt myself to their tools and ways to work. In a nutshell the working model with these files is as follows

 

  • Business Users: Microsoft Excel
  • Developers: Json

And as we are in a time where [Serverless] is the premise, I challenged myself to see if I could do it without writing a single line of code. To do this, use Microsoft Flow as the base integrating information store in OneDrive with Excel files and interacting with the flow using HTTP requests.

The first thing was to create a spreadsheet with information to share, in this case a list of users, email accounts and twitter.

I1

The, I saved the file in OneDrive and I grant access to the file to my Business Users. They can happily edit the file now.

I2

And then I created a Flow to access to this configuration file but in a developer mode. The Flow is using an HTTP Request as the trigger, then it reads the information from the Excel file and it closes with an standard HTTP Response including the content of the Excel file in Json format.

I3

There is only one tricky step here, and is when we need to build the Json response. To do this, I use a simple Flow Expression working with the main body of the Excel file.

I4

When we save the Flow, we can access to the public URL where the flow is published. This is the URL we can use in our Apps to access to this information. To test this without a full .Net App, we can use Postman (I wrote about this some time ago). 1 Url copy and 2 clicks later, and we can see the HTTP response with the configuration information in Json..

I5

As soon as Flow uses this Excel file, we will see a new column in the excel file [__PowerAppsId__]. We should not  delete this column. The easy way to explain this is: Flow uses this column as base to check where / when a file was accessed and to see the changes on this.

However we can add more information to the file, and if we want, an extra column with new information, in example:

I6

As soon as the changes are reflected and stored in OneDrive, a new request to our Flow will return a new complete Json response with the new column and the new rows.

I7

As a ZERO CODE solution, this rocks! and it rocks twice if you also gives your users the chance to use Excel as a edition tool for this.

Happy Coding!

Greetings @ Toronto

El Bruno

References

Tools

My posts on Logic Apps

My posts on Flow

 

Advertisements

#Flow – Manejando información de configuración de Apps con #OneDrive, #Excel, Microsoft Flow y peticiones HTTP

 

Hola!

No es ninguna novedad que los developers y los usuarios de negocios hablamos lenguajes diferentes. Es por esto, que en algunas ocasiones pedir a un usuario de negocio que actualice un archivo de configuración puede no ser una buena idea. Me ha sucedido que al compartir archivos [.json], [.config] o [.xml], estos usuarios no saben que herramienta utilizar para editar los valores, y también sucede que un formato de texto plano, suele no ser intuitivo para ellos.

Es por eso que hace un tiempo, tomé un enfoque diferente: decidí adaptarme a sus herramientas. En pocas palabras el modelo de trabajo con estos archivos es el siguiente

  • Business Users: Microsoft Excel
  • Developers: Json

Y como estamos en una época donde [Serverless] es la premisa, me desafié a mí mismo, para ver si podía hacerlo sin tocar una línea de código. Para esto utilice como base Microsoft Flow integrando los servicios de OneDrive, Excel e interactuando con peticiones HTTP.

Lo primero fue crear una hoja de cálculo con información a compartir, en este caso un listado de usuarios, cuentas de email y twitter.

I1

Luego almacene el archivo de Excel en OneDrive y compartir acceso con el usuario de Negocio que la editara.

I2

El Flow para consultar la información, se dispara con una petición HTTP Request, luego se lee la información de Excel desde OneDrive y se retorna la misma en una HTTP Response.

I3

El único paso donde se requiere una configuración especial es en la creación del Response, ya que utilizo una Expression del tipo String para crear el response con la información completa de las filas de Excel.

I4

Pues bien, al guardar el Flow, el mismo crea la Url donde podemos invocar al mismo. Como explique en un post anterior, podemos utilizar Postman para probar este tipo de Flows, en este caso un simple HTTP POST Request y ya tenemos nuestra información en formato Json.

I5

A partir de ahora, en nuestra hoja Excel ahora veremos una nueva columna llamada [__PowerAppsId__] que es la que utiliza Flow para tener un Track de los accesos y el trabajo con esta hoja de cálculo. Es importante explicar a nuestros usuarios que esta columna no debe ser modificada. Si por ejemplo agregamos una nueva columna y más información al archivo Excel podremos ver algo similar a la siguiente imagen.

I6

Si realizamos una nueva petición, podremos ver que el Response incluye los nuevos campos y los nuevos registros.

I7

Pues bien, como solución ZERO CODE para compartir y editar información de con usuarios de negocios, me parece que esto es suficiente.

Happy Coding!

Saludos @ Toronto

El Bruno

References

Tools

My posts on Logic Apps

My posts on Flow

 

#Hololens – Now you can work with Visual Studio tools for #Unity3D and #VS2017

Hello!

Every couple of months, I’ve had to reinstall my development environment from scratch. This time was not a software problem, this one was raised by hardware issue: my 2nd disc died (and I lost some of my not backup / sync information). As if it were a coincidence, I’ve taken advantage of an offer of Black Friday, Pink Saturday or something like that, and I have bought a 2 TB disk quite interesting (link). This leaves me with a

So let’s put a smile and see the bright side on this. I take advantage of an offer during Black Friday, Pink Saturday or something like that. I have bought a 2 TB 2.5” internal disk with some very amazing features. So now I have a happy  development environment again:

  • 500GB SSD main drive
  • 2 TB as secondary drive

clipboard01

Now, because I started from zero (again) I decided to try to work purely and exclusively with Visual Studio 2017 RC. One of the first things I’ve noticed is Visual Studio Tools for Unity3D were available only for Visual Studio 2015. This meant a serious impediment, VSTU are part of the development of Hololens VS + Unity.

Fortunately, the latest version published today in Visual Studio Tools for Unity, supports Visual Studio 2017 in Beta (3.0) mode.

clipboard03

It won’t work smooth from scratch, you need to perform some additional steps so everything works fine, for example:

  • In Unity, access the menu “Edit / Preferences”
  • Select [External Tools / External Script Editor]
  • In the combo choices we see MonoDevelop, Visual Studio 2015 and Browse.
  • Select Browse and select the path of the executable for Visual Studio 2017 [“%\Program Files\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe”]

At this time we will see VS2017 RC as the selected option and we can start to work with this IDE

clipboard05

Here we see the instance of Visual Studio 2017, in mode debugging from which we can attacharnos at one instance of Unity and debug against the same.

clipboard07

Now if we can forget about Visual Studio 2015 and follow created apps with Unity3D and Visual Studio 2107 Hololens RC!

Greetings @ Toronto

El Bruno

References