Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Retrieving specific columns from Dataverse and assigning them to a gallery in a component

Like (0) ShareShare
ReportReport
Posted on 7 Jan 2022 17:48:53 by 36

I am trying to create a component which act like a SharePoint "append to text" multiline text field. I have built the component with a textbox to enter the text and then once saved the entry goes into a gallery below. Here is a screenshot to give further context:

 

Smemmi_0-1641574422146.png

 

So I have created a custom property called "NotesDataSource" which is a date type of Table and this will be added to the Gallery's, Items property to retrieve historic notes from a data source. I have created the following table structure with dummy data so that the gallery knows what values to set to each control in the gallery:

 

Table(
{Note: "this is note number one", NoteCreatedBy: "Suresh Memmi", NoteCreatedDate: "09/03/2021"},
{Note: "this is note number two", NoteCreatedBy: "Suresh Memmi", NoteCreatedDate: "18/09/2022"}
)

 

When I add this component to a canvas screen I set the "NotesDataSource" property to a Dataverse table called "Meta notes", which also has the columns "Note", "NoteCreatedBy", "NoteCreatedDate" but it also has many other columns. I need to assign these specific columns to the specific column values of the "NotesDataSource" Table structure. I have tried setting the following to "NotesDataSource":

ShowColumns('Meta notes', "Note", "NoteCreatedBy", "NoteCreatedDate")

 

However even with the same colum names the component does not know which Dataverse columns to assign to the "NotesDataSource" table structure . I can't use "Thisitem" either as the gallery is part of a component.

 

I hope I've explained the problem clearly and I'm stuck at how to achieve this, any ideas?

  • v-jefferni Profile Picture
    on 13 Jan 2022 at 02:25:46
    Re: Retrieving specific columns from Dataverse and assigning them to a gallery in a component

    Hi @Smemmi ,

     

    Please refer to below thread which included detailed steps of using Gallery in a component:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-use-a-gallery-in-a-component/td-p/471761

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Smemmi Profile Picture
    36 on 12 Jan 2022 at 22:59:17
    Re: Retrieving specific columns from Dataverse and assigning them to a gallery in a component

    With the solution in Reza's video you get to create the collection in the app and then assign the collection to the components custom property. In my scenario I'm not creating a collection but assigning a Dataverse table to the components custom property so I'm unable to set the same table structure

  • v-jefferni Profile Picture
    on 12 Jan 2022 at 08:57:48
    Re: Retrieving specific columns from Dataverse and assigning them to a gallery in a component

    Hi @Smemmi ,

     

    You will need to set Label Text property to ThisItem.Note in the Gallery from in the component. Below is a video that introducing a menu component which includes a Gallery, you may find the detailed settings for the controls in it:

    https://www.youtube.com/watch?v=3S0h2nODcxM

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Smemmi Profile Picture
    36 on 10 Jan 2022 at 10:01:05
    Re: Retrieving specific columns from Dataverse and assigning them to a gallery in a component

    No the Gallery is part of the Component I created. I may have not explained it very well but basically what you would normally do for a Gallery is populate the "Items" property with a data source and then for each control in the gallery you would say for example "Thisitem.Note".

     

    In my case the gallery is part of a component so I can create a custom property for the "Items" property for the gallery where you can set the desired data source but there is no way to set any of the gallery controls, in my case a Label text property using "Thisitem".

  • BrianS Profile Picture
    2,407 Super User 2024 Season 1 on 07 Jan 2022 at 18:36:55
    Re: Retrieving specific columns from Dataverse and assigning them to a gallery in a component

    Will this component be included in a gallery in your apps? You may be able to use "Parent" to find the correct columns

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard