Manage Items Centrally by Using Properties

You might feel the need to manage the items on the screen from a center while developing a Power Apps application. When the properties of a certain item change, the features like the color, size, place can be managed for the related items on all screens.

There are two existing methods for central management.

  1. Method 1: Managing by using the item properties on the formula bar.
    Since the actions are executed through formulas, it is the most stable method. You can use all the features in the Properties window like color, position and size. This method is one of the first actions you need to execute while you’re developing an app. It can be hard to execute this action on an existing app, but it will help to do it.
  2. Method 2: Components (Experimental)
    Since this method is experimental, it doesn’t work in a stable way. Compared to the formula method, it is way easier to use.

Manage Items Centrally with Formulas

You might have heard in a lot of places that Power Apps works with the Excel logic and the formula structure is similar.

We write =A1+A2  into the formula bar in Excel to sum up two cells. In this action, we use the cell names directly in the formula and thus call and sum up the value in the cell directly. This way, whenever the value in the cell changes; the sum value gets recalculated.

When we want to execute the same action on Power Apps, we can use items like Text Box and Label. For example, we can calculate and display the sum of values entered in 2 Textboxes in a Label.

The Label item on the screen is named as Toplam (Sum), and the TextBoxes are named as Sayı1 (Number1) and Sayı2 (Number2).
We can display the sum value by writing the =number1. Text + Number2.Text into the Text property of Sum.

It means: Get the Text data of the Number1 item   +   Get the Text data of the Number2 item.

Right with the same logic of this examples, the item properties can be used in order for the items to imitate each other.
Actually, we are going to execute the action by assigning the properties of an item to another item.

Action Steps

Add two Label items to the screen.

Label1–> will stay as Label1
Label1–> will be renamed as Item_dependentto_Label1

Label1
Its features like fill color, text and border color are changed and thus, it is customized.

Item_dependentto_Label1

The properties are changed with the formulas below for this Label.

Fill –>  Label1.Fill  (Gets the fill color of Label1)
BorderColor–>  Label1.BorderColor  (Gets the border color of Label1)
Text–>  Label1.Text  (Gets the text of Label1)
Width–>  Label1.Width  (Gets the width of Label1)
Height–>  Label1.Height  (Gets the height of Label1)

Like it was written in the formula, this item is now dependent to Label 1. When the features of Label1 change, the dependent item will change.
You can distribute the dependent item to screens with copy-paste.

Manage Items Centrally by Using Components

You might feel the need to manage the items on the screen from a center while developing a Power Apps application. When the properties of a certain item change, the features like the color, size, place can be managed for the related items on all screens.

There are two existing methods for central management.

  1. Method 1: Managing by using the item properties on the formula bar.
    Since the actions are executed through formulas, it is the most stable method.
  2. Method 2: Components (Experimental)
    Since this method is experimental, it doesn’t work in a stable way. Compared to the formula method, it is way easier to use.
    The items on the screen can be standardized with components. 
    In this article, we will be analyzing how to manage items centrally with Components.

Using Components

To use the component feature: go File–> Settings –> Advanced Settings–> Write Components into the search bar on right to find the feature and then activate it.

Managing Items Centrally with Components

Once the components are activated, go back to the application screen. Two menus as Screens/Components are displayed.

We go to the components screen to design the template we want to use. The components are designed as a normal screen. When you use multiple components, naming the components will be important.

After the component is complete go to Screens and when you are in the page where the component will be added; locate the page by choosing Insert–>Custom–>Component1.


The component that has been created is added to the screen as one single item. For this reason, a component can be thought as a background image.
In this sense, while designing the symbol or items a component contains or after it is added to the screen, it doesn’t accept general formulas (like the functions of main page, next, save buttons).

Using Formulas in Components

We need to execute an extra action to give commands to the items on a component. For example, when we want to write the Navigate function into the Previous button on the image; we have to add a Label to the screen. You can complete process by writing the Navigate function into the OnSelect property of this Label.

Scan Codes Easily with a Mobile Device

It is possible to scan a barcode, serial number, Imei number, QR Code and many more codes on a SINGLE screen! You can scan all code types with the advanced code scanning function of Power Apps and integrate them to your system.

We can talk about a lot of benefits of transitioning to the code system with a lot of scenarios like counting, tracking and assigning inventories; library management, registering stocks and products, executing actions quickly in store controls.

You can scan codes on your cellphone camera with the mini app you’ll develop using Power Apps.

Scanning Codes

Thanks to this feature, you don’t need to use any extra scan devices. Go Add–> Media–> Barcode scanner on your mobile phone in order to use the code scanning feature. This action only adds a button to your page, the screen that allows you to scan will not be displayed to you in the app.

You can write the Navigate formula into the OnScan property of the scan button (BarcodeScanner1) and direct to the second screen. This way, when a code is scanned you are directed to the second page.

A Label (barcodeData) is used to show the scanned code, Add button (Button1) to enter data and Gallery to display the data on the second screen.

BarcodeScanner1.Value is written into the Text property Label1.

The function that saves data to the cache is written into the OnSelect property of Button1.
Collect( ScannedBarcodes; {barcode: barcodeData.Text} )

ScannedBarcodes is written into the Items property of Gallery1.

 

You can take a look at this link for the Barcode Scan feature.

Create Dependent Dropdown Lists

You can create dependent dropdown lists on your mobile apps. For example, Countries can be displayed when Continent is selected, regions when Country is selected and cities when regions are selected.

You can create a manual list or get one from a database while creating a Dropdown List.

It is necessary to enter data as [“text1” ; “text2” ; “text3” ] within brackets in order to add data manually to the dropdown lists. For example, If the data is on an Excel in OneDrive, the data field should be formatted as Table. The shortcut to create a table in Excel is CTRL+SHIFT+L.

When you turn your data into a table, it is named as Table1. And the data is used with this table name in Power Apps. When there are multiple tables, it is important to name the Excel Table before going into Power Apps to prevent name confusion like Table1, Table5, Table3.

Dropdown Lists

We will execute the action with two dropdown lists.

Dropdown1 named as–> dd_region.
Dropdown2 named as–> dd_city.

The cities in dd_city will change depending on the selected region on dd_region.

Get Data from the Table

Cities are written cross the region names. Since there are multiple cities in a region, the regions are repeated. You need to use the Distinct formula for the region names to be displayed singularly.

You can write Distinct(RegionTable;Region) into the items property of dd_region.

You can use the menu on the right directly for the dd_city item.

The name of the Items table is selected as RegionTable.
The Value column’s name is selected as the city column.

The upper control ins chosen as dd_region, the matched field as RegionTable, Region Column for the dependent control.
This way, the formula below is automatically written.
Filter(RegionTable; Region= dd_region.Selected.Result) to the items property of dd_il

Distinct is not necessary in cases of the region names are not repeated and the formula should be revised in this context.
Filter(RegionTable;dd_region.Selected.Region=Region)

The value that formula returns will be displayed on the formula bar.


Using Manual Lists

Since it will be hard to type long data on by one and the formula get longer, it makes sense to use the manual lists for short data.

You can write [“Marmara Region”; “Ege Region”;”Karadeniz Region”] into the items property of dd_region.

You can write:
If(
dd_region.Selected.Value=”Marmara Region”; [ “İstanbul”;”Kocaeli”];
dd_region.Selected.Value=”Ege Region”; [“İzmir”;”Çanakkale”];
dd_region.Selected.Value=”Karadeniz Region”;[“Zonguldak”;”Sinop”;”Trabzon”]
)

to the items property of dd_il. You can use different methods fore dropdown lists just like for other actions. For example, you can prefer to write Switch() instead of IF ().

You can take a look at this link for the details about Dropdown Lists.

Using the Table Format on Power Platform

When you get data from Excel to products like Power Apps and Power BI, you need to use this data in the table format. If there is a table in the Excel from which you’ll get the data,  it can be directly transferred to the system.
Even if the data is in an Excel on OneDrive, the situation is still the same. Data field should be formatted as Table.

Power Automate (MS Flow) – Excel Connection (OneDrive)

Power Apps – Excel Connection (OneDrive)

Using the Table Format

You can turn the existing data into a table by choosing Table in the Insert tab or in an Excel worksheet or you can start by inserting a new table. (The shortcut for creating a table in Excel is CTRL+L)


When you turn the data into a Table, it will be named as Table1. Every table you add to existing Excel will be named Table2, Table3 etc. When there are multiple tables, names are going to be confusing. In order not to be confused, you should rename all the tables in a meaningful way in Excel.

Defining Names

All table names in Power Apps data sources are displayed the way below and the same names are used in formulas. For this reason, the tables should be named before being connected to the platforms.

Excel Name Manager

View the existing tables from Formulas –>Name Manager. Click Edit–> Name and define and give a new name. The named table can be used in any platform that you want.

You can take a look at the details of creating and renaming a table.

You can click here to access the other Power Apps articles.

Send the File added to OneDrive in Mail Attachment

Hello! In this article, we will be sending the file added to OneDrive in mail attachments. Of course, as you might have guessed, we will be using Power Automate.

Before we start the flow, there are some files we need to create on OneDrive.

OneDrive for Business

Go to OneDrive–> New–>Folder and create a folder named Mail Folder.

Create another folder named Attachments in the Mail Folder. We will add the mail attachments into this folder.

OneDrıve'a Eklenen Dosyayı oluşturma

Now we can move on to Power Automate.

Power Automate

Go My flows –>New–> Automated- from blank and create the process with a blank flow.

Power Automate

You don’t have to choose anything in the window that opens up. You can skip to the flow window directly with the Skip button.

Atla (Skip) butonu

Flow Actions

Our flow will run when the file added to OneDrive is added. So, we start by choosing OneDrive for Business –> When a file is created (properties only).
When a file is created (properties only)
contains details like the name and root of the file that has been added to Drive.

Akış İşlemleri

After adding this item, we will indicate the file into which attachments will be uploaded.

Choose Root–>Mail Folder–> Attachments.

Dosya yolu seçim alanı

In the new step, we add the Get File Content item to use the file added to the folder in a tangible way.

We need to give the unique identifier info to this item to detect the file that has been added to the folder.

Click Add dynamic content and choose List of Files Id.

Dinamik içerik ekle

In the next step, add the Send an Email(V2) item.

In this item:

To: The mail address of the person you’ll send the mail to.

Subject: Mail’s subject (optional)

Body: Mail content (optional)

Open mail sending details with Show advanced options that is located on left bottom corner to add the mails to the flow.

Add File Attachments to the Mail

Choose Attachments name: List of Files Name.

File Content that has been gotten with the Attachments Content: Get File Content object is added to this field.

Maıle Dosya Eklerini Ekleyin

And the flow is complete.

You can name the flow on top left corners and then save it by clicking the save button on top right corner.

Now when you add any file into the Attachments folder, it will be sent as an e-mail with attachment automatically.

You can click here for the other Power Apps articles.

Send E-Mails with Attachments Weekly with Power Automate

Do you send the latest version of the excel file on which you work with your team to your manager? Spare 10 minutes of your time now and create your own flow with Power Automate and send your e-mails with Excel attachments to your manager automatically every week at any hour your want.

When you want to create a flow, you start off with an action (trigger). The flow we will create needs to be run automatically every week, so we will start the flow with the Recurrence(Schedule) trigger.
*If you want, you can do monthly, daily, hourly controls.

In the next step, we need to indicate the location of the file that we want to send as an attachment to the flow. Thus, we need to add the related connector (for example: OneDrive) to the action flow. This way, the file we want to send with mail attachment will be accessed.

Actions are very short and simple. You can follow the steps below and create the flow quickly.

Power Automate Steps

  • Recurrence(Schedule) -> For weekly control
  • OneDrive(Get File Content)->
  • (List Files in Folder)-> To get the data there
  • To be able to choose the one we want among the files we have called Add Condition- > (We get the control of the file we want to call by writing [Name without Extension=ExcelName] through Name without Extension.
  • This action brings the apply to each command to the screen automatically ->
    Power Automate Uygulama Adımları 
  • If the condition is met, to send the mail: we need to add the content coming from OneDrive to the attachments content field in the Advanced Options in Outlook (Send an e-mail). Also, we need to fill in the attachments name field.
    mail atma işlemi

You can send the latest version of your Excel file in Outlook mail attachment with Recurrence(Schedule) control every week by following the steps above.

Send Mass E-mails with Power Automate

You can send the mails with custom subject and content in which you address people specially in cases like congratulating, events, special day celebrations. This is something that especially the HR needs.

This way, you don’t deal with sending mails one by one. You only need to indicate the mail list and details.

Create a Table

Open en Excel in OneDrive. Add a Table from the Insert tab.

Write Mail, Name Surname and mail details into the columns of this table like below.

Each row of this table will be sent as separate e-mails by the flow.

Flow Process with Power Automate

Start a new blank flow.

After the data in the table is filled, flow will be run by being triggered individually. For this reason, start the flow with Manually trigger a flow.

In the next step, add Excel for Business (List rows present in a table) to be able to add the data in the Excel table. Add the table you’ve just created into this item.

In the next step, add Outlook (Send an e-mail).

In this step, the columns of the Excel table is added to the related fields. With you choosing the Excel fields (mail, name, etc.) the Apply to each item will be added to the flow automatically. An event will be created for each row in the Excel file thanks to the Apply to each item.

 

After filling the related fields, name the flow on top left corner. For example: Send Mails to a Certain List. You can save and close the flow on top right corner.

You can verify the data in the Excel table and run the flow.

You can take a look at here for the Power Automate Outlook Connector.