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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why would you use something like that in a formula? what do you expect ConfiForms to calculate OUT of your name?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.