web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / On blank record variables
Power Apps
Unanswered

On blank record variables

(1) ShareShare
ReportReport
Posted on by 704
I am trying to make sure global variables that refer to dataverse records are always of the correct type (errors may only show up after closing and reopening projects an hard to find among 3000 errors after a day of coding).
So at the start of my app I create variables to records that are blank so i can always assign other record variables (to the same table) to a blank with the correct type.
 
Set(gRecMyTableBlank,Defaults(MyTable))
Set(gRecMyTableBlank,Blank())
 
If I omit the first line the variable type is not specified which is what i set out to avoid.
If I omit the second line the variable is not blank. IsBlank(gRecMyTableBlank) = false
 
If I make a gallery with MyTable populated with lables refering for fields (fe ThisItem.Name) and I want to set items to blank I would expect to be right
[gRecMyTableBlank]
being a table with a blank record of the correct type
But then I get errors on the field names
While if I say 
gRecMyTableBlank
(without brackets)
which is fundamentally wrong since I am specifying Items (plural) as a record (single)
I get no errors
 
Is my thinking wrong?
 
PS if I create a label outside of the gallery with as text gRecMyTableBlank.Name I get no errors just a blank text
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,369 Super User 2025 Season 2 on at
    Weird
     
    I replied to this.. Did you post in multiple Forums at the same time (if so please dont), cause I know I answered this. If you didn't.. truly I dont know where my answer is lol
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard