Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..
906 views

How to get the author to auto populate as the person opening the knowledge document

Jump to solution

Hello, 

I'm trying to get it so when a user opens a knowledge document that the author field I added would fill in with their full.name.

I got it to search and fill in with the information if you hit fill and select the contact

I've attached a picture of my link i'm using.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: How to get the author to auto populate as the person opening the knowledge document

Jump to solution

I was able to get this to work by updating the Process record "kmdocFlow.open.init".  On the initial expressions tab go to the bottom and add the following as the last line.

author in $L.file=nullsub(author in $L.file, $lo.ufname)

 

View solution in original post

9 Replies
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: How to get the author to auto populate as the person opening the knowledge document

Jump to solution

Typically, you can use formatCtrl for that. Add a new line in Queries to select the correct operator record, and use that to do a calculation on either add and/or update to fill the author: 

author in $file=nullsub(author in $file, full.name in $file1)

-- where 1 represents the query line position. So if it's the second query, it'd be $file2 --

 

Alternatively, you can fill it on "initial" (same calculation as above), so it is filled in when the user opens the form to create a new entry.

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: How to get the author to auto populate as the person opening the knowledge document

Jump to solution

Is that query supposed to go into kmknowledgebase formatctrl?

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: How to get the author to auto populate as the person opening the knowledge document

Jump to solution

Yes, if it applies to all types of knowledge.

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: How to get the author to auto populate as the person opening the knowledge document

Jump to solution

You cvould also just use the $lo.operator info, and not use the query at all.

Calculation becomes:

author in $file=full.name in $lo.operator
0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: How to get the author to auto populate as the person opening the knowledge document

Jump to solution

Does this look correct for the kmknowledgebase fc?

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: How to get the author to auto populate as the person opening the knowledge document

Jump to solution

Nope. Following my last advice, only create a new line in Calcuations, on Display (or Add/Update, if your users are okay with not seeing the value as they create the record):

author in $file=nullsub(author in $file, full.name in $lo.operator)

 

If you go the query route (which I suggested as my head was still in Functional Mode), the query will look like:

 Filename:  operator
Query:  name=<user.name field> in $file

But as <user.name field> is actually the current user, you'd be loking at $lo.operator, which is already the operator record you want to retrieve. Which is redudant. Hence my adustment. Just use the one calculation unless there is a field with an operator name in it that you want to use to get the full name for.

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: How to get the author to auto populate as the person opening the knowledge document

Jump to solution

I'm still unable to get it to autopopulate the field, i've attached the calculation i'm using.

Also, I really appreciate you taking the time to work with me today.

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: How to get the author to auto populate as the person opening the knowledge document

Jump to solution

It's not calling the FC you specified as the master. It's actually not calling any FC as master, because the Object record for km doesn't have one specified. Best way forward is, I think, to create a new FC called "kmdocument" and add your code in there. Then update the Object record for "kmdocument" and set the "Master format control" field (on the "Object Info" tab) to kmdocument.

Note: On my environment, the author field is automatically populated by the system with the user ID.

0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: How to get the author to auto populate as the person opening the knowledge document

Jump to solution

I was able to get this to work by updating the Process record "kmdocFlow.open.init".  On the initial expressions tab go to the bottom and add the following as the last line.

author in $L.file=nullsub(author in $L.file, $lo.ufname)

 

View solution in original post

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.