Hi,
I am new to oscript development. And I am trying to set value in User picker type workflow attribute using script, but have been unsuccessful in doing so till now. Can someone help me with a script to save user picker attribute value?
Thanks.
Setting User Picker attribute through oscript in workflow Posted byJohnson, DuranOn 03/10/2016 02:16 PM Hi,I am new to oscript development. And I am trying to set value in User picker type workflow attribute using script, but have been unsuccessful in doing so till now. Can someone help me with a script to save user picker attribute value? Thanks.[To post a comment, use the normal reply function]Forum:Content Server Development ForumContent Server:Knowledge Center
I am trying to write a script which can populate a workflow attribute which is of type User Field, by that I mean that when I see the workflow attributes, I want to see the user name populated. I am easily able to populate Text Fields using the same script, but not able to populate the user Attribute. I know user attribute is type Integer and I am getting the user id from the KUAF table. Now the challenge is how to show that user name in the WF Attributes. I also saw at some places that I would need XML Workflow Extensions to do this, and at this point of time we cannot go by buying that module. Isn't there a script that can do this?
Re Setting User Picker attribute through oscript in workflow Posted byJohnson, DuranOn 03/10/2016 04:46 PM I am trying to write a script which can populate a workflow attribute which is of type User Field, by that I mean that when I see the workflow attributes, I want to see the user name populated. I am easily able to populate Text Fields using the same script, but not able to populate the user Attribute. I know user attribute is type Integer and I am getting the user id from the KUAF table. Now the challenge is how to show that user name in the WF Attributes. I also saw at some places that I would need XML Workflow Extensions to do this, and at this point of time we cannot go by buying that module. Isn't there a script that can do this?Thanks.[To post a comment, use the normal reply function]Topic:Setting User Picker attribute through oscript in workflowForum:Content Server Development ForumContent Server:Knowledge Center
Thanks Appu. I got it finally. Yes, you are right, User attribute is set in the same way as a Text Attribute, except that small [1] which needs to be there.
for text field: valueAssoc.Values[ 1 ].(id).Values = "text"
for user field: valueAssoc.Values[ 1 ].(id).Values[1] = userID
Hi Duran,
I haven’t done anything with WF attributes in a long while, but I think the proper way to code it is
for text field: valueAssoc.Values[ 1 ].(id).Values = {"text"}
for user field: valueAssoc.Values[ 1 ].(id).Values = {userID}
An WF attribute can have multiple values and therefore the values should always be a list even when it contains only one value.
Hans
From: eLink Entry: Content Server Development Forum [mailto:development@elinkkc.opentext.com]Sent: Freitag, 11. März 2016 06:11To: eLink RecipientSubject: Re Re Setting User Picker attribute through oscript in workflow
Re Re Setting User Picker attribute through oscript in workflow
Posted by Johnson, Duran On 03/11/2016 12:07 AM
[To post a comment, use the normal reply function]
Topic:
Setting User Picker attribute through oscript in workflow
Forum:
Content Server Development Forum
Content Server:
Knowledge Center
RE Re Re Setting User Picker attribute through oscript in workflow Posted byStoop, HansOn 03/11/2016 04:19 AM Hi Duran, I haven’t done anything with WF attributes in a long while, but I think the proper way to code it is for text field: valueAssoc.Values[ 1 ].(id).Values = {"text"}for user field: valueAssoc.Values[ 1 ].(id).Values = {userID}An WF attribute can have multiple values and therefore the values should always be a list even when it contains only one value. Hans From: eLink Entry: Content Server Development Forum [mailto:development@elinkkc.opentext.com]Sent: Freitag, 11. März 2016 06:11To: eLink RecipientSubject: Re Re Setting User Picker attribute through oscript in workflow