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 / max() on xpath express...
Power Automate
Unanswered

max() on xpath expression in Power automate

(0) ShareShare
ReportReport
Posted on by 7

Power automate xpath expression using max()  like :xpath(outputs('XML'),max('//v[FROMTOPIC="XXXX"]/WEIGHT/text()' )

always return error : The XPath expression evaluates to a result of type 'Any' that is not supported. The expression must evaluate to a number, a string, a boolean, or a node set.

Note that the expression works just fine if I use sum() instead for instance and the raw xpath return the correct elements . 

I tried to use xpath number() function like "//v[FROMTOPIC="XXXX"]/WEIGHT/number(text()) . this works in the xpath evaluator , but power automate rejects such  xpath expression holding number() or string() for that matter.

 

any suggestion on how to overcome this ?

Categories:

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
Mohsin Ali Profile Picture

Mohsin Ali 430

#2
11manish Profile Picture

11manish 341 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 282

Last 30 days Overall leaderboard