In the Flow Designer, how can I get the user who actually approved?

KAYAKO MORIMOTO
Tera Contributor

Q: In the Flow Designer, how can I get the user who actually approved?

(We have specified the approver in the Flow Designer action "Ask for Approval," but we want to get the user who actually approved and display the user name in an additional comment, assuming proxy approval and group assignment.)

 

Situation: Even if I approve by impersonator, the approved user name is returned as "system".

image 1: Specify the logged-in user (=approved user) in the script for additional comments (gs.getUserName();)

image 2: Output additional comment.

image 3: Checking the approval table, both the updater and the creator are System. Also, even after approval, the status is no longer required(不要).

 

image 1~3

photo1.png

photo2.pngphoto3.png

2 REPLIES 2

Maik Skoddow
Tera Patron
Tera Patron

Hi @KAYAKO MORIMOTO 

you have to set in the "Flow Properties" the option "Run as" to "User who initiates session"

MaikSkoddow_0-1692777348630.png

Maik

 

Thank you!
It was a hint to solve the problem.
(The cause was running in test. Activating the flow and running it (not in test) worked.)