Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

ObjNull issue

(1) ShareShare
ReportReport
Posted on by 156
Hello community,
 
I have created a gallery within a form.When the screen is visible i created the below
 
UpdateContext({additemrow:{Brand:Blank(),Model:Blank(),SerialNo:Blank(),Dateofreceipt:Blank(),Recepientsign:Blank(),isEdit:true}});
ClearCollect(CollItems,additemrow);
 
The above creates an empty row to my collection.
My problem is that when i try to create an item via the gallery i get the below error from my patch function.It is looking for an ObjNull type.Can anyone assist me on this?
 
  • Verified answer
    Power Apps 1919 Profile Picture
    361 on at
    ObjNull issue
    Hi , in that case I would suggest you something like 
    ClearCollect(colitems,FirstN(Your_final_datasourcs,0));
     
    By using this colitems will get schema of the your final datasource (no need to manually set the column and it's schema).
  • NM-06090901-0 Profile Picture
    156 on at
    ObjNull issue
    Hi @Power Apps 1919 waht if my columns are choice columns?
  • Suggested answer
    Power Apps 1919 Profile Picture
    361 on at
    ObjNull issue
    Hi @NM-06090901-0, you can't do UpdateContext({additemrow:{Brand:Blank(),Model:Blank(),SerialNo:Blank(),Dateofreceipt:Blank(),Recepientsign:Blank(),isEdit:true}});

    you have to do 
    UpdateContext({additemrow:{Brand:"",Model:"",SerialNo:"",Dateofreceipt:"",Recepientsign:"",isEdit:true}});

    by doing this you are defining the type of text for Brand Col previously it Null (Blank so it always expects null object only) in next operations.
    instead of sending Blank() try sending empty String ""
     

    Please give the mentioned solution a try and let me know whether it works for you.
    If it solves your issue, feel free to mark this thread as answered.
    Please make sure to like the response!
    Thanks!
    - Hemanth Sai

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2