1

I have a Custom Object which stores Territory_Name, Total_Capacity and Timezone.In a specific Timezone, I want to find out the territory which has maximum Capacity.

Using a fast lookup, I have the full list of territories in a Timezone. Now, how do I find the one with max capacity? Do I need to use looping or is there any straightforward way?

Which flow element can I use? and how?

2
  • Please give a try and if you face any issues then post with specific questions Mar 4, 2017 at 18:53
  • Hi @SantanuBoral - I am stuck at first step itself. Using a fast lookup, I have the full list of territories in a Timezone. Now, how do I find the one with max capacity? Do I need to use looping or is there any straightforward way?
    – Maneesh
    Mar 4, 2017 at 18:55

2 Answers 2

1

You could do this more efficiently with a Get element that queries your Object filtered by Timezone, sorted descending by Capacity, and returning just the first record. When you sort descending, the record with the max value will be first.

0

I figured it out. You need a loop element to traverse through the collection/list of territories. Then for each record, check the capacity and keep comparing against a temporary variable till you find the maximum. That's the answer

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.