PricingBlog

Wait until...

  • giantguf-1175483864530038815

    GiantGuf

    2 years ago

    I have a global popup component that I can set headline and button text as an input so it could be used for many tasks, and an output event on which button they pressed (for example Confirm or Cancel).
    The function calling the popup needs to wait until the popup is clicked and sent a response before proceeding with a switch handling the response. How can I achieve that?
    Right now the sending logic just proceed with the next step before receiving an answer.
  • erikbeus-1176075458106884167

    Erik Beuschau

    2 years ago

    I would suggest:
    1. Store a representation of the action you want to perform in a variable (a uuid, a string or whatever makes sense in your case)
    2. Open the popup
    3. Add an action on the event from that popup that does the switch handling of the response
    Does that make sense?
    If not, perhaps you could add a few screenshots to help me understand the issue better?
  • giantguf-1176158011857846283

    GiantGuf

    2 years ago

    Here's a short video of what I'm trying to do:
    https://komododecks.com/recordings/zUp54RjJoqndQLe1dci6
  • erikbeus-1176160133840109588

    Erik Beuschau

    2 years ago

    Thanks 👍 A few comments/questions:
    - On your button's click event, you're updating the "Update Monitored Coins" variable. What does that do exactly? If that's the action you would like to only perform after the user has confirmed, then you should move that action to the "Button Confirmed" event from your "global"/component popup.
    - I can see you're setting a "Delete popup message" and a "Delete popup" variable. You could probaly achieve the same result by only using 1 variable (the first one) and only show the popup when that variable is not null for instance