Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to dynamically set "Item" property in "form" control

I would like to set dynamically the item to be edited in a "form" control.


Usually the "item" property is set to "Gallery.Selected". 


Do I now need to change the gallery.selected data? Or can I directy set the value of the "Item" property?


Can I set "gallery.selected" or the "item" property by the "on select" event? If so, how?


Re: How to dynamically set "Item" property in "form" control

In the item property there should be a reference to a record. What you could do is use a collection in which you store the item that you want to use on the form and reference that record in the 'item'-property. You need to add a clearcollect function to create the record in the collection to every part of the app from where you want to navigate to the 'form'-control. Of course the order of the function should be: first the clearcollect and second the navigate.

Community Support
Community Support

Re: How to dynamically set "Item" property in "form" control

Hi @Anonymous,


It is recommended to take a look at the following article first:

Understand data forms in Microsoft PowerApps


To have the Form control work property, we need to configure the DataSource property and the item property.

Item property is one single record from the table configured under DataSource property.

By default, the DataSource is not allowed to change once configured, but for the item property, we could take use of filter functions to find the proper record,

For example (using Display form as an example):

We have the following table as data source:


1. Data Source configured to 


2. Add a button, OnSelect property configured to: 


3. Item property configured to : 



When click the button, the item would change to the corresponding record:



EditForm is only available to configure the item property with Edit Mode, for more details, please check:

Edit form and Display form controls in PowerApps





Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Not applicable

Re: How to dynamically set "Item" property in "form" control

Thank you for this hint.


I have implemented this and it worked well.


I did the following:

- created 4 screens (newPage1, newPage2, editPage1, editPage2)

- Item property in NewForm1 and NewForm2 is empty

- On the submit button I do the following (this is probably the complicated part):

 Patch(PowerAppsMultiPageDemo,Defaults(PowerAppsMultiPageDemo),{Title: DataCardValue9_1.Text,Feld1: DataCardValue10_1.Text},NewForm2.Updates);Navigate(BrowseScreen1,Cover)


For the edit Pages it was slightly easier:

- Item Property of EditForm1 and EditForm2 is set to "Gallery.Selected"

- On submit I do the following:





The only downside of it is that such an architecture is quite effortful. especially when it comes to changes, one always has to consider dependencies to the rules.



Not applicable

Re: How to dynamically set "Item" property in "form" control

Thankts for the second hint.


I'm curious to see if this leads to an even simpler approach.


I didn't know that I can filter the item property like this.

Advocate I
Advocate I

Re: How to dynamically set "Item" property in "form" control

Thank you very much, Michael ()! That was just what I needed.

Helpful resources

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!


Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.


Super Users Coming in August

We are excited for the next Super User season.


Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,836)