Skip to main content
Question

"updated by who" attribute

  • November 15, 2017
  • 2 replies
  • 13 views

Forum|alt.badge.img

Hey everyone,

I'm looking to add an attribute that will list the username of the last person who ran a specific tool. Can this be done in text editor? I have added a date via @Timestamp, but I cannot figure out how to show who the last person was that ran the tool. Any suggestions?

Any help would be greatly appreciated!

Thanks!

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • November 15, 2017

You can use the EnvironmentVariableFetcher transformer.

The variable containing the logged in user is named USERNAME on my system.

Hope this helps.


trentatsafe
Safer
Forum|alt.badge.img+6
  • Safer
  • 278 replies
  • November 15, 2017

Hello @david_prosack88,

 

 

There are two methods I can think of that you could use to achieve this on FME Desktop.

 

 

1) Create a User parameter that runs the prompt for the user at the beginning of the translation to enter their name. Following that, make that User Parameter the value of the Updated by Who Attribute.

 

 

2) You could use an FMEFunctionCaller transformer with the following:

 

@SupplyAttributes(Updated_by_who,${USERNAME})

 

In this case, it will populate the Updated_by_who attribute with the value of the ${Username}

 

 

I've attached the second option for you to see.

 

desktopusername.fmw

 

 

I hope that helps.