cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bwpescatore
Regular Visitor

Cannot access all record fields when storing record as a variable

Hi, I haven't been able to find the answer to this anywhere and I do have a work-around but hoping to resolve the root cause of this issue.

Currently I have an app where I select items from a list and navigate to an edit details page. Rather than use the

 

Gallery1.Selected

 

I am setting a global variable using, 

 

Set(varSelected,Gallery1.Selected)

 

which helps me a lot because it is possible to navigate to this details page from a few different galleries. So in some other screen on the app I may use 

 

Set(varSelected,Table2.Selected)

 

which allows me to have a few tables and galleries that display different details but still use only one screen to edit and view details for those items. 

Currently, when I navigate to a roll details page, ONLY the fields visible in the gallery or table are available to me. An edit form with the Item property set to varSelected will only fill in the fields with data that existed in the table. If I do not use a variable to store the record I can get even fields that are not displayed.

Current workaround is simply adding all the fields I need but this won't work long term as I have another entity that has many many fields I will need to pull and will not be able to display in a gallery or table. Any idea why I cannot get more fields from these records when they are stored as variables? Can I store all fields in the variable when setting it?

Thank you, these forums have been very helpful starting from scratch on powerapps.

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

Hi @bwpescatore 

In the Item property of the form try Lookup(datasource,ID=varSelected.ID).  The Datasource property of the  Form and the datasource in the Item property must be an exact match.  

View solution in original post

1 REPLY 1
Drrickryp
Super User
Super User

Hi @bwpescatore 

In the Item property of the form try Lookup(datasource,ID=varSelected.ID).  The Datasource property of the  Form and the datasource in the Item property must be an exact match.  

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.

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