Trigger / Receive Event between components on the same page

I have 2 components on the same page, an Input Field and a Search Button.

I added a complex flow to the component Tap event of the search button and it works as expected.

I would also like this search to be performed when the onBlur event of the input field is triggered.

I added a Receive Event to the logic of the search button and named it “do_search”. When I add a Trigger Event to the logic of the input field the “Triggered Event” menu in the “Trigger Event” properties is empty so I am unable to select the event that I wish to trigger.

When I add a “Receive Event” to the logic of the same component OR to the logic of the containing page itself I am able to trigger the “Receive Event”?

Doesn’t Trigger / Receive Event work between components contained on the same page?

Hi, if you want the same event to be triggered from multiple components on the same page you can:

  1. Drag a new “Receive event” node onto the page’s logic canvas and give it a name under “Advanced”, here “My Event”

  2. Trigger this event from the components

@Mari

Thanks for your reply!

I’ve been doing exactly what you suggested but the “Triggered event” pulldown menu doesn’t show the “Receive event” added and named in the buttons’ logic canvas.

In the following example I’ve created 2 buttons

image

I then added a “My Event” listener to Button2

image

In Button1 I add a “Trigger event” like so:

image

When I select the “Trigger Event” and click the “Triggered event” menu in the properties there is nothing to select in the menu.

image

Hi, components don’t have access to each other’s events, just those that are included in the page logic. Can you achieve what you’re trying to do by adding the listener to the page’s logic canvas instead of the Button’s logic canvas, and then executing the logic after that?

There is also a “Tap component” flow in the marketplace that you can use to execute “Tap component” on another component, maybe that could be useful for you.

@Mari

  1. I started off the thread by saying that I managed to get this to work by including the “Receive Event” in the logic canvas of the page itself but thanks for confirming this!

  2. While moving a complex flow using copy and paste from the button logic canvas to the pages’ logic canvas in order to attach it to an event listener over there, I came across a serious issue. Flow items that reference outputs of other flow items (‘MAP(outputs[“Get record collection”].records,{id: item.id})’ in a formula for example) arrive corrupt after performing the paste operation in the new logic canvas and obviously don’t function as expected. The only way I managed to fix the corrupt items is by deleting them entirely and creating them from scratch. The resulting formula in the above example looked like ‘MAP(outputs[“445105b2.3c8f8c”].records,{id: item.id})’ after being pasted in a different logic canvas. Obviously 445105b2.3c8f8c is a hard-coded reference to the original flow item. Is this a know issue?

Thanks.

Hi, sorry for overlooking the last part of your first message! The references displaying flow function IDs after copy-paste to another canvas is a known issue.

@Mari

Can you please point me to the relevant bug report for the copy & paste issue? I’ve tried searching the “Bug reports” section but couldn’t find this issue.

Thanks!