Username to text field

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • Answered

I am working on a way to log changes to specific fields. I have created a history field that records all the information I want to track when it is changed into an entry in that field. My problem is there are 2 user fields that have Full Name in them and when I attempt to pull than information out and into the new History field it only prints some id number associated with that user, I want it to print the Full Name of the User. My history field is a multiline text field.

Below is the action to my dynamic form rule. It states:

When the record is saved

Action change history to <br><b>Status:</b> [Status] <br><b>Changed by:</b> [Changed by] | <b>Changed Date:</b> [Date Changed]<br><b>Tested By:</b> [Tested by] | <b>Tested Date:</b> [Tested Date]<br><br>

Again, everything in this prints beautifully with the exception of the [Changed by] and the [Tested by].

Here is what an output would look like:

-- [OCT-23-14 4:19 PM Jordan] --------------
Status: New
Changed by: -58508613 | Changed Date: 10-23-2014
Tested By: -58082747 | Tested Date: 10-24-2014

Any guidance is greatly appreciated.

Photo of Jordan

Jordan

  • 0 Points

Posted 5 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,348 Points 50k badge 2x thumb
make a new field with the formula



UserToName([Changed By])


https://www.quickbase.com/db/6ewwzuuj?a=dr&r=e6&rl=fgv



The QB formula functions reference db is an invaluable resource.

Unfortunately it looks like most of the functions in this category are mis-marked as 'Special' rather than 'type conversion' but nonetheless, check it out - I would guess everything you need is in there, Wendy.
Photo of Wendy Shoef

Wendy Shoef

  • 660 Points 500 badge 2x thumb
Thanks everyone. Sadly none of those work.  Everything I have tried has either returned "last name, first name", "first name last name", or email address. Not the username. We have strict HIPAA issues and can't display names or emails. 
It might be time to create a new thread with your actual question. I'm going to be very surprised if whatever you're trying to do is something we can't easily do.
I agree - new thread especially because we are not understanding your question.  I suggest that you post a question with an example of the result you are looking for. 
Photo of Wendy Shoef

Wendy Shoef

  • 660 Points 500 badge 2x thumb
The ToText( User() ) did work. I tried that one once but I must've done something incorrectly because I'm not sure why it didn't work when I originally tried it.  
Thanks!
Photo of Joe

Joe

  • 0 Points
It logs the text name, but what the name was, not what it was changed to.  I have built an identical logging field that captures when a "ticket" (i have ticket app) is assigned to a new user. So it logs the person reassigning the ticket with the date time via the logging feature, but also lists the user it was reassigned to as the actual change.  Again, it updates and lists a new historical record, but the name it displays is what it was before I changed it, not what I changed it to. Sounds like the history record is created before the formula picks up on the change. Any thoughts on rearranging the actions of at the time of saving?  I'm going to try and delete the history field and readd it to see if it makes a difference. I already have the name formula field in a higher order on the form, so I know that wouldn't change anything. My thought is that I created the history field first. Maybe if I switch the creation order it will process the forumla before logging the historical change.
Photo of Joe

Joe

  • 0 Points
I found out the problem.  It uses the last Submitted name IF you hide the formula value. I found that I actually had to show the formula field, in the edit view, because if not the value would not update real-time while editing. Once I clicked save, it actually logged what I change the name TO, not from.

This conversation is no longer open for comments or replies.