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

Announcements

News and Announcements icon
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 711
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,963 Moderator 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 316 Most Valuable Professional

#2
11manish Profile Picture

11manish 242

#3
Valantis Profile Picture

Valantis 198

Last 30 days Overall leaderboard