Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How do I link the interface with R scripts?

Colin
6 - 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?

3 REPLIES 3
JordanB
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 

msmith
7 - 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

msmith
7 - Meteor

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

Labels