community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

How do I link the interface with R scripts?

Meteoroid

 

I have an R script and I want script to know the values that the user entered in the interface objects. How do I do that?

Highlighted
Alteryx
Alteryx

Hi @Colin

 

I have attached a workflow built in Alteryx 10.6. This shows how to link interface to update a specific part of the R code. If you want to replace the whole string unselect the 'replace a specific string' tick box. 

 

Best,

 

Jordan Barker

Solutions Consultant 

Meteor

I have a script that runs in R Studio to query our BI system and output a text file (all built into our custom R package).  Can I enter that script in Alteryx somehow? Your example seems to be just a text replacement function:  this is what I want to load,:

 

library(devtools)
install('K:/Data Science/Packages/dtr', dependencies = TRUE)
library(dtr)
ORIGwd <- getwd() # find out where the current working directory is
setwd('I:/My Folder/03 - Output')
df <- query_obiee('DS_PLC_OnHand_Avail_OnPO.sql') #query to BI system
PLC_Inventory <-"DS_PLC_OnHand_Avail_OnPO.csv"
write.csv(df, file = PLC_Inventory, row.names = FALSE)
setwd(ORIGwd) #put the working directory back where it was

Meteor

Thank you for your response... sorry it took so long to get back to you!!!  I will give this a try.

Labels