Parent

Parent

How to Use the Power Fx Parent  Function in Power Apps

What is the Power Fx Parent Function?

The parent function in Power Fx is a formula function that allows users to reference a control or data field from a parent screen or form. This function is very useful when you need to pass data between screens or forms within a Power App.

To use the parent function, you first need to understand the concept of screens and forms in Power Apps. A screen is a page or view within a Power App that displays data or interacts with users. A form is a control that allows users to add or edit data within a Power App.

How to Use the Power Fx Parent Function

To use the parent function in Power Fx, follow these steps:

1. Open the Power App you want to add the parent function to.

2. Select the screen or form where you want to use the parent function.

3. Click on the control or data field that you want to reference from the parent screen or form.

4. In the control properties panel, scroll down to the “Advanced” section.

5. In the “Advanced” section, click on the “OnSelect” option.

6. In the formula bar, enter the following formula: `Parent.[Control Name]`

Replace `[Control Name]` with the name of the control or data field that you want to reference from the parent screen or form.

7. Save and publish your Power App.

Example of Using the Power Fx Parent Function

Let’s say you have two screens in your Power App: “Screen1” and “Screen2”. On “Screen1”, you have a text input control called “TextInput1”. On “Screen2”, you have a label control called “Label1”. You want to pass the value entered in “TextInput1” to “Label1” when the user navigates to “Screen2”.

To do this, follow these steps:

1. Open “Screen2” in edit mode.

2. Click on “Label1”.

3. In the control properties panel, scroll down to the “Advanced” section.

4. Click on the “OnVisible” option.

5. In the formula bar, enter the following formula: `Parent.Screen1.TextInput1.Text`

This formula will reference the “TextInput1” control on “Screen1” and pass its value to “Label1” on “Screen2”.

6. Save and publish your Power App.

The Power Fx parent function is a powerful tool for passing data between screens or forms within a Power App. By following the steps outlined in this article, you can easily use the parent function in your own Power Apps to create complex calculations and automation. With the help of the parent function, you can create more efficient and user-friendly applications that meet the needs of your business.

Power Apps Training Courses by G Com Solutions (0800 998 9248)