Match

How to Use the Power Fx Match  Function in Power Apps

What is the Power Fx Match Function?

The Power Fx Match function is a powerful tool that allows users to find a specific value in an array. The function takes two arguments, the value to search for and the array to search in. If the function finds the value in the array, it returns the position of the value in the array.

Syntax: Match(value, array)

How to Use the Power Fx Match Function in Power Apps

Using the Power Fx Match function in Power Apps is easy. Follow these steps:

1. Open the Power Apps Studio and create a new app.

2. Add a new screen to the app.

3. Add a new gallery control to the screen.

4. Add a new data source to the app.

5. Add some sample data to the data source.

6. Set the gallery control’s Items property to the data source.

7. Add a text input control to the screen.

8. Set the text input control’s Default property to “Enter a search term”.

9. Add a button control to the screen.

10. Set the button control’s OnSelect property to the following formula:

ClearCollect(SearchResults, Filter(DataSource, Match(TextInput1.Text, ArrayToSearch)))

11. Run the app and enter a search term into the text input control.

12. Click the button control to search for the term.

When you click the button control, the app uses the Power Fx Match function to search for the term in the array. If the function finds the term, it returns the position of the term in the array. The Filter function then filters the data source based on the position of the term in the array, and the results are displayed in the gallery control.

The Power Fx Match function is a powerful tool that allows users to search for a specific value in an array. Using this function in Power Apps is easy and can help users create custom business solutions. By following the steps outlined in this article, you can learn how to use the Power Fx Match function in your own Power Apps projects.

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