Call procedure through variable?

Is it possible to call a procedure whose name is in a variable?
I want to share asynchronous code among multiple processes (for example, BLE communications, clock timer, sqlite selects…). I would need to call back to the original process (state machine) once an asynchronous event has triggered.
I, for example, I want to execute sqlite selects from different procedures, I would like to have the name of the procedure in a global variable and in the sqlite AfterQuery call the procedure specified in that variable.

I think this would be similar to what the “Async procedures” extension does internally, as the name of the procedure is passed as an argument to the call (“procedureName argument”).

I don’t see that as a possible thing, but maybe you can create a filter with IF blocks.

IF value returned = 1 then PROCEDURE1
ELSEIF value returned = 2 then PROCEDURE2

OK, thanks for the response.
What you proposed is what I was doing, I just hoped maybe there was a better option when I saw the “Async procedures” extension …

1 Like

Your hope will not go in vein.There is already an extension related to that:

Tip: Always search in the community before creating a new topic :smile:

1 Like

That extension is not what I need. I just need to be able to call a procedure from it’s name, the same way that extensions seems to do, as you pass a procedure name to the call block.
I guess it can only be done in java or any other programming language used to develop the extensions.

1 Like