I have a document that has a lot of theorems - all introduced in LyX via the "Theorems"-Module (for those who don't know LyX, that means, that I didn't define my own theorem environment via \newtheorem..., LyX did!).
Now I want do to reference to some of my theorems.
As far as I know, this is done by giving the theorem I want to reference a label and then using \hyperref[LABEL]{TEXT}, where "TEXT" is then the colored link to the theorem (somehow \ref isn't working in LyX, if anyone is wondering why hyperref).
And now my question comes in: I need a command that somehow returns the number of the theorem (all my theorem are numbered continuously with one number through the whole text) that has the label "LABEL" - like \findnumber{LABEL} - so that I can use \hyperref[LABEL]{\findnumber{LABEL}}.
Thus, if I add another theorem the number that is the link to that theorem also changes. I don't know if this solution is the "correct" one. If it isn't, please let me know.
button on the toolbar. This places, well, a label at that point which you can refer to at other places in the document. The label refers to the last "active" counter, so when you place it right at the beginning of the theorem, you know you get the right one.
button on the toolbar (right next to the insert label-button). You will get a list of all the labels in the document, and a choice of what kind of reference you would like. For example, 
\ref? as that does exactly what you're asking for in\findnumber. – Torbjørn T. Mar 28 '12 at 18:34