Skip to main content
Question

"updated by who" attribute

  • 15 November 2017
  • 2 replies
  • 4 views

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!

You can use the EnvironmentVariableFetcher transformer.

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

Hope this helps.


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.

Reply