Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to access user full names

Shannon Campbell August 26, 2021

I've created a confiform with many fields, including the ability to enter a user for a record. the user is not neccessarily the person entering the record, and as such is a field type of 'user'.

During entry of these records, I can select valid users and the full user name is displayed - perfect.

However, when I define an export of these records, this user field is storing the username (login user id), not the user full name. How can I export the user full name?

I've tried creating a second field, defined as type 'calculated' with the following expression:

IF(EMPTY("[entry.employee]"),"Employee Missing",USER())

However this user macro only returns my full name (ie the person entering the record), not the description of the user the record relates to.

Can anyone provide any insights on how to capture the user's full name?

Pic1.png Pic2.png Pic3.png

2 answers

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
August 27, 2021

The best option would be to have something like

IF(EMPTY("[entry.employee]"),"Employee Missing","[entry.employee.fullName]")


And I suggest to switch from "Calculated" field type to "Formula", as the "Calculated" is only calculated once, on record creation and is never recalculated

To your original issue with exports - you can define what fields you export and how these should be transformed 

https://wiki.vertuna.com/display/CONFIFORMS/Data+Export+tricks+and+hints

That means you can easily get dates instead of timestamps, user full names and so on, by setting the export fields (with expressions) in your "view" macros

Any property could be accessed and also "transformed" as needed

https://wiki.vertuna.com/display/CONFIFORMS/Accessing+field+values+and+properties

https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions

Alex

Shannon Campbell August 30, 2021

Thanks Alex.

Like • Alex Medved _ConfiForms_ likes this
0 votes
Midhun Sugathan November 12, 2022

Hey @Alex Medved _ConfiForms_ That was a great suggestion! However, I'm facing a minor trouble. When I'm using [entry.employee.FullName] in a table with Formula as the field definition, I'm getting the value in the table as;

Expression: [Midhun Sugathan] could not be calculated, Unknown operator or function: Sugathan

I'm assuming we need to do something to consider the spaces between names. Can you help?

Alex Medved _ConfiForms_
Community Champion
November 12, 2022

Why would you use something like that in a formula? what do you expect ConfiForms to calculate OUT of your name?

Midhun Sugathan November 12, 2022

May be, I'll explain what I was trying to do. I'm trying to create a new column with the user's full name (in plain format) for querying from another form where I have smart dropdown. When I'm trying to query the current table which has only the User type, I'm just getting their staff ID in the dropdown list. So I was thinking if I can auto-populate a new column with their full name, I can query the new column to my smart dropdown where I will be able see the user's name instead of Staff ID. 

Alex Medved _ConfiForms_
Community Champion
November 12, 2022 edited

Just add a ConfiForms Field macro inside your "view" macro (TableView, CardView, etc) and set it field name parameter to 

employee.fullName

You dont need yet another field definition on your form... you can have custom columns in your views... transformed as needed (lots of virtual functions here to help, as well as access to rich properties of the objects themselves)

Alex

Like • Midhun Sugathan likes this
Midhun Sugathan November 12, 2022

Perfect! That worked.. Thanks a lot :)

Like • Alex Medved _ConfiForms_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events