Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: SMCL {stata args[:txt]}

From   "K D Nash" <>
To   <>
Subject   Re: st: SMCL {stata args[:txt]}
Date   Thu, 2 Jun 2011 10:10:04 -0500

Austin -

Thanks for the help.  Your suggestions seem to work great.  Thanks again.


----- Original Message ----- From: "Austin Nichols" <>
To: <>
Sent: Wednesday, June 01, 2011 3:45 PM
Subject: Re: st: SMCL {stata args[:txt]}

K D Nash <>:

clear all
prog lime
li m* in `0'
prog lime2
li m* if make=="`0'"
sysuse auto
forvalues n=1/5 {
loc vn=make[`n']
dis _col(10)"{stata lime `n':`vn'}"
forvalues n=1/5 {
loc vn=make[`n']
dis _col(10)"{stata lime2 `vn':`vn'}"

On Wed, Jun 1, 2011 at 4:26 PM, K D Nash <> wrote:
I have a stata program that lists identification (ID) numbers for
individuals as output such as:

.list guys


The user of this program wants to be able to click on an ID number which
will then provide further information about the individual selected. The
following is part of my program statements:

forvalues n=1/`k'{
loc vn=guys[`n']
dis _col(10)"{stata smcprog:`vn'}"

where `k' is a count of the number ID numbers listed and guys[`n'] is the ID of a guy in the dataset. This SMCL statement solves the problem of turning
the list of ID numbers into "clickable links".

The problem I am having is the following. How do I get the program,
smcprog.ado, to recognize 30382960 as the ID number that is clicked? When
the user clicks an ID, I want the program smcprog.ado to go get a stata
dataset that includes many ID numbers but then use only the data for the ID
that was clicked to carry out other tasks.

Or, is there a better way to accomplish what I want to do. The listing of
the ID output has to be clickable links

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index