I can use an ERT: \nextchunklabel{save-handle} to define a label for a code chunk, and then refer to this from another part of the document with ERT: \subpageref{save-handle}
Does/Can lyx support this more natively to avoid the ERT, but allow a new label type beginning with nw: ? Sam