Forum Discussion

RileyCotter's avatar
RileyCotter
Qrew Member
2 years ago

Update record in related table

I have two tables, Samples and Locations. The user will go out and create new samples at the same locations each month. When they choose a location in the sample table, I'd like a field ( ex. pressure reading) in the sample to display the pressure reading from the location that was selected. If duing that month's sampling the pressure changes, the user should be able to update the pressure field from the location table with data entered in the sample table. 

Hopefully this makes sense. 

Thanks for any help!



------------------------------
Riley Cotter
------------------------------
  • OK. So you have a relationship where one location has many samples. Is your question how to float up the value of the most recent pressure measurement on the sample record up to the location record. If so, can you tell us if the pressure reading is a Numeric field or a text field type?



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • RileyCotter's avatar
      RileyCotter
      Qrew Member

      Correct, that is what I need to do. Ideally the pressure reading field would be numeric, but could be text if necessary.



      ------------------------------
      Riley Cotter
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        Ok, easy peasy.

        Go to Relationship and make a summary field of the Maximum of the Record ID # of the children Samples record. Call it [Record ID of the most recent sample]

        Then look that up back down to samples.

        Then make a Summary field of the Maximum of the Pressure, but include a filter on the summary field setup that the Record ID equals the [Record ID of the most recent sample].

        That's it!  You now have a numeric field for the Pressure up on the a location record.



        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------