Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

How to find the user who is connected to Database through Alteryx

preethisisaac
8 - Asteroid

Hi All,

 

From Alteryx I am connecting through SQL Server ODBC Data Source and writing data into SQL Server tables.

I have columns CREATED_BY and CREATED_DATE for each tables.

For CREATED_DATE i will use DateTimeNow()  in the formula tool.

But for CREATED_BY, how can i get the user who is connecting and running the workflow to insert records in the database tables.

 

While using the output tool and connecting to SQL Server, I am giving the credentials to connect.

How can this user name be collected dynamically and inserted to the columns. Is it possible?

 

Please help me.

 

Thanks,

Preethi

3 REPLIES 3
preethisisaac
8 - Asteroid

Hi All,

Is there an automated way to get the IP ADDRESS of the machine.

Thanks,

 

echuong1
Alteryx Alumni (Retired)

You should be able to take advantage of environment variables to pull this in. You simply need a formula with the getenvironmentvariable() function. In the example below, I pulled in my username.

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/How-To-Reference-Windows-User-Paths... 

 

echuong1_0-1611247157324.png

 

preethisisaac
8 - Asteroid

@echuong1 

Thanks a lot. It worked.

Labels