PricingBlog

How do I connect the Reduce accumulator ("result") to a Set function's Object input in the visual

  • marta_filipe-1483899639340994854

    Marta_Filipe

    26 days ago

    Hello!
    How do I connect the Reduce accumulator ("result") to a
    Set function's Object input in the visual formula editor?

    When I click the + on Set's Object input, the "From Reduce"
    section only shows "item" and "index" "result" doesn't
    appear. Typing "result" in the search field shows "No results".

    The "result" node exists on my canvas (From Reduce > result)
    but I can't find a way to connect it to the Set input.

    What's the correct method?
  • bsr.24-1483924675372384256

    Bobby Randhawa

    26 days ago

    Hard to say what's going wrong without seeing your setup, could you share a screenshot?

    The attached screenshot shows a working Reduce example for reference.

    The Add node's two inputs are connected to item and result (both from Reduce), the Array feeds into
    Reduce's Array input, and Add feeds into Reduce's Formula input. Output is 6 (1+2+3).
    1483924674571145286-image.png
  • marta_filipe-1484544346022739989

    Marta_Filipe

    24 days ago

    Hi Bobby! Thank you so much for your response and the reference screenshot .

    We figured it out! In the end it came down to the order in which we were connecting the nodes in the formula editor. Once we got that right, everything clicked into place.
  • bsr.24-1484562950055526431

    Bobby Randhawa

    24 days ago

    Awesome, glad to hear!