ashwin_doshi Absent Member.
Absent Member.
1153 views

How to set a user field with current user using app script


Can someone help with writing an app script to set a user field as current user.
0 Likes
6 Replies
Not applicable

Re: How to set a user field with current user using app script


Have you searched the forum. Start there and see how far you get.
0 Likes
Highlighted
adil_k_hussain Absent Member.
Absent Member.

Re: How to set a user field with current user using app script


This is one way to do that; Let me know if this works. This does not involve appscript.if you are in a transition; then in Composer1) Go to: "Field Override" in "Property Editor".2) check override field properties for 'your_user_field'. Also set "value option" to 'Set to default'.After that do the publish and deploy. After that's done3) Go to: Application Administrator. Look for your project4) Go to your particular transition and look for 'your_user_field'5) Set the value to 'current user' from the options.
0 Likes
ashwin_doshi Absent Member.
Absent Member.

Re: How to set a user field with current user using app script


Hi Mike,I tried. Did not find anything specific. I think Adil has given a simple solution. Thanks.
0 Likes
ashwin_doshi Absent Member.
Absent Member.

Re: How to set a user field with current user using app script


Hi Adil,Thank you for the simple solution. Worked for me.
0 Likes
astenger1 Absent Member.
Absent Member.

Re: How to set a user field with current user using app script


If you want a solution in AppScript, this single lines will set the current user in a single user field:Call Shell.Item.SetFieldValue("<your_user_field>", Shell.User.GetId())
0 Likes
ashwin_doshi Absent Member.
Absent Member.

Re: How to set a user field with current user using app script


thanks Andreas.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.