Forum Discussion

JordanMcAlister's avatar
JordanMcAlister
Qrew Captain
5 years ago

Need Value from same field of a different record

I'm looking to be able to reference the value of a field from a different record using certain parameters in the same table.

Context: 
I have a field collection form that has hundreds of manual entry fields and one of the is an "ahead" and "back" length span of a utility pole. For many of our projects, the field technicians will have many consecutive poles that are collected and therefore, the "ahead" span length of wires will also end up being the "back" span length of the next pole. I want to be able to auto-fill that information in if the technician confirms that the current pole is consecutive.

I'm hoping this can be done via formula field, so that I can have two fields: one manual entry span field and one formula field that has the span length of the previous pole in the sequence. Then, I would have a checkbox or something asking to use previous pole's ahead span length with a form rule to change the manual entry value with the value that's in the formula field.

Can this be done?  I can't seem to think of any good solutions. I was originally thinking of a DoQuery but I want the change to be live with no reloadings or save and re-edits.

#Formulasandfunctions
#Forms
#Tablesandfields
#APIsandcustomcode​​​​​​

------------------------------
Jordan McAlister
------------------------------
  • What is the definition of the "Previous Pole"

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • JordanMcAlister's avatar
      JordanMcAlister
      Qrew Captain
      The pole they collected before their current one. Every pole is a new field record collected. Telecommunication companies want to route their lines on utility poles, so our field technicians will walk pole to pole following the route the telecommunication company wants and they collect a bunch of information. In this case, one of the things they collect is distances to the adjacent poles to run stress and tension analysis tests. If pole A is connected to pole B, then the "ahead" span of pole A will be the "back" span of pole B. If they are on pole B then the previous pole is pole A and I want there to be an option to use the previous pole's "ahead" span information for the "back" span of their current pole - if that makes sense.

      Let me know if I need to explain a little more - thanks.

      ------------------------------
      Jordan McAlister
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        So this is may be doable.

        You need to know the Record ID# of the most current record for the current user (I assume that the Key field is Record ID#) 

        Not tested but make a table and load up up with some users, well at least you. Set the Key field to be userid.
        Relate that table to the details table via Record Owner.  One User has many poles.
        Get the Max Record ID#.   Now you know the Record ID of the most recent Pole.  Get the data you need up to that record via a summary fields or a reverse relationship.

        Then make a relationship to the pole table based on a reference field of current user and look up the info from the last pole.

        To self maintain that user table, you can set up an Automation to add a record into the table when a pole record is saved and the user does not exists.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------