Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

On blank record variables

(1) ShareShare
ReportReport
Posted on by 674
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:
  • Michael E. Gernaey Profile Picture
    40,659 Super User 2025 Season 1 on at
    On blank record variables
    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,587 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard