web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / DataSource for a view ...
Power Apps
Unanswered

DataSource for a view Form?

(0) ShareShare
ReportReport
Posted on by 273

I have tried adding as the DataSource for a view form the following

* a table variable

* a custom connector directly

* a collection

 

But nothing shows up in my view form in the designer. What am I doing wrong? As an example I try this on the OnVisible property of my screen

 

Set(storeDetail,InSiteConnector.GetPricelineStoresDetailed({order:"DESC",ordercol:"RowInsertDateTime",server:"P284S001"}))

And then trying 

 

First(storeDetail)

in DataSource but the form is blank. What am I missing? 

Categories:
  • timl Profile Picture
    37,382 Super User 2026 Season 2 on at

    Hi James,

    After you load your screen, if you click File>Variables, does the storeDetail variable appear and is it populated with data? If so, do you see a tablular view of data that you can bind to a view form? If you see some unusual data structure here (eg, a single row, single column field that contains your data in a nested table) , that might explain why your view form isn't populating.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @JamesM,

    Forms require a datasource and they display information from a single row in that datasource. The row is defined by the Item property. It is usually referenced by a row selected in a gallery or Datatable.  Nothing will show up until you select one. Put a datatable on the screen and set its items property to the same datasource as the form. In the item property of the form  put Datatable1.Selected. The form will then Populate.

  • JamesM Profile Picture
    273 on at

    I will give that a try, but does that mean that in order for a Form to be available, you must also have a data table on the screen? (Even set to not visible, this seems hacky?) 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Nope it can be on any screen. Usually you will navigate to a view screen from a gallery where you select the row in the datasource. The purpose of the view form is to show the details of a row you select in a gallery or a datatable. I just wanted to show you how it works. If this answers your question please mark the thread as solved.

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @JamesM,

    Do you want to display a record within your data source within the Display form control?

    Currently, the Display form (or Edit form) could only be connected to a Table data source PowerApps supports currently (e.g. Excel table, SharePoint list, SQL table, etc).

    More details about Table data source within PowerApps, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections-list#tables

    If you want to connect the Display form (or Edit form) to a table variable, a custom connector or a collection, I afraid that there is no way to achieve your needs in PowerApps currently.

    Note: I don't agree with @Drrickryp's thought, I don't think the Data Table control could achieve your needs.

    If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

    https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

     

    Best regards,

    Kris

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @JamesM and @v-xida-msft,

    I believe that I may not have been clear enough in my explanations.  Kris is certainly correct that a View form works only with a primary data source and not a variable or collection.  Moreover, unless it is in New mode, it displays only one record from the data source and that record is defined by the Item property.  In the commonest use, the View form has the same datasource as a gallery or datatable and the row selected in either of these controls is referenced in the Form's Item property. The example I gave with the datatable was simply an illustration of one way to select a record for the Item property of the form provided that both the Form and Datatable had a single  common datasource.. 

  • timl Profile Picture
    37,382 Super User 2026 Season 2 on at

    Hi guys,
    Could you clarify what you mean about Forms not working with collections or variables?
    I've just tried and I can set the DataSource of a form to a collection (Customers in this example) which I built with ClearCollect. I can also set the DataSource of the form to a variable which I define with the Set function.

    formCol1.PNG


    Returning to the original question, I think I understand the problem now. I think that by setting the storeDetail variable in the OnVisible property of the screen, there is some timing problem where the form attempts to bind to the data before it fully loads, and this explains why the form appears blank.
    You can recreate this problem by moving the code that I have in my 'Create Collection' button to the OnVisible property. One way to work around this problem is to set the variable before the screen opens. If you have a button that opens the screen that contains the form, you can set the variable value before navigating to the screen, like this:
    formCol2.PNG


    To clarify what @Drrickryp is saying, notice in my first screenshot how the Item property is set to Gallery2.Selected. If you don't want to add a gallery or data table to your app, you can set this to First(storeDetail) if you want the form to display the first record in your storeDetail collection.

    If this doesn't work, show us what the structure of storeDetail looks like by screenshotting the Files > Variables page. I've uploaded this simple test app here in case it helps you.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard