Welcome to new things

[Technical] [Electronic work] [Gadget] [Game] memo writing

Microsoft (Office365) PowerApps Usage Notes

Introduction.

I used to touch Office365 PowerApps.

PowerApps is a rather obscure tool, and I had neglected it, thinking that I would forget how to use it if I didn't write down how to use it.

I haven't touched the application in a while to fix it, and as I thought, I forgot all about it, so this time, I'll make a note of how to use it, focusing on the parts I got stuck on so I don't have to worry about forgetting it again anytime soon.

Because of the large volume, the article is divided into the following three sections, and this article is the first one.

Part 1: Basics

Microsoft (Office365) PowerApps Usage Memo.

Microsoft (Office365) PowerApps Usage Memo (Data Sources and Collections)

No. 3: Other notes

Microsoft (Office365) PowerApps Usage Notes (Other)"


What is Microsoft PowerApps?

A simple UI may be created in Excel by placing a form with buttons, text input, etc.

However, if an Excel file is uploaded to Excel Online, you cannot use that simplified UI because VBA is not available in Excel Online.

Microsoft PowerApps is a tool for creating such a simple UI on the web Office365.

However, PowerApps is not a VBA-likeI can't do the coding.For example, the placement of a data entry form or a button to run Microsoft Flow,Only a very simple UI can be created.

How to create, use, and update

First, the site structure of PowerApps and the process of creating, using, and updating it are not easy to understand, so we will explain step-by-step.

way of making

The [+Create] is created from the [Office365]-[Grid Icon]-[PowerApps].

Here we use [Create a Canvas app from scratch] to create an application from scratch instead of a template.

Microsoft (Office365) PowerApps Usage Notes

The PowerApps application is then created and the editor is launched.

Microsoft (Office365) PowerApps Usage Notes

To save the application, press [FILE] menu and then [Save].

Microsoft (Office365) PowerApps Usage Notes

treatment

The above editor page is labeled "PowerApps" at the top, but it is different from the Office365 PowerApps page to which I first transitioned,Sites dedicated to editors(At first I was confused because I thought it was the same site...) (At first I was confused because I thought it was the same site...)

To run the created application, go to the [app]. menu above [+create]. on the PowerApps page of Office365, which you pressed when you first created the PowerApps.

To open the PowerApps editor from the PowerApps page in Office365, go to the app [edit].

Microsoft (Office365) PowerApps Usage Notes

Since you will be going back and forth between the PowerApps page in Office365 and the PowerApps editor page, it would be best to have both up and running.

Click on the app from the Office365 PowerApps page and the app will run successfully. Microsoft (Office365) PowerApps Usage Notes

Update method

To modify and save the application in the editor, press the [FILE] menu and then [Save] as you did the first time.

Microsoft (Office365) PowerApps Usage Notes

And here is another confusing part. Just saving the file does not reflect it in the application, but you need to press the [Published] button that appears in the [Save] menu.

[44p:plain:alt=Microsoft (Office365) PowerApps Usage Notes]

Then, when you run the application in the same way as before, the changes will be reflected.

Microsoft (Office365) PowerApps Usage Notes

By the way,Only when saving for the first time, the issue is made immediately upon saving.

I think it is reasonable to share the app with other people and have them use it, so I think it is reasonable to publish and have it reflected, but the initial save does not have that, so I was hooked because I did not realize there was such a thing as publish at first....

How to test behavior from the editor

Press the right triangle icon in the upper right corner of the editor to test the operation. Microsoft (Office365) PowerApps Usage Notes

In the test, it is executed suddenly from the screen you are viewing, so if you want to check from the application start, display the first page and press the icon.

configuration

Next, we will look at the basic configuration of PowerApps and the editor screen configuration.

object

PowerApps are composed of a collection of "screens," like "pages" in a website.

Then, buttons and other controls are placed on top of that screen.

In the editor's [TREE VIEW]., all objects such as "screens" and "controls" that exist in the application will be displayed.

  • [TREE VIEW].The "Screen" at the top will be the first screen displayed when the application is launched("Screen1" in the figure)
  • Various control objects will be placed in the screen "Screen1". Microsoft (Office365) PowerApps Usage Notes

The object name here is important because when referring from one object to another, the object name [TREE VIEW]. is used.

property

Each object has a set of "properties" that define its size, color, and event handlers such as OnSelect that are called when the object is clicked.

By setting values to those properties and adding code, you will create an application.And,The only place where code can be written is in properties.

To set the properties of an object in the editor, first select the object you want to set in the editor [TREE VIEW]..

The properties of the selected object are

  • Function Expressions under Menu
  • Properties" tab in the right column
  • Advanced Settings" tab in the right column

and set it up from there.

There are three display areas, just different ways to show them,They are all the same.(It's hard to understand...) (It's hard to understand...)

Microsoft (Office365) PowerApps Usage Notes (With "TextInput1" selected, the properties of "TextInput1" are displayed in three places)

screen shift

To move to another screen, use the Navigate(<destination screen name>, <animation type when moving>) function.

For example, to make the transition to the next screen after pressing a button, do the following

  1. Select button
  2. Navigate(<destination screen name>, None) for [OnSelect] property

Microsoft (Office365) PowerApps Usage Notes

variable

PowerApps includes

  • Global variables that can be used throughout the app
  • Context variable, usable only within a screen

There are two types of variables

  • Global variable values are set using Set({<variable name>:<value>}).
  • Context variable values are set with UpdateContext({<variable name>:<value>}).

No variable declarations,When a value is set, the variable is created dynamically.

How to write functions and notes

  • PowerAppsはThe program cannot be written. Everything is written in functions, and the functions are written in the object's properties.
  • Control statements (IF, Switch) are also functions

For example, to change the destination of a button depending on the value of a variable when the button is pressed, write the following function in the OnSelect of the button.

IF(TestVar=true, Navigate(Screen1, None), Navigate(Screen2, None))

  • Because the characters enclosed in single quotation marks refer to objects,Strings must be written in double quotation marks.
  • Strings are concatenated using "&".

    • Example: "string"&"string"".
    • Or use the Concatenate() character concatenation function.
    • There is an Concat() function, but it is not a string concatenation function.
  • Escape sequences are not allowed in strings." Char() function to write characters directly.

    • Example: Using line breaks: "String"&Char(10)&"String on next line".
  • When two or more functions are described in succession, separate the functions by inserting ";" after the function.

    • Example: Set a variable to move the screen: Set({Flag:true});Navigate().

initialization process

  • The initialization process when the application is launched is described in the OnStart property of the App object
  • The initialization process when each screen is displayed is described in the OnVisible property of each screen object

end processing

If you close the browser while the application is running, the Office365 server does not immediately know that the application is closed.

If you try to distribute a new app in that state, you may get an error if there is still an app open.

In such a case, you can set up a close button, etc., and when the button is pressed, call the Exit() function to explicitly close the application so that Office365 will immediately know that the application has been closed.

Function Reference

PowerApps is a form of coding with functions only.

I have the function reference below,Not classifiedSo, guessing from the nameI will look for it on my own.

https://docs.microsoft.com/ja-jp/powerapps/maker/canvas-apps/formula-reference

This is followed by an explanation of the data sources handled by PowerApps, which is a separate article because of its length.

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com