Single Procedure for two similar functions

Dear All,
can we have a single procedure with parameters for two functions…

Have you tried it? Did it work? If it worked, then yes. :wink:

I’m trying with any component…

This example should point you in the right direction:


Yes, i’m passing an variable (x i.e channel number) to procedure… But confused with any component with Bluetooth. Basically i didn’t for component in that…

Doubts in Mit APP inventor 17
i don’t understand for component & of component, But i will study on that. Any tutorial link is helpful.

the component is the last block in the corresponding drawer, for example BluetoothClient1 or BluetoothClient2

see also How to work with the advanced features


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Tried it.

“The operation select list item cannot accept the arguments”, Where i’m going wrong…

you might want to provide the complete error message…
also how to you call the procuedure and how did you define BT_Devices?

you might want to do a bit of renaming…
for example a better name for x would be index and to avoid errors, let me suggest to prefix list variables always with list… so listBtClient rather than BTClient etc.


The operation select list item cannot accept the arguments: , [[,]], [package NaN]

BT_Devices is the list containing the list of bluetooth uuid’s.

how did you create the variable index and why is it of blue color?
drag the variable index from here

as I can see, you used a numeric number block and renamed it to index…
@ewpatton this is a bug and should not be possible …



Thanks, it worked. I’m very sorry for the mistake.
Can we connect Bluetooth client using a name instead of UUID’s, So that we can hard-code in an APP.

don’t worry, you found a bug…

I’m not sure, it’s already a few years since I played around with the bluetooth components, you might want to try it and let us know, what you find out


Yes a good one.
If you type a word in a maths number block and press enter, it goes back to 0.
If you type a word in a maths number block, then click the blocks editor…:slight_smile:

This is a known issue, see here:

1 Like

Good eyes!

from the Books and Tutorials FAQ

Note that this is just a visual glitch. I inspected the contents of the block and it still records 0, it just doesn’t update the text to display that the validation failed. If you reload the project it should go back to 0. There is an issue filed:

A post was split to a new topic: Can’t select BLE Component from list