ShowColumns

How to Use the Power Fx ShowColumns  Function in Power Apps

Understanding the ShowColumns Function

The ShowColumns function is used to extract a subset of columns from a table and display them in a specific format. This function takes two arguments – the name of the table and a list of columns to be displayed. The syntax of the ShowColumns function is as follows:


ShowColumns(Table, {Column1, Column2, Column3, …})


Here, Table refers to the name of the table from which the columns are to be extracted, and Column1, Column2, Column3, … refers to the list of columns to be displayed.

Using the ShowColumns Function in Power Apps

The ShowColumns function can be used in Power Apps to display specific columns from a table in a gallery, form, or data table. Here’s how you can use the ShowColumns function in Power Apps:

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

2. Add a data source to your app. You can either create a new data source or connect to an existing one.

3. Add a gallery control to your app and bind it to the data source.

4. Set the Items property of the gallery control to the ShowColumns function. For example, if you want to display the ‘Name’ and ‘Age’ columns from the ‘Employees’ table, you can use the following formula:


ShowColumns(Employees, {“Name”, “Age”})


5. Customize the appearance of the gallery control as per your requirements.

The above steps will display the ‘Name’ and ‘Age’ columns from the ‘Employees’ table in a gallery control in your Power Apps app. You can also use the ShowColumns function in conjunction with other functions to perform complex operations.

The Power Fx ShowColumns function is a powerful tool that can be used to extract specific columns from a table and display them in a specific format. With this function, you can create custom applications that cater to your business needs and automate tasks with ease. By following the steps outlined in this article, you can use the ShowColumns function in Power Apps and take your app development to the next level.

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