How can I use the value of fields to determine a record title?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I'm trying to automatically generate a record title based on the value of some of my fields.

I noticed there is the option to extract it from fields in the form being filled out.

What I've tried to do is create a formula text with the formula:

[Field1]-[Field2]-[Field3]-[Field4]-[Field5]

With the hope it'll output like this: Field1Value-Field2Value- etc...

But I get an error telling me I can't do this...


I'm not a coding magician, so I was hoping somebody could let me know what I'm doing wrong and help me correct it. 

Thanks!

Photo of Barnee

Barnee

  • 0 Points

Posted 4 years ago

  • 0
  • 1
Photo of dwhawe

dwhawe, Champion

  • 744 Points 500 badge 2x thumb
Try the List function, you first show the separator then the fields.

List("-",[Field1],[Field2],[Field3],[Field4],[Field5])
Photo of Barnee

Barnee

  • 0 Points
Thank you for your answer. I just tried it and am getting a formula error: "Bad or missing arguments in function call"
Photo of dwhawe

dwhawe, Champion

  • 744 Points 500 badge 2x thumb
Please copy and paste your formula so it can be seen here.  It is likely missing or misplaced commas or parenthesis.
Photo of Barnee

Barnee

  • 0 Points
List("-",[ECR / SCR],[Location 1],[Change Date],[ID#])
Photo of dwhawe

dwhawe, Champion

  • 744 Points 500 badge 2x thumb
The fields all need to be in text format.  For example if the last to are a date and a number then try this:

List("-",[ECR / SCR],[Location 1],ToText([Change Date]),ToText([ID#]))
Photo of Barnee

Barnee

  • 0 Points
It has worked beautifully. Thank you!
Photo of dwhawe

dwhawe, Champion

  • 744 Points 500 badge 2x thumb
Cool.  Glad to help
Photo of Barnee

Barnee

  • 0 Points
Hi Dwhawe,

I have a question relating to your previous answer (your solution is working great by the way):

I have a formula text field that extracts the name of the user who made a change to a drop-down menu field that has 'log changes' enabled and outputs it as text.

I saw you used something called 'ToText' to convert the date into text. Is there something that will convert the text of the person's name into the user it references? Where can I find a list of all these functions?

Thanks
Photo of dwhawe

dwhawe, Champion

  • 744 Points 500 badge 2x thumb
There is a ToUser function although I have never used it.  To find the functions, click in the area where you write formulas and a pick list of available fields becomes visible to the right.  Above the top of the list of fields which is the first choice of the pick list is "Find a function" click on it and if gives you the list and each one has a brief "how to" that shows when you click on it.
Photo of Barnee

Barnee

  • 0 Points
Thank you! I will have a play around with it!