Category attribute default values

Options

Hi I am trying to update the attribute of type user with the currently logged in user but I didn't see any options to add a default value to the attribute of type user. Is there any option to add the default values to the Category Attributes especially attribute of type user.

Tagged:

Comments

  • there is a PS Module that does this, think its called CurrentUserAttribute or something similar.

  • Hi Greg, Thanks for the input. If I understand correctly we need to buy the professional services module to achieve the requirement.

  • Naveen - what is the scenario you're trying to address? i.e. why are you trying to populate an attribute with the current logged in user? When do you need to do that - i.e. only at document/item creation, or also when adding a version etc?

    Depending on what you are trying to do, and subject to the customer's OpenText licensing, there may be other ways to achieve - e.g. using WebReport triggers

  • Hi David, Thanks for the response. We are required to populate an attribute with currently logged-in users during the document creation. We use currently logged-in user details to populate another TKL attribute.

    Please let me know if we have options to use Webreport to update the default value of the attribute

  • @Naveen Mandali you can buy the module as its adds some new attribute types including a CurrentUser attribute, there are probably other ways to do it using JavaScript, WebReports, OScript etc but they all depend on your specific requirement and apetite for code changes etc.

  • @Greg Griffiths thanks for your valuable inputs. We will evaluate these options.

  • Naveen - when a user creates a document, they will be by default set as the Owner of the document and also the Created By field on the document/object properties.

    While the document ownership can be changed, the created by is preserved for life - well, I'm not aware of a way it can be changed through approved methods!

    Additionally, the audit trail of the object will detail who created it initially.

    Therefore, I'd be looking at the requirement and seeking to understand why you actually need an attribute and whether the default behaviours and data capture mechanisms suffice.

  • Hi David, Thanks for sharing your views. The creator details will be saved once the document is uploaded but in our case, we need the logged-in user details before uploading the document. When the user tries to add a document, the application will popup a window where user can update the attribute values. In this popup window, we want an attribute with the currently logged in user details.

  • Hi David, 

    Thank you for your inputs, it is a custom workflow that we have created.

    And we are looking for some option where in we can get the session user or the user who is currently initiating the workflow as an attribute value? As you mentioned, can we use Java script code in attribute definition? If yes, would be of great help if you can give the parameter which gives the current user.

  • @Anmol Mittal

    Hard to answer without having the full requirements for your scenario and what you're trying to achieve.

    Some high level “pointers” in “possible directions".

    1. You might look into using a Form in your workflow and “replacement tags". This blog contains some information that may be relevant to your use case. Note I'm not the author and the blog isn't actively maintained - http://simplyopentextlivelink.blogspot.com/2012/03/replacement-tags-are-really-useful-when.html . You'd likely use the form to gather information at workflow initiation, including the initiator, which you'd populate automatically in the form using the <Initiator /> replacement tag. Then you'd map the form fields to attributes in the workflow as you required. Note that this will require defining a form and also a view for the form - and this may or may not translate to a working solution in Smart View.
    2. Subject to licensing, use WebReports for Workflow and use a WebReport step in the workflow to map the initiator to the target attribute.
    3. Event Scripts. Will require coding in OScript and creation of a module, but you can register code that can be fired on a step becoming ready, complete etc. This technique is usually used when you want some behind scenes logic the user doesn't interact with.

  • Hello David,

    Thanks for your inputs.

    We have a business implementation where in -> When a document is added to a folder, the user is presented with a custom category with a list of attributes to fill in.

    Once these attributes are updated by user, they are updated as workflow attributes to initiate workflow using a webreport on click of upload button.

    Screenshot below shows Initiate AIS as a custom category and upload is the button which initiates web report.

    our requirement is to show an attribute in this category for the current user who has logged in or performing action (both are same )

    Regards,

    Naveen.

  • Using the form and replacement tags: Create a form to collect information when initiating a workflow. Include a field for the initiator and automatically populate it with the replacement tag. Map the form fields to workflow attributes, if necessary. Define the form and the view for it so that it can work in Smart View.
    WebReports for Workflow: Check if licensing allows the use of WebReports for Workflow.
    Use the WebReport step in the workflow to map the initiator to the target attribute. Looks like projects reviewers like Trada Casino no deposit bonus codes https://casinosanalyzer.com/casino-bonuses/tradacasino.comError

    encountered this there too. This step may require some customization in the WebReports tool. Event Scripting: This method involves coding in OScript, the scripting language used in Open Text Livelink. Create a custom module to handle the behind-the-scenes logic. Register the code to run when a particular step is ready or completed. This approach is handy when you need to perform actions that users will not directly interact with.