cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anonymia25
Helper IV
Helper IV

Create new collection from table field in dataverse

Hi,
I wanted to create new collection with the same field type as the existing table in the data verse. This is just for temporary storage in the app to be used in a gallery item for user to add/delete before patching all into the dataverse. I tried using below but it created rows based on the available record in the table. 

ClearCollect(NewGO, 'Group Office Allocations')

 
I wanted the record to be new and empty. Appreciate the help for this thanks!

1 REPLY 1
gabibalaban
Dual Super User
Dual Super User

@anonymia25 ,

You can initialize the collection with: 

ClearCollect(NewGO, Defaults('Group Office Allocations'));
Clear(NewGO)

In this way you will have an empty collection with the same structure as the datasource. 

Hope it helps !

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,884)