$did($dname,$did).seltext

I would really recommend that you read the help file, all this stuff is written literally in it in the Dialog section.