How to setup a field to add a suffix after submission?

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • In Progress
The question may not have been much clear, so hopefully, this explains what I'm talking about. I ran into problems with integration with Quick Books, so my solution has to be to add a suffix "(c)" when we input the Name of person on an invoice. For instance, Smith (c).

However, I know the person who will input the names will forget to add the suffix. So, I'm wondering is there a formula can be used that can add this suffix to the name after its submitted?

I'm new at this and have no coding or formula knowledge, so step by step is preferred. Please and thanks.
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
You can do it two ways.  
(1) With a formula field and a form rule to update the needed text field.
or
(2) With just a formula field.

It depends on the 'integration' with QBooks.
Are you able to change the field in the report or code that runs the 'integration'?
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb
My integration with quick books is through workato. I'm not overly familiar with the capabilities inside workato, but I can control what I take from quick base and send to quick books. I cannot change the titles of the fields within workato, just which fields. I think it needs to be more quick base done though. Is it possible with the formula field to allow this person to type in the name and auto put the suffix after they continue with the rest of form?
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
Yes, now that we know you have control over changing the field you will want to go with option 2.

Create a new formula field and have it add the "(c)" after the name.

Then adjust your Workato connection to use the new formula field.
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb
what would be the formula for that if i only use last name?
(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,326 Points 50k badge 2x thumb
There are several solutions. The most simple solution is to rename your existing name field to be called Name Input.  Then maKe a new Formula text field called Name with the formula

IF(Ends(Trim([Name Input]),"(c)"), Trim([Name Input]), Trim([Name Input]) & " (c)")
(Edited)
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb
So, in terms of steps --> 1)rename the field. 2)change field type to formula text 3) add your formula?

would it matter to the formula if i only use a last name only?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,326 Points 50k badge 2x thumb
Yikes! NO!

1. Rename the field.
2. Make a new field which is a text formula field and put in the formula.

As for the formula, all it will do is to check if a field ends in (c) and if not it will add that as a suffix.  As for first name, last name, full name it really does not care, as not really "self-aware" as yet - but maybe future versions of Quick Base will have feelings, like when Dr. Noonien Soong gave data emotions. http://www.startrek.com/database_article/soong
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb
you'll have to break that down. not proficient enough in quick base to understand.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,326 Points 50k badge 2x thumb
Are you really asking because your current data is in two fields, and it is just the last name that needs the suffix?  Are you looking to have Quick Base have a formula to show the full name, ie first and last name and suffix if necessary?
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb
no. we use last name as the customer id, nothing else. quick books cannot have the same name twice. and we use same people as a customer and vendor. so we need the last names in quick base to have a suffix of (c) for a customer, so when we go in quick books and refund the money we can add them as a vendor.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,326 Points 50k badge 2x thumb
OK.
Let m know the names of your fields and I will help you with the formula.
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb
i only use one field. Customer ID