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:
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?
Hi @Smemmi ,
Please refer to below thread which included detailed steps of using Gallery in a component:
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.
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
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.
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".
Will this component be included in a gallery in your apps? You may be able to use "Parent" to find the correct columns
WarrenBelz
223
Most Valuable Professional
MS.Ragavendar
110
stampcoin
86