PowerApp: Using Two Data Sources

Copper Contributor



I am trying to use two different data sources within my PowerApp and it is throwing an error. I have accomplished this before, but it just started throwing an error. 


I have two tables in the excel file this PowerApp is pulling from. Both tables include OrderNumber. The first table includes details about discounts, and the second table is empty and intended for the PowerApp to write back to with a decision and comment. The OrderNumber part of the edit form is meant to autopopulate with the selected order number from the gallery. Anyone know where I am going wrong?





1 Reply

Hi @zlasek 

It seems like you are facing an issue with using two different data sources in your PowerApp. There could be a few reasons for the error you're encountering. Let's try to troubleshoot the problem step by step:

  1. Check Data Source Connections: First, ensure that both data sources, i.e., the Excel file containing the tables with discounts and the empty table for writing back, are correctly connected to your PowerApp. You can do this by going to the "Data sources" tab in PowerApps and verifying that the connections are established without any issues.

  2. Verify Field Names: Double-check that the field names, particularly the "OrderNumber" field, are consistent between both tables. Even a minor difference in the field name can lead to errors when trying to use them in the app.

  3. Gallery Selection: You mentioned that the OrderNumber should autopopulate in the edit form based on the selected order number from the gallery. Ensure that you are correctly binding the gallery control to the first table with the OrderNumber field. Also, make sure that the gallery is correctly passing the selected OrderNumber to the edit form.

  4. Edit Form Data Source: Confirm that the edit form's data source is set to the second table (the one intended for writing back). You can do this by selecting the edit form and checking its "Data source" property.

  5. Check for Any Recent Changes: If this app was working fine before but suddenly started throwing errors, consider any recent changes you might have made to the data sources, app layout, or formulas. If you can identify the change that caused the issue, try to revert it or adjust it appropriately.

  6. Review Error Message: Take a close look at the error message you are getting. It might provide more specific information about the cause of the problem. This can be helpful in narrowing down the issue and finding a solution.

  7. Test in Different Environment: If possible, try creating a new PowerApp or test the app in a different environment to see if the issue persists. Sometimes, issues can be specific to a particular app or environment, and starting fresh might help.

  8. Reach Out for Support: If you've gone through the above steps and still can't find the problem, consider reaching out to the PowerApps community or support forums. You can describe your issue in detail and share any error messages you encountered. Often, the community members or support team can provide valuable insights and solutions.

Remember to save your work and back up your app before making any major changes, as troubleshooting may involve experimenting with different settings.

I hope these steps help you identify and resolve the issue with your PowerApp. Good luck!