Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.
SOLVED

Have python OR alteryx pop out a box to user when they run analytics tool

nshapir2
7 - Meteor

I am building a ML model in python that will be run with the analytics tool. currently a dataframe with the r^2 is being printed to a .csv file. Is there a way to have alteryx output a message box that says for Model X is the r^2 is "r^2 value" ? or something of that sort?

 

The code runs in python that is the final step of the flow. 

18 REPLIES 18
nshapir2
7 - Meteor

I will do that. Thank you

nshapir2
7 - Meteor

see attached. Thank you

NeilR
Alteryx Alumni (Retired)

@nshapir2 I changed 3 things to get this working:

 

  1. in the last line of your python script, capitalized the A in Alteryx (Alteryx.write(df,1))
  2. changed the configuration of the Report Text tool from [df:A] to [message]
  3. saved the workflow as an Analytical App. when you do this, you can then run it as an app by pressing the magic wand button next to the Run button (see below)

 

NeilR_1-1638225546344.png

 

 

nshapir2
7 - Meteor

I get the following error

 

 

NeilR
Alteryx Alumni (Retired)

This might be because I'm using a newer version of Designer than you. I would try dragging down a new Python tool, and copying/pasting all the code from the old tool to the new one, and deleting the old one.

nshapir2
7 - Meteor

ok. I run 2019.4

I will do this. 

nshapir2
7 - Meteor

Thank you

nshapir2
7 - Meteor

@NeilR I am having some issues, it worked once or twice but now when I look at the render tool I see [No Valid Fields] in the "Data Field"

nshapir2_0-1638479267187.png

 

The report text function still says field name Text and has [message]

NeilR
Alteryx Alumni (Retired)

Can you share your workflow? Hard to say what's going on without that.