Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
6 years ago

View only the last 4 lines in a data field?

Hi, I'm new to QuickBase and I'm having trouble with a formula for a text field. We have data line 1-7, but I only want to pull the last 4 lines in the data (data lines 4-7). I've tried using the part & right formula, but I can't seem to make it work. Any ideas?

Here's the formula we've been using, but I need the last 4.
Right(Right([Long Text],"\n"),"\n")

Thanks!
    • ArchiveUser's avatar
      ArchiveUser
      Qrew Captain
      Yes, here it is below. We want to view only the 2/3/2019 message.

      05/04/2018 09:24:39 MST  EP1RFCXP1 (EP1RFCXP1) 
      ||elevation:5400|| INDIANA/91ST (WEST SIDE OF INDIANA) -ELEC SVC UG 1PH 
      120/240 GAS SVC - NO LOAD INFO PROVIDED WITH APPLICATION. CONTACT INFO: 
      JANE DOE 999-999-999 JEFFERSON CENTER METRO DISTRICT 
       
      ContactType: OWNR 
      ContactName: JEFFERSON CENTER METRO DISTRIC 
      TelephoneNumber: 999-999-999 
      PhoneNumberExtension: 
      Address: 1900 Misc street,LAKEWOOD,CO,80228-1814 
       
      01/31/2019 12:30:53 MST Kristi R Clark (230257) 
      design and project transferred to a new designer. waiting on customer verification for route.

      2/3/2019 12:55:04 MST Krisit R Clark (230357)
      Contacted customer and left Voice Message. 
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      Is the delimiter (for humans) to decide when the next message starts that initial date field?

      So in the text above there are three separate messages and you want just the last one, but any message can be any length?
    • ArchiveUser's avatar
      ArchiveUser
      Qrew Captain
      Yes, that's correct. The field is free form that we pull from SAP and then we import that field from excel into Quickbase. 

      Several messages in that field and we want to just pull the last one. The message can be any length. 

      Thanks!
  • Hi Catelyn. You're running into a common problem resulting from what's called a de-normalized database. It's a technical concept, but basically in your case you have several records worth of information stored in a single field, and so it's hard to retrieve just a portion of that field to display somewhere else.

    Another example of the same kind of thing (but much simpler and therefore easier to resolve) is if you have a person's full name stored in a single field, like "Sam Q. Jones IV" and want to extract only the last name or the middle initial.

    I don't know of a way using a native Quick Base formula to return only the most recent message, especially if there are an unlimited number of messages appended to the field, and they vary in length and formatting.

    The best solution is probably to normalize the database by adding a child table that will hold a single record for each one of these messages. From there, it's easy to surface only the most recent message on a form or in a report either by using a Report Link field or a reverse relationship.

    I'm happy to help further if you need it.

    Yours truly,

    Phillip


    PHILLIP DENNIS
    Principal | Watkyn LLC
    Quick Base Solution Provider
    (954) 900-6690 | hello@watkyn.com
    www.watkyn.com
    Watkyn LLC
  • Caitlyn, can you clarify the ask here. In the example above what is the result you are looking for?