Subroutine

Hello,
is there a „best practice“ of creating something like subroutines?
I have about 50 markers on a map. If tapped, each one triggers a series of morevor less the same actions. I found it was unelegant loading 50 objects with the same trigger performing 5 individual actions and 20 standard actions, if you know what I mean. Instead I packed the standard actions in a subroutine that is called by each marker. My solution works perfectly well - I just would like to know the best practice to do that. I found not topic concerning that thing.
Greetings
Micha

Hello @marnold,

What you describe wanting to do can be addressed by using Data Templates to display information in a data feed.

We offer an Intuiface Academy course, Connecting to the World, that goes over using data templates and the sources that can be used for the data feed.

I suggest going through that course and see if that addresses your needs.

Thanks,
Ryan

I’m not sure if it answers your question, but I will often create a button - sited outside of the main canvas - and setup all of my commonly triggered actions on this button. Whenever I need to launch this set of triggers, I will tigger the action ‘Simulate Click’ on this button. You could do the same for your standard actions.

1 Like

Good idea using a button!
I solved the problem by using a rectangle or ellipse, loading it with the repeatedly used triggered actions on „when showed“. The last action always is to „hide“ the object again, so it can be „shown“ again whenever necessary.
Besides i can have optical control when and which „sub“ has been triggered.
Greetings
Micha

1 Like