Hi Everyone,
I am saving value of loggedinuser() function into cloud mysql db, but everytime it saves the "Administrator" instead of the my username. I test this function in expression rule where it gives my username.
Can anyone please help me out?
Discussion posts and replies are publicly visible
Hello shubhamy0005,
Can you show us your code where you are giving the loggedInUser() value.
also try to provide a little more info such as images
In the script task inside process model I am using loggedinuser() function and then saving it in db variable before being used in write to datastore entity.
As Alex Boerescu mentioned you can use the pp!initiator, it will resolve your issue if you are writing it from the script task. You cannot achieve your requirement with the loggedInUser() because it doesn't have a context. You need to follow what Alex has suggested.