Is it possible to find the Min value and Max value from a list of value pulled from XML?

for example:

Set @values = BuildRowsetFromXML(@xml,"//root-object/value",1)

Set @smallestValue = Min(@values)
  • Min and Max functions are not available in AmpScript but you can use RowCount AmpScript function to check the number of rows pulled from xml. – Palash Rai Oct 7 '15 at 4:59

Assuming you're talking about the min and max as it relates to XPATH, I'd no it's not possible. SFMC only supports XPATH 1.0 in the BuildRowSetFromXML() function The min and max functions are specific to XPATH 2.0.

There are some work-arounds in XPATH 1.0 (previously discussed here on SO), if you're feeling daring.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.