How to find the max no from an array without using Max() ?

Hi dear,

I have written code like in the picture, I just want to print the max no without using max function.

  Discussion posts and replies are publicly visible

Parents Reply
  • I love displayValue().

    a!localVariables(
      local!data: {
        'type!{urn:com:gdit:types}COE_Sample_CDT'(step: 2, requestByName: "Mike"),
        'type!{urn:com:gdit:types}COE_Sample_CDT'(step: 3, requestByName: "Harshit"),
        'type!{urn:com:gdit:types}COE_Sample_CDT'(step: 1, requestByName: "Chris"),
        'type!{urn:com:gdit:types}COE_Sample_CDT'(step: 4, requestByName: "Stefan")
      },
      
      displayValue(
        max(local!data.step),
        local!data.step,
        local!data.requestByName,
        null
      )
    )

Children
No Data