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 / Finding a value within...
Power Automate
Unanswered

Finding a value within a string

(0) ShareShare
ReportReport
Posted on by 8

I have a loop from 1 to 100000. Whenever the Loop Index has the value "5" in any of the digits of the Loop Index, then the Loop Index should increase by 1. However, the codes below don't seem to work. Any help would be appreciated.

LOOP LoopIndex FROM 1 TO 100000 STEP 1
Text.FromNumber Number: LoopIndex DecimalPlaces: 0 UseThousandsSeparator: False FormattedNumber=> LoopIndex_Text
IF Contains(LoopIndex_Text, 4, True) THEN
Variables.IncreaseVariable Value: LastIndex IncrementValue: 1
END

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Well, I feel like if contains 5 would help. 

    also, does 55 increase the variable 1time or 2 times?

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Do not overwrite LoopIndex. Use a different variable for the formatted number.

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 273 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 172 Super User 2026 Season 2

Last 30 days Overall leaderboard