Changing control types

Often one creates a control and builds code ie flows around it, then decides to change it from say a button to an icon or an input field to a title… but there is no way to either

  1. change the control without loosing the flows
  2. code the flows to the new control

Thanks

It is possible to copy Flow functions from one component to another

First, select the flows with your mouse if you start pressing in the white area of logic canvas or you can hold Shift or CMD/CTRL down to select multiple Flow functions at the same time by clicking them. Then use CMD+C or CTRL+C to copy those (Events cannot be copied). Then select the new component you wish to have the logic and paste the Flow functions by CMD+V or CTRL+V.

You might need to do a little cleanup after this copy/paste if you have used outputs of other Flow functions in the logic as the Flow function IDs change in the background. So check that the bindings are okay in Flow functions, both directly selected and the ones in Formulas.

Another option would be to use Receive event and Trigger event Flow functions. Receive event would have to have Fired from "Trigger event" as its Event source and Trigger event would need to be bound to that event. Best way to do this would be to have the triggered logic flow on Page level and individual components would trigger that logic when needed. (In some cases if same logic should be available from multiple pages, you could create the logic to Global canvas). Note that I’d use this method only if same logic needs to fired from multiple places. If the logic is component specific, it’s better to leave the logic to the component itself and use copy/paste if needed.