Skip to main content
August 4, 2023
Question

user function in task reports

  • August 4, 2023
  • 9 replies
  • 0 views

I am trying to create a text column with properties from the user function inside a process report.

I want to create a text field with "firstName lastName". I want to utilize tp!owner or the tp!assignees

The user function is suppose to be compatible with reports but when I try to use it doesn't return anything.

9 replies

mathieud0001
August 5, 2023

Just tried it and indeed, it does not seem to work.

What is your requirement though? Why not just do the formatting on the result set instead of in the report itself?

johnf9317Author
August 7, 2023

We have a requirement that the user name be sorted and the report sorts on the userid which does not match how we are displaying the name.

ponnuchama617877
August 6, 2023

Hi,

  Task Report > Can we try changing the formatting as "Normal Text" instead of "User Name or Group" or "User Name"? PFAs for your reference.

Before Change

After Change

johnf9317Author
August 7, 2023

i think your before and after are "displaying the same thing" perhaps try putting lastname, firstname or displaying email address . I think you will find it doesnt work. It always returns a user object displayed however it normally does. Even if you specify output as Text.

mikes0011
Brainy
August 7, 2023

You'll need to remember that tp!assignees, at least, is by default a "list of user or group", and thus you'd need to do some more fiddling with whatever its value holds before being able to call any functions on it in a meaningful way.  The back-end logic in reports is old, and the quirks/exceptions/special cases are not very well documented (most of the ones I know about were found just by trial and error), so this is always a touchy thing to try and mess with - especially so because using any rules/functions in the display logic is touchy, and some just plain don't work

(edit to add: i also confirm that user() doesn't seem to work at all even after controlling for the stuff I mentioned above, though I'm not very surprised by this.)

Depending on the end result you're after, I'd more strongly recommend querying the information into a SAIL form and then displaying "friendly" information there on a row-by-row basis, which is comparatively very easy.

johnf9317Author
August 7, 2023

Thank you for the reply and confirmation. According to the documentation the user function is supported in process reports - Based on our tests - it's not.

csteward
August 7, 2023
According to the documentation the user function is supported in process reports - Based on our tests - it's not.

Do you happen to have a quick link to the documentation on that?  I have done some light searching and have not found any references.

For the entire history of Appian to this point, fn!user() and other functions have been unavailable in Process and Task Reports coming from memory.  In the old days where in-memory reporting was the only option really, we would save all data points that might be needed into process variables to be used directly in the reports.

These days, we persist all process information to the DB always, and report with a!queryEntiy(), minus a few light task reports that do not really need data conversions, filtering, sorting etc.