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 Automate / How to clear a variable?
Power Automate
Unanswered

How to clear a variable?

(1) ShareShare
ReportReport
Posted on by

Hi All,

At the begining of a loop, I'd like to clean one variable ,which means to set the variable to "NULL", but I can't find a easy way to finish that.

in some

pochuan_0-1720755683086.png

 

Categories:
I have the same question (0)
  • Anil_g Profile Picture
    668 Moderator on at

    @pochuan 

     

    In expression editor try string(null) or empty

     

    cheers

  • pochuan Profile Picture
    on at

    pochuan_0-1720758888925.png

    i have tried this way ,and the result is

    pochuan_1-1720758946967.png

    and the other way

    pochuan_2-1720759004375.png

     

  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at

    @pochuan in the place where you want to reset it

    1. Either add a Set Variable action

    Pick the Variable

    go to the expression tab in the Value input

    type null

    don't do it as a string, which it looks like you did below

     

    Also, note using Set Variable in a loop is terrible, unless you make sure the Apply to Each, you turn on Concurrency under settings of the action, and set it to 1.

     

    otherwise its not thread safe and will mess up your results.


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • pochuan Profile Picture
    on at

    pochuan_1-1720764166947.png

    I tried to follow “Either add a Set Variable action   Pick the Variable   go to the expression tab in the Value input   type null”

    pochuan_0-1720764117999.png

    and the result is

    pochuan_2-1720764178225.png

    which part is wrong, please help me.

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 Automate

#1
11manish Profile Picture

11manish 223

#2
David_MA Profile Picture

David_MA 210 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 175

Last 30 days Overall leaderboard