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 / Clear / reset record t...
Power Apps
Answered

Clear / reset record type variable

(0) ShareShare
ReportReport
Posted on by 14

Hello, I a record type variable that I set to a record that has several fields and I call that variable in another screen by accessing the respective fields:

Set(variableRecord, ThisItemA)

variableRecord.fieldA1 

the problem is when I reuse the variable with another set of fields and then everything in the first screen stopped working

Set(variableRecord.ThisItemB)

variableRecord.fieldB1

 

I already tried using Set(variableRecord,Blank()) but it didn't work.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,127 Most Valuable Professional on at

    Hi @Igorod ,

    Try using Context Variables

    UpdateContext{{variableRecord: ThisItemA})

    You can have the same name set on different screens and they are actually separate variables.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Verified answer
    Igorod Profile Picture
    14 on at

    Hi @WarrenBelz , thank you for your time and help. I came around with a solution that solved my problem. My fault that I forgot to mention that this variable is set with a value from different sources and uses it in the same (view) screen.

    The workaround I came up with is Filtering dataset b so that it retrieves the record from dataset a and therefore eliminating conflicts in the view screen.

    Finally I had to enforce the first record  because the filter returns a collection (although in my case the filter always returns an unique record) and I was getting some type errors.

    Set(variableRecord, ThisItem.itemA)

    and in the other call

    Set(variableRecord, First(Filter(sourceA, FieldA=ThisItem.itemB)))

    and now in the view screen I can call variableRecord.field1, variableRecord.field2 ... no matter from where I make the call.

    Once again, thank you very much for your time and help.

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 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard