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 / Syntax to use mod() fu...
Power Automate
Answered

Syntax to use mod() function in "Set Variable" action

(0) ShareShare
ReportReport
Posted on by 16

I tried to use mod() function in a "Set Variable" action but there's a syntax error.

In this simple example, variable y starts with value 0 and I wanted to get mod(y+2, 2) which should return 0.

I googled and found some solutions where they have "Initialize Variable" action with "Add dynamic content" option to type in the expression. However I could not find that action in my Power Automate (which I assume is Power Automate Desktop installed on my laptop). 

Is it possible to use mod() in "Set Variable", if yes what is the correct syntax? If no, which action should I use?

 

PA_mod1.JPGPA_mod2.JPG

I have the same question (0)
  • Verified answer
    Daniel_Pa Profile Picture
    244 on at

    Daniel_Pa_0-1642515310418.png

     

  • liewcc Profile Picture
    16 on at

    Thanks, @Daniel_Pa. It worked nicely.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard