1

I have just started using Power Platform (Power Apps). I recently tried to see data (via Google Sheets) in a data table which worked fine by attaching a data source (of Google Sheets) to a data table.

Now, what I am trying to do is:

  1. I added a button in my Test app

  2. On that button's onSelect, I am executing a stored procedure after successfully adding a SQL Server data source

  3. The code which I wrote in onSelect is this:

    MyStoredProcDataOnButtonClick.Run()
    
  4. Now, after this event is called, I want to showcase the result data from the stored procedure call in a data table

  5. In the data table, I am unable to see the data source (for that stored procedure)

How can I achieve this?

Any help/suggestions would be appreciated.

Note: I created a flow for this from Power Apps to execute a stored procedure on button click.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

Add the SQL Connector to the PowerApp. Create a collection of the record(s) you need.

Example:

ClearCollect(colData,
    Filter(SQL_TABLE,
        whatever_column = whatever_value
    )
)

Set the Items property of a Gallery to colData. Add some Label controls to the Gallery template for the data you want to show. Like @strattonn said, the SQL Connector is premium. Though check the PowerApps license guide and search for "multiplexing". Your current PowerApp-to-Flow-to-SQL workflow may already require all of your PowerApps users to be premium licensed.

SeaDude
  • 3,725
  • 6
  • 31
  • 68
  • Will the solution provided above with ClearCollect work with SP Data? Asking this because the answer mentioned is for SQL_Table and it's column-value. – MysteryTech443 Jun 16 '22 at 06:09
  • I'm not following you. If you're saying **PowerApps-to-PowerAutomate-to-SQL-to-Sharepoint-back-to-PowerApps** , it won't be instantaneous. You'll likely need to put a pause in the app to let the data load. – SeaDude Jun 16 '22 at 21:46