Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Radio Button Not Working




I'm trying to use a radio button to update the distribution of my piece wise linear regression macro. I copied the glm tool macro language to pull in the distribution of the glm as such:

is.XDF <- FALSE 
if (!is.XDF) {
if ('%Question.Quasipoisson%' == "True") <- "quasipoisson(link='log')"
if ('%Question.Gamma%' == "True") <- "gamma(link='log')"
} else { <- "quasipoisson(link='log')"
# Create a string of the potential predictors seperated by plus signs
the_preds <- paste(names(the_data)[-1], collapse = " + ")
# Get the name of the target field
the_target <- names(the_data)[1]
# Create a formula expression from the names of the target and predictors
the_form <- as.formula(paste(the_target, the_preds, sep = " ~ "))
# Run the model
fit1 <- glm(the_form, "family = " , data = the_data)

And I do not have the radio buttons connected to anything (like the count regression tool has it set up):

radio button.JPG

I'm not sure why the code is not working.  The error I get is unexpected symbol in "fit1 <- glm(the_form, "family ="


Alteryx Certified Partner



If you added those radio button yourself, my guess is that you didn't update the tool name, and not referring to the question to be displayed.


Click on the radio button and in the configuration screen, select the "Annotation" icon. Name this to what you'll want to use in your R script.



This is the value that you'd use in '%Question.<ToolName>%'.


Hope this helps!


Thank you @jrgo.  Worked like a charm.